Update product settings
curl --request PATCH \
--url https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vpn": false,
"tor": false,
"proxy": true,
"currency": "EUR",
"productUrl": "https://app.example.com"
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/"
payload = {
"vpn": False,
"tor": False,
"proxy": True,
"currency": "EUR",
"productUrl": "https://app.example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vpn: false,
tor: false,
proxy: true,
currency: 'EUR',
productUrl: 'https://app.example.com'
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'vpn' => false,
'tor' => false,
'proxy' => true,
'currency' => 'EUR',
'productUrl' => 'https://app.example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/"
payload := strings.NewReader("{\n \"vpn\": false,\n \"tor\": false,\n \"proxy\": true,\n \"currency\": \"EUR\",\n \"productUrl\": \"https://app.example.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"vpn\": false,\n \"tor\": false,\n \"proxy\": true,\n \"currency\": \"EUR\",\n \"productUrl\": \"https://app.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vpn\": false,\n \"tor\": false,\n \"proxy\": true,\n \"currency\": \"EUR\",\n \"productUrl\": \"https://app.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"vpn": true,
"tor": true,
"proxy": true,
"currency": "USD",
"productUrl": "https://app.example.com"
}Product Settings
Update product settings
Updates one or more product settings fields. Changing currency re-enables previously disabled prices in the new currency on the latest plans of that product.
PATCH
/
catalog
/
products
/
{pk}
/
settings
/
Update product settings
curl --request PATCH \
--url https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vpn": false,
"tor": false,
"proxy": true,
"currency": "EUR",
"productUrl": "https://app.example.com"
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/"
payload = {
"vpn": False,
"tor": False,
"proxy": True,
"currency": "EUR",
"productUrl": "https://app.example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vpn: false,
tor: false,
proxy: true,
currency: 'EUR',
productUrl: 'https://app.example.com'
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'vpn' => false,
'tor' => false,
'proxy' => true,
'currency' => 'EUR',
'productUrl' => 'https://app.example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/"
payload := strings.NewReader("{\n \"vpn\": false,\n \"tor\": false,\n \"proxy\": true,\n \"currency\": \"EUR\",\n \"productUrl\": \"https://app.example.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"vpn\": false,\n \"tor\": false,\n \"proxy\": true,\n \"currency\": \"EUR\",\n \"productUrl\": \"https://app.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/products/{pk}/settings/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vpn\": false,\n \"tor\": false,\n \"proxy\": true,\n \"currency\": \"EUR\",\n \"productUrl\": \"https://app.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"vpn": true,
"tor": true,
"proxy": true,
"currency": "USD",
"productUrl": "https://app.example.com"
}Authorizations
The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'
Path Parameters
Product UUID.
Body
application/json
Response
Updated product settings.
Behavioural and presentation settings attached to a product.
If true, VPN traffic is allowed for this product's experience.
Example:
true
If true, Tor traffic is allowed.
Example:
true
If true, proxy traffic is allowed.
Example:
true
Default currency for the product.
Example:
"USD"
Public URL of the product.
Example:
"https://app.example.com"
⌘I