Skip to main content
PATCH
/
plans
/
{code}
/
entitlements
Partial update of entitlements
curl --request PATCH \
  --url https://api-m.paypal.com/v1/commerce/billing/plans/{code}/entitlements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "entitlements": [
    {
      "feature_code": "seats",
      "feature_privilege_values": {
        "max": 150,
        "max_admins": 15,
        "root": true,
        "guest_access": false,
        "provider": "google"
      }
    },
    {
      "feature_code": "api_access",
      "feature_privilege_values": {
        "rate_limit": 25000,
        "endpoints": "all"
      }
    }
  ]
}'
{
  "entitlements": [
    {
      "feature_code": "seats",
      "name": "Number of seats",
      "description": "Number of users of the account",
      "feature_privileges": [
        {
          "code": "max",
          "name": "Maximum",
          "value_type": "INTEGER",
          "value": 150
        },
        {
          "code": "max_admins",
          "name": "Max Admins",
          "value_type": "INTEGER",
          "value": 15
        },
        {
          "code": "root",
          "name": "Allow root user",
          "value_type": "BOOLEAN",
          "value": true
        }
      ]
    },
    {
      "feature_code": "api_access",
      "name": "API Access",
      "description": "Access to REST API endpoints",
      "feature_privileges": [
        {
          "code": "rate_limit",
          "name": "API Rate Limit",
          "value_type": "INTEGER",
          "value": 25000
        },
        {
          "code": "endpoints",
          "name": "Available Endpoints",
          "value_type": "SELECT",
          "value": "all",
          "config": {
            "select_options": [
              "basic",
              "standard",
              "premium",
              "all"
            ]
          }
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.

Path Parameters

code
string
required

The unique code of the plan

Body

application/json
entitlements
object[]
required

Response

Entitlements updated successfully

entitlements
object[]
required

List of entitlements associated with the plan

I