Update plan prices
curl --request POST \
--url https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prices": [
{
"priceType": "PAID",
"currency": "USD",
"freeTrial": false,
"trialPeriod": 0,
"enabled": true,
"taxBehavior": "EXCLUSIVE",
"chargeCatalogPrice": [
{
"feature": "3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01",
"priceModel": "FLAT",
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"hasUnlimitedUsage": false,
"paymentType": "ADVANCE_COMMITMENT",
"rollover": {},
"usageAlerts": {
"enabled": true,
"thresholds": [
75,
90
],
"thresholdType": "PERCENTAGE"
},
"charges": [
{
"chargePeriod": "MONTHLY",
"priceData": {
"amount": 29.99
},
"tiers": [],
"advanced": {}
}
]
}
]
}
]
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/"
payload = { "prices": [
{
"priceType": "PAID",
"currency": "USD",
"freeTrial": False,
"trialPeriod": 0,
"enabled": True,
"taxBehavior": "EXCLUSIVE",
"chargeCatalogPrice": [
{
"feature": "3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01",
"priceModel": "FLAT",
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"hasUnlimitedUsage": False,
"paymentType": "ADVANCE_COMMITMENT",
"rollover": {},
"usageAlerts": {
"enabled": True,
"thresholds": [75, 90],
"thresholdType": "PERCENTAGE"
},
"charges": [
{
"chargePeriod": "MONTHLY",
"priceData": { "amount": 29.99 },
"tiers": [],
"advanced": {}
}
]
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prices: [
{
priceType: 'PAID',
currency: 'USD',
freeTrial: false,
trialPeriod: 0,
enabled: true,
taxBehavior: 'EXCLUSIVE',
chargeCatalogPrice: [
{
feature: '3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01',
priceModel: 'FLAT',
reset: 'EVERY_MONTH',
resetTime: 'BEGINNING_OF_PERIOD',
hasUnlimitedUsage: false,
paymentType: 'ADVANCE_COMMITMENT',
rollover: {},
usageAlerts: {enabled: true, thresholds: [75, 90], thresholdType: 'PERCENTAGE'},
charges: [{chargePeriod: 'MONTHLY', priceData: {amount: 29.99}, tiers: [], advanced: {}}]
}
]
}
]
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/', 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/plans/{identifier}/prices/bulk/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prices' => [
[
'priceType' => 'PAID',
'currency' => 'USD',
'freeTrial' => false,
'trialPeriod' => 0,
'enabled' => true,
'taxBehavior' => 'EXCLUSIVE',
'chargeCatalogPrice' => [
[
'feature' => '3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01',
'priceModel' => 'FLAT',
'reset' => 'EVERY_MONTH',
'resetTime' => 'BEGINNING_OF_PERIOD',
'hasUnlimitedUsage' => false,
'paymentType' => 'ADVANCE_COMMITMENT',
'rollover' => [
],
'usageAlerts' => [
'enabled' => true,
'thresholds' => [
75,
90
],
'thresholdType' => 'PERCENTAGE'
],
'charges' => [
[
'chargePeriod' => 'MONTHLY',
'priceData' => [
'amount' => 29.99
],
'tiers' => [
],
'advanced' => [
]
]
]
]
]
]
]
]),
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/plans/{identifier}/prices/bulk/"
payload := strings.NewReader("{\n \"prices\": [\n {\n \"priceType\": \"PAID\",\n \"currency\": \"USD\",\n \"freeTrial\": false,\n \"trialPeriod\": 0,\n \"enabled\": true,\n \"taxBehavior\": \"EXCLUSIVE\",\n \"chargeCatalogPrice\": [\n {\n \"feature\": \"3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01\",\n \"priceModel\": \"FLAT\",\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"hasUnlimitedUsage\": false,\n \"paymentType\": \"ADVANCE_COMMITMENT\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"charges\": [\n {\n \"chargePeriod\": \"MONTHLY\",\n \"priceData\": {\n \"amount\": 29.99\n },\n \"tiers\": [],\n \"advanced\": {}\n }\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prices\": [\n {\n \"priceType\": \"PAID\",\n \"currency\": \"USD\",\n \"freeTrial\": false,\n \"trialPeriod\": 0,\n \"enabled\": true,\n \"taxBehavior\": \"EXCLUSIVE\",\n \"chargeCatalogPrice\": [\n {\n \"feature\": \"3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01\",\n \"priceModel\": \"FLAT\",\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"hasUnlimitedUsage\": false,\n \"paymentType\": \"ADVANCE_COMMITMENT\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"charges\": [\n {\n \"chargePeriod\": \"MONTHLY\",\n \"priceData\": {\n \"amount\": 29.99\n },\n \"tiers\": [],\n \"advanced\": {}\n }\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prices\": [\n {\n \"priceType\": \"PAID\",\n \"currency\": \"USD\",\n \"freeTrial\": false,\n \"trialPeriod\": 0,\n \"enabled\": true,\n \"taxBehavior\": \"EXCLUSIVE\",\n \"chargeCatalogPrice\": [\n {\n \"feature\": \"3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01\",\n \"priceModel\": \"FLAT\",\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"hasUnlimitedUsage\": false,\n \"paymentType\": \"ADVANCE_COMMITMENT\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"charges\": [\n {\n \"chargePeriod\": \"MONTHLY\",\n \"priceData\": {\n \"amount\": 29.99\n },\n \"tiers\": [],\n \"advanced\": {}\n }\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"prices": [
{
"id": "df0b9da9-58c3-4d77-9b62-3f6e4c2b1ad0",
"priceType": "PAID",
"currency": "USD",
"freeTrial": false,
"trialPeriod": 14,
"enabled": true,
"taxBehavior": "EXCLUSIVE",
"chargeCatalogPrice": [
{
"feature": "3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01",
"priceModel": "FLAT",
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"hasUnlimitedUsage": false,
"paymentType": "ADVANCE_COMMITMENT",
"rollover": {},
"usageAlerts": {
"enabled": true,
"thresholds": [
75,
90
],
"thresholdType": "PERCENTAGE"
},
"charges": [
{
"chargePeriod": "MONTHLY",
"priceData": {
"amount": 29.99
},
"tiers": [],
"advanced": {}
}
]
}
]
}
]
}Plans
Update plan prices
Atomically replaces the plan’s prices with the supplied list. If the plan’s latest version is published, a new draft version is created and the new prices are attached to it. Duplicate currencies among PAID prices are rejected.
POST
/
catalog
/
plans
/
{identifier}
/
prices
/
bulk
/
Update plan prices
curl --request POST \
--url https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prices": [
{
"priceType": "PAID",
"currency": "USD",
"freeTrial": false,
"trialPeriod": 0,
"enabled": true,
"taxBehavior": "EXCLUSIVE",
"chargeCatalogPrice": [
{
"feature": "3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01",
"priceModel": "FLAT",
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"hasUnlimitedUsage": false,
"paymentType": "ADVANCE_COMMITMENT",
"rollover": {},
"usageAlerts": {
"enabled": true,
"thresholds": [
75,
90
],
"thresholdType": "PERCENTAGE"
},
"charges": [
{
"chargePeriod": "MONTHLY",
"priceData": {
"amount": 29.99
},
"tiers": [],
"advanced": {}
}
]
}
]
}
]
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/"
payload = { "prices": [
{
"priceType": "PAID",
"currency": "USD",
"freeTrial": False,
"trialPeriod": 0,
"enabled": True,
"taxBehavior": "EXCLUSIVE",
"chargeCatalogPrice": [
{
"feature": "3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01",
"priceModel": "FLAT",
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"hasUnlimitedUsage": False,
"paymentType": "ADVANCE_COMMITMENT",
"rollover": {},
"usageAlerts": {
"enabled": True,
"thresholds": [75, 90],
"thresholdType": "PERCENTAGE"
},
"charges": [
{
"chargePeriod": "MONTHLY",
"priceData": { "amount": 29.99 },
"tiers": [],
"advanced": {}
}
]
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prices: [
{
priceType: 'PAID',
currency: 'USD',
freeTrial: false,
trialPeriod: 0,
enabled: true,
taxBehavior: 'EXCLUSIVE',
chargeCatalogPrice: [
{
feature: '3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01',
priceModel: 'FLAT',
reset: 'EVERY_MONTH',
resetTime: 'BEGINNING_OF_PERIOD',
hasUnlimitedUsage: false,
paymentType: 'ADVANCE_COMMITMENT',
rollover: {},
usageAlerts: {enabled: true, thresholds: [75, 90], thresholdType: 'PERCENTAGE'},
charges: [{chargePeriod: 'MONTHLY', priceData: {amount: 29.99}, tiers: [], advanced: {}}]
}
]
}
]
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/', 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/plans/{identifier}/prices/bulk/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prices' => [
[
'priceType' => 'PAID',
'currency' => 'USD',
'freeTrial' => false,
'trialPeriod' => 0,
'enabled' => true,
'taxBehavior' => 'EXCLUSIVE',
'chargeCatalogPrice' => [
[
'feature' => '3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01',
'priceModel' => 'FLAT',
'reset' => 'EVERY_MONTH',
'resetTime' => 'BEGINNING_OF_PERIOD',
'hasUnlimitedUsage' => false,
'paymentType' => 'ADVANCE_COMMITMENT',
'rollover' => [
],
'usageAlerts' => [
'enabled' => true,
'thresholds' => [
75,
90
],
'thresholdType' => 'PERCENTAGE'
],
'charges' => [
[
'chargePeriod' => 'MONTHLY',
'priceData' => [
'amount' => 29.99
],
'tiers' => [
],
'advanced' => [
]
]
]
]
]
]
]
]),
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/plans/{identifier}/prices/bulk/"
payload := strings.NewReader("{\n \"prices\": [\n {\n \"priceType\": \"PAID\",\n \"currency\": \"USD\",\n \"freeTrial\": false,\n \"trialPeriod\": 0,\n \"enabled\": true,\n \"taxBehavior\": \"EXCLUSIVE\",\n \"chargeCatalogPrice\": [\n {\n \"feature\": \"3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01\",\n \"priceModel\": \"FLAT\",\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"hasUnlimitedUsage\": false,\n \"paymentType\": \"ADVANCE_COMMITMENT\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"charges\": [\n {\n \"chargePeriod\": \"MONTHLY\",\n \"priceData\": {\n \"amount\": 29.99\n },\n \"tiers\": [],\n \"advanced\": {}\n }\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prices\": [\n {\n \"priceType\": \"PAID\",\n \"currency\": \"USD\",\n \"freeTrial\": false,\n \"trialPeriod\": 0,\n \"enabled\": true,\n \"taxBehavior\": \"EXCLUSIVE\",\n \"chargeCatalogPrice\": [\n {\n \"feature\": \"3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01\",\n \"priceModel\": \"FLAT\",\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"hasUnlimitedUsage\": false,\n \"paymentType\": \"ADVANCE_COMMITMENT\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"charges\": [\n {\n \"chargePeriod\": \"MONTHLY\",\n \"priceData\": {\n \"amount\": 29.99\n },\n \"tiers\": [],\n \"advanced\": {}\n }\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/prices/bulk/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prices\": [\n {\n \"priceType\": \"PAID\",\n \"currency\": \"USD\",\n \"freeTrial\": false,\n \"trialPeriod\": 0,\n \"enabled\": true,\n \"taxBehavior\": \"EXCLUSIVE\",\n \"chargeCatalogPrice\": [\n {\n \"feature\": \"3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01\",\n \"priceModel\": \"FLAT\",\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"hasUnlimitedUsage\": false,\n \"paymentType\": \"ADVANCE_COMMITMENT\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"charges\": [\n {\n \"chargePeriod\": \"MONTHLY\",\n \"priceData\": {\n \"amount\": 29.99\n },\n \"tiers\": [],\n \"advanced\": {}\n }\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"prices": [
{
"id": "df0b9da9-58c3-4d77-9b62-3f6e4c2b1ad0",
"priceType": "PAID",
"currency": "USD",
"freeTrial": false,
"trialPeriod": 14,
"enabled": true,
"taxBehavior": "EXCLUSIVE",
"chargeCatalogPrice": [
{
"feature": "3a3e92ab-90a3-4f43-8e87-9d4c8c5a9c01",
"priceModel": "FLAT",
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"hasUnlimitedUsage": false,
"paymentType": "ADVANCE_COMMITMENT",
"rollover": {},
"usageAlerts": {
"enabled": true,
"thresholds": [
75,
90
],
"thresholdType": "PERCENTAGE"
},
"charges": [
{
"chargePeriod": "MONTHLY",
"priceData": {
"amount": 29.99
},
"tiers": [],
"advanced": {}
}
]
}
]
}
]
}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
Plan identifier.
Body
application/json
Replaces the plan's prices in one atomic call. Creating multiple PAID prices with the same currency is rejected.
Show child attributes
Show child attributes
Response
Prices replaced.
Show child attributes
Show child attributes
⌘I