Update plan entitlement
curl --request PATCH \
--url https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"details": {
"value": 10000,
"hasUnlimitedUsage": false,
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"rollover": {},
"usageAlerts": {
"enabled": true,
"thresholds": [
75,
90
],
"thresholdType": "PERCENTAGE"
},
"hardLimit": false,
"isInherited": false,
"isValueOverridden": false
}
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/"
payload = { "details": {
"value": 10000,
"hasUnlimitedUsage": False,
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"rollover": {},
"usageAlerts": {
"enabled": True,
"thresholds": [75, 90],
"thresholdType": "PERCENTAGE"
},
"hardLimit": False,
"isInherited": False,
"isValueOverridden": False
} }
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({
details: {
value: 10000,
hasUnlimitedUsage: false,
reset: 'EVERY_MONTH',
resetTime: 'BEGINNING_OF_PERIOD',
rollover: {},
usageAlerts: {enabled: true, thresholds: [75, 90], thresholdType: 'PERCENTAGE'},
hardLimit: false,
isInherited: false,
isValueOverridden: false
}
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/', 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}/features/{feature_id}/",
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([
'details' => [
'value' => 10000,
'hasUnlimitedUsage' => false,
'reset' => 'EVERY_MONTH',
'resetTime' => 'BEGINNING_OF_PERIOD',
'rollover' => [
],
'usageAlerts' => [
'enabled' => true,
'thresholds' => [
75,
90
],
'thresholdType' => 'PERCENTAGE'
],
'hardLimit' => false,
'isInherited' => false,
'isValueOverridden' => false
]
]),
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}/features/{feature_id}/"
payload := strings.NewReader("{\n \"details\": {\n \"value\": 10000,\n \"hasUnlimitedUsage\": false,\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"hardLimit\": false,\n \"isInherited\": false,\n \"isValueOverridden\": false\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}/features/{feature_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"details\": {\n \"value\": 10000,\n \"hasUnlimitedUsage\": false,\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"hardLimit\": false,\n \"isInherited\": false,\n \"isValueOverridden\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/")
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 \"details\": {\n \"value\": 10000,\n \"hasUnlimitedUsage\": false,\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"hardLimit\": false,\n \"isInherited\": false,\n \"isValueOverridden\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"details": {
"value": 20000,
"hasUnlimitedUsage": false
}
}Plan Entitlements
Update plan entitlement
Updates only the details (value, reset, hardLimit, rollover, etc.) of one feature entitlement on the plan. A new draft version is created if the latest is published.
PATCH
/
catalog
/
plans
/
{identifier}
/
features
/
{feature_id}
/
Update plan entitlement
curl --request PATCH \
--url https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"details": {
"value": 10000,
"hasUnlimitedUsage": false,
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"rollover": {},
"usageAlerts": {
"enabled": true,
"thresholds": [
75,
90
],
"thresholdType": "PERCENTAGE"
},
"hardLimit": false,
"isInherited": false,
"isValueOverridden": false
}
}
'import requests
url = "https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/"
payload = { "details": {
"value": 10000,
"hasUnlimitedUsage": False,
"reset": "EVERY_MONTH",
"resetTime": "BEGINNING_OF_PERIOD",
"rollover": {},
"usageAlerts": {
"enabled": True,
"thresholds": [75, 90],
"thresholdType": "PERCENTAGE"
},
"hardLimit": False,
"isInherited": False,
"isValueOverridden": False
} }
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({
details: {
value: 10000,
hasUnlimitedUsage: false,
reset: 'EVERY_MONTH',
resetTime: 'BEGINNING_OF_PERIOD',
rollover: {},
usageAlerts: {enabled: true, thresholds: [75, 90], thresholdType: 'PERCENTAGE'},
hardLimit: false,
isInherited: false,
isValueOverridden: false
}
})
};
fetch('https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/', 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}/features/{feature_id}/",
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([
'details' => [
'value' => 10000,
'hasUnlimitedUsage' => false,
'reset' => 'EVERY_MONTH',
'resetTime' => 'BEGINNING_OF_PERIOD',
'rollover' => [
],
'usageAlerts' => [
'enabled' => true,
'thresholds' => [
75,
90
],
'thresholdType' => 'PERCENTAGE'
],
'hardLimit' => false,
'isInherited' => false,
'isValueOverridden' => false
]
]),
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}/features/{feature_id}/"
payload := strings.NewReader("{\n \"details\": {\n \"value\": 10000,\n \"hasUnlimitedUsage\": false,\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"hardLimit\": false,\n \"isInherited\": false,\n \"isValueOverridden\": false\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}/features/{feature_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"details\": {\n \"value\": 10000,\n \"hasUnlimitedUsage\": false,\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"hardLimit\": false,\n \"isInherited\": false,\n \"isValueOverridden\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.kelviq.com/api/v1/catalog/plans/{identifier}/features/{feature_id}/")
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 \"details\": {\n \"value\": 10000,\n \"hasUnlimitedUsage\": false,\n \"reset\": \"EVERY_MONTH\",\n \"resetTime\": \"BEGINNING_OF_PERIOD\",\n \"rollover\": {},\n \"usageAlerts\": {\n \"enabled\": true,\n \"thresholds\": [\n 75,\n 90\n ],\n \"thresholdType\": \"PERCENTAGE\"\n },\n \"hardLimit\": false,\n \"isInherited\": false,\n \"isValueOverridden\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"details": {
"value": 20000,
"hasUnlimitedUsage": false
}
}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.
Feature identifier (slug, not UUID).
Body
application/json
Updates only the entitlement details for a single feature on the plan.
Per-feature entitlement configuration on a plan. Shape varies by feature_type.
Show child attributes
Show child attributes
Response
Entitlement updated.
⌘I