Skip to main content
PATCH
/
subscriptions
/
entitlements
/
{id}
Update an entitlement
curl --request PATCH \
  --url https://api.billing.io/v1/subscriptions/entitlements/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "value_boolean": true,
  "value_numeric": 123,
  "value_string": "<string>"
}
'
{
  "id": "ent_1a2b3c4d5e",
  "org_id": "<string>",
  "plan_id": "<string>",
  "feature_key": "<string>",
  "value_boolean": true,
  "value_numeric": 123,
  "value_string": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
Update an entitlement’s value.
curl -X PATCH https://api.billing.io/v1/subscriptions/entitlements/ent_a1b2c3d4e5f6 \
  -H "Authorization: Bearer $BILLING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "value_numeric": 50000 }'

Authorizations

Authorization
string
header
required

Use your secret API key as a Bearer token. Keys are prefixed: sk_live_ (production) or sk_test_ (sandbox).

Path Parameters

id
string
required

The entitlement identifier (prefixed ent_)

Body

application/json
value_type
enum<string>

The data type of the entitlement value

Available options:
boolean,
numeric,
string
value_boolean
boolean | null

Boolean value (when value_type is boolean)

value_numeric
number | null

Numeric value (when value_type is numeric)

value_string
string | null

String value (when value_type is string)

Response

Entitlement updated

id
string

Unique identifier (prefixed ent_)

Example:

"ent_1a2b3c4d5e"

org_id
string

Organization identifier

plan_id
string

Subscription plan identifier

feature_key
string

Unique key identifying the feature

value_type
enum<string>

The data type of the entitlement value

Available options:
boolean,
numeric,
string
value_boolean
boolean | null

Boolean value (when value_type is boolean)

value_numeric
number | null

Numeric value (when value_type is numeric)

value_string
string | null

String value (when value_type is string)

environment
enum<string>
Available options:
live,
sandbox
created_at
string<date-time>
updated_at
string<date-time>