Update a plan
curl --request PATCH \
--url https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pro Monthly (v2)",
"description": "Updated description.",
"metadata": {},
"isVisible": true,
"license": {
"enabled": true,
"activationLimit": 3,
"activationLimitEnabled": true,
"durationUnit": "YEAR",
"durationValue": 1,
"hasExpiry": true
},
"links": [
{
"name": "Product page",
"url": "https://example.com/product"
}
],
"fileKeys": [
"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf"
]
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/"
payload = {
"name": "Pro Monthly (v2)",
"description": "Updated description.",
"metadata": {},
"isVisible": True,
"license": {
"enabled": True,
"activationLimit": 3,
"activationLimitEnabled": True,
"durationUnit": "YEAR",
"durationValue": 1,
"hasExpiry": True
},
"links": [
{
"name": "Product page",
"url": "https://example.com/product"
}
],
"fileKeys": ["tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf"]
}
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({
name: 'Pro Monthly (v2)',
description: 'Updated description.',
metadata: {},
isVisible: true,
license: {
enabled: true,
activationLimit: 3,
activationLimitEnabled: true,
durationUnit: 'YEAR',
durationValue: 1,
hasExpiry: true
},
links: [{name: 'Product page', url: 'https://example.com/product'}],
fileKeys: ['tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf']
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/', 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}/",
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([
'name' => 'Pro Monthly (v2)',
'description' => 'Updated description.',
'metadata' => [
],
'isVisible' => true,
'license' => [
'enabled' => true,
'activationLimit' => 3,
'activationLimitEnabled' => true,
'durationUnit' => 'YEAR',
'durationValue' => 1,
'hasExpiry' => true
],
'links' => [
[
'name' => 'Product page',
'url' => 'https://example.com/product'
]
],
'fileKeys' => [
'tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf'
]
]),
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}/"
payload := strings.NewReader("{\n \"name\": \"Pro Monthly (v2)\",\n \"description\": \"Updated description.\",\n \"metadata\": {},\n \"isVisible\": true,\n \"license\": {\n \"enabled\": true,\n \"activationLimit\": 3,\n \"activationLimitEnabled\": true,\n \"durationUnit\": \"YEAR\",\n \"durationValue\": 1,\n \"hasExpiry\": true\n },\n \"links\": [\n {\n \"name\": \"Product page\",\n \"url\": \"https://example.com/product\"\n }\n ],\n \"fileKeys\": [\n \"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf\"\n ]\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/plans/{identifier}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Pro Monthly (v2)\",\n \"description\": \"Updated description.\",\n \"metadata\": {},\n \"isVisible\": true,\n \"license\": {\n \"enabled\": true,\n \"activationLimit\": 3,\n \"activationLimitEnabled\": true,\n \"durationUnit\": \"YEAR\",\n \"durationValue\": 1,\n \"hasExpiry\": true\n },\n \"links\": [\n {\n \"name\": \"Product page\",\n \"url\": \"https://example.com/product\"\n }\n ],\n \"fileKeys\": [\n \"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/")
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 \"name\": \"Pro Monthly (v2)\",\n \"description\": \"Updated description.\",\n \"metadata\": {},\n \"isVisible\": true,\n \"license\": {\n \"enabled\": true,\n \"activationLimit\": 3,\n \"activationLimitEnabled\": true,\n \"durationUnit\": \"YEAR\",\n \"durationValue\": 1,\n \"hasExpiry\": true\n },\n \"links\": [\n {\n \"name\": \"Product page\",\n \"url\": \"https://example.com/product\"\n }\n ],\n \"fileKeys\": [\n \"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "pro-monthly",
"name": "Pro Monthly",
"description": "Pro tier billed monthly.",
"product": {
"id": "0d65f7c0-7e91-4f56-9b32-13a9a6a7c1de",
"identifier": "pro-suite",
"name": "Pro Suite",
"description": "Premium tools for growing teams.",
"taxCode": "saas",
"createdBy": "Jane Smith",
"modifiedOn": "2025-04-12T08:21:14.910Z",
"images": [
{
"id": "1f7e1b54-7c6f-4d7e-9a4f-2c9c2d8b9d31",
"name": "hero-banner.png",
"image": "media/.../products/<id>/<uuid>/hero-banner.png",
"ordering": 0,
"thumbnail": true,
"enabled": true
}
]
},
"metadata": {},
"version": 3,
"isLatest": true,
"modifiedOn": "2025-04-12T08:21:14.910Z",
"createdOn": "2025-03-01T08:21:14.910Z",
"details": {
"stripeProductId": "prod_ABC123"
},
"isVisible": true,
"isImported": false,
"countries": [
"US",
"IN"
],
"license": {
"enabled": true,
"activationLimit": 3,
"activationLimitEnabled": true,
"durationUnit": "YEAR",
"durationValue": 1,
"hasExpiry": true
},
"links": [
{
"name": "Product page",
"url": "https://example.com/product"
}
],
"files": [
{
"id": "bf9f0fe0-c9c0-436d-8811-e412d0365470",
"name": "custom-pricinig.png",
"ordering": 0,
"enabled": true,
"downloadUrl": "https://api.kelviq.com/api/v1/catalog/plans/10-july/file/bf9f0fe0-c9c0-436d-8811-e412d0365470/download/?token=Yjk5ZjBmZTAtYzljMC00MzZkLTg4MTEtZTQxMmQwMzY1NDcw%3A1v2Abc%3Ahash"
}
],
"ordering": 1
}Plans
Update a plan
Partial update. If the latest version is already published (isLatest=true), a new draft version is created automatically; otherwise the existing draft is mutated.
PATCH
/
catalog
/
plans
/
{identifier}
/
Update a plan
curl --request PATCH \
--url https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pro Monthly (v2)",
"description": "Updated description.",
"metadata": {},
"isVisible": true,
"license": {
"enabled": true,
"activationLimit": 3,
"activationLimitEnabled": true,
"durationUnit": "YEAR",
"durationValue": 1,
"hasExpiry": true
},
"links": [
{
"name": "Product page",
"url": "https://example.com/product"
}
],
"fileKeys": [
"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf"
]
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/"
payload = {
"name": "Pro Monthly (v2)",
"description": "Updated description.",
"metadata": {},
"isVisible": True,
"license": {
"enabled": True,
"activationLimit": 3,
"activationLimitEnabled": True,
"durationUnit": "YEAR",
"durationValue": 1,
"hasExpiry": True
},
"links": [
{
"name": "Product page",
"url": "https://example.com/product"
}
],
"fileKeys": ["tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf"]
}
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({
name: 'Pro Monthly (v2)',
description: 'Updated description.',
metadata: {},
isVisible: true,
license: {
enabled: true,
activationLimit: 3,
activationLimitEnabled: true,
durationUnit: 'YEAR',
durationValue: 1,
hasExpiry: true
},
links: [{name: 'Product page', url: 'https://example.com/product'}],
fileKeys: ['tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf']
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/', 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}/",
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([
'name' => 'Pro Monthly (v2)',
'description' => 'Updated description.',
'metadata' => [
],
'isVisible' => true,
'license' => [
'enabled' => true,
'activationLimit' => 3,
'activationLimitEnabled' => true,
'durationUnit' => 'YEAR',
'durationValue' => 1,
'hasExpiry' => true
],
'links' => [
[
'name' => 'Product page',
'url' => 'https://example.com/product'
]
],
'fileKeys' => [
'tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf'
]
]),
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}/"
payload := strings.NewReader("{\n \"name\": \"Pro Monthly (v2)\",\n \"description\": \"Updated description.\",\n \"metadata\": {},\n \"isVisible\": true,\n \"license\": {\n \"enabled\": true,\n \"activationLimit\": 3,\n \"activationLimitEnabled\": true,\n \"durationUnit\": \"YEAR\",\n \"durationValue\": 1,\n \"hasExpiry\": true\n },\n \"links\": [\n {\n \"name\": \"Product page\",\n \"url\": \"https://example.com/product\"\n }\n ],\n \"fileKeys\": [\n \"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf\"\n ]\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/plans/{identifier}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Pro Monthly (v2)\",\n \"description\": \"Updated description.\",\n \"metadata\": {},\n \"isVisible\": true,\n \"license\": {\n \"enabled\": true,\n \"activationLimit\": 3,\n \"activationLimitEnabled\": true,\n \"durationUnit\": \"YEAR\",\n \"durationValue\": 1,\n \"hasExpiry\": true\n },\n \"links\": [\n {\n \"name\": \"Product page\",\n \"url\": \"https://example.com/product\"\n }\n ],\n \"fileKeys\": [\n \"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/")
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 \"name\": \"Pro Monthly (v2)\",\n \"description\": \"Updated description.\",\n \"metadata\": {},\n \"isVisible\": true,\n \"license\": {\n \"enabled\": true,\n \"activationLimit\": 3,\n \"activationLimitEnabled\": true,\n \"durationUnit\": \"YEAR\",\n \"durationValue\": 1,\n \"hasExpiry\": true\n },\n \"links\": [\n {\n \"name\": \"Product page\",\n \"url\": \"https://example.com/product\"\n }\n ],\n \"fileKeys\": [\n \"tmp/9b1c8af2-3d4e-4f9a-8b2c-1f3e5a7b9d12/plan-terms.pdf\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "pro-monthly",
"name": "Pro Monthly",
"description": "Pro tier billed monthly.",
"product": {
"id": "0d65f7c0-7e91-4f56-9b32-13a9a6a7c1de",
"identifier": "pro-suite",
"name": "Pro Suite",
"description": "Premium tools for growing teams.",
"taxCode": "saas",
"createdBy": "Jane Smith",
"modifiedOn": "2025-04-12T08:21:14.910Z",
"images": [
{
"id": "1f7e1b54-7c6f-4d7e-9a4f-2c9c2d8b9d31",
"name": "hero-banner.png",
"image": "media/.../products/<id>/<uuid>/hero-banner.png",
"ordering": 0,
"thumbnail": true,
"enabled": true
}
]
},
"metadata": {},
"version": 3,
"isLatest": true,
"modifiedOn": "2025-04-12T08:21:14.910Z",
"createdOn": "2025-03-01T08:21:14.910Z",
"details": {
"stripeProductId": "prod_ABC123"
},
"isVisible": true,
"isImported": false,
"countries": [
"US",
"IN"
],
"license": {
"enabled": true,
"activationLimit": 3,
"activationLimitEnabled": true,
"durationUnit": "YEAR",
"durationValue": 1,
"hasExpiry": true
},
"links": [
{
"name": "Product page",
"url": "https://example.com/product"
}
],
"files": [
{
"id": "bf9f0fe0-c9c0-436d-8811-e412d0365470",
"name": "custom-pricinig.png",
"ordering": 0,
"enabled": true,
"downloadUrl": "https://api.kelviq.com/api/v1/catalog/plans/10-july/file/bf9f0fe0-c9c0-436d-8811-e412d0365470/download/?token=Yjk5ZjBmZTAtYzljMC00MzZkLTg4MTEtZTQxMmQwMzY1NDcw%3A1v2Abc%3Ahash"
}
],
"ordering": 1
}Click the base URL in the API playground and select the Sandbox host for test data or the Production host for live data. Use credentials from the same environment.
Authorizations
Query Parameters
Body
application/json
Patch payload for a plan. If applied to a published (is_latest) plan, a new version is created automatically.
Response
Updated plan.
A versioned plan attached to a product. Updates create new versions; only the published version is is_latest=true.