POST
/
subscriptions
/
{subscriptionId}
/
entitlements
curl -X POST \
 /subscriptions/{subscriptionId}/entitlements \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "feature": "https:\/\/example.com\/",
    "value": "",
    "validFrom": "",
    "validUntil": ""
}'
{
  "id": "<string>",
  "subscriptionItem": {
    "id": "01F9ZQZJZJQZJZJZJZJZJZJZJZ",
    "name": "Fitness M",
    "description": "Everything included",
    "furtherInformation": "Additional agreements: The contract includes a free drink flatrate.",
    "status": "active",
    "subscriptionId": "<string>"
  },
  "feature": {
    "id": "feature-1",
    "name": "number of users",
    "description": "This feature allows you to manage the number of users in your account.",
    "status": "active",
    "type": "switch",
    "config": [
      {
        "value": "<string>",
        "label": "<string>"
      }
    ],
    "unit": "<string>"
  },
  "value": "true",
  "validFrom": "2023-11-07T05:31:56Z",
  "validUntil": "2023-11-07T05:31:56Z",
  "active": true
}

Authorizations

Authorization
string
header
required

Value for the Authorization header parameter.

Path Parameters

subscriptionId
string
required

Entitlement identifier

Body

The new Entitlement resource
feature
string | null
required

The feature which should be assigned. Must be in "active" state.

Example:

"https://example.com/"

value
string | null
required

The value of the feature

validFrom
string | null

The date from which the feature is valid

validUntil
string | null

The date until which the feature is valid

Response

201
application/json
Entitlement resource created

Get all entitlements of a subscription

id
string
subscriptionItem
object | null
feature
object | null
value
string

The value of the entitlement. Can be a boolean (switch), a string (custom), a number (quantity) or a custom number (range).

Example:

"true"

validFrom
string | null

The date from which the entitlement is valid

validUntil
string | null

The date until which the entitlement is valid

active
boolean