Entitlements
Update an entitlement
Customers
Wallets
Invoices
Entitlements
Environments
Events
Features
Payments
Integrations
Subscriptions
Tenants
Users
Entitlements
Update an entitlement
Update an entitlement with the specified configuration
PUT
/
entitlements
/
{id}
curl --request PUT \
--url https://api.cloud.flexprice.io/v1/entitlements/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"is_enabled": true,
"is_soft_limit": true,
"static_value": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}'
{
"created_at": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"feature": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"feature_id": "<string>",
"feature_type": "metered",
"id": "<string>",
"is_enabled": true,
"is_soft_limit": true,
"plan": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"entitlements": [
{}
],
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"name": "<string>",
"prices": [
{
"amount": 123,
"billing_cadence": "RECURRING",
"billing_model": "FLAT_FEE",
"billing_period": "MONTHLY",
"billing_period_count": 123,
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"description": "<string>",
"display_amount": "<string>",
"environment_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"plan_id": "<string>",
"status": "published",
"tenant_id": "<string>",
"tier_mode": "VOLUME",
"tiers": [
{
"flat_amount": 123,
"unit_amount": 123,
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "<string>"
},
"trial_period": 123,
"type": "USAGE",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"plan_id": "<string>",
"static_value": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Entitlement ID
Body
application/json
Entitlement configuration
The body is of type object
.
Response
200
application/json
OK
The response is of type object
.
curl --request PUT \
--url https://api.cloud.flexprice.io/v1/entitlements/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"is_enabled": true,
"is_soft_limit": true,
"static_value": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}'
{
"created_at": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"feature": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"feature_id": "<string>",
"feature_type": "metered",
"id": "<string>",
"is_enabled": true,
"is_soft_limit": true,
"plan": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"entitlements": [
{}
],
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"name": "<string>",
"prices": [
{
"amount": 123,
"billing_cadence": "RECURRING",
"billing_model": "FLAT_FEE",
"billing_period": "MONTHLY",
"billing_period_count": 123,
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"description": "<string>",
"display_amount": "<string>",
"environment_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"plan_id": "<string>",
"status": "published",
"tenant_id": "<string>",
"tier_mode": "VOLUME",
"tiers": [
{
"flat_amount": 123,
"unit_amount": 123,
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "<string>"
},
"trial_period": 123,
"type": "USAGE",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"plan_id": "<string>",
"static_value": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}