Update subscription entitlements
curl --request PATCH \
--url https://api-m.sandbox.paypal.com/v1/commerce/billing/subscriptions/{external_subscription_id}/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entitlements": [
{
"feature_code": "seats",
"feature_privilege_values": {
"max": 250,
"max_admins": 25,
"guest_access": true
}
},
{
"feature_code": "sso",
"feature_privilege_values": {
"provider": "saml"
}
}
]
}
'{
"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": 250,
"plan_value": 100,
"override_value": 250
},
{
"code": "max_admins",
"name": "Max Admins",
"value_type": "INTEGER",
"value": 25,
"plan_value": 10,
"override_value": 25
},
{
"code": "root",
"name": "Allow root user",
"value_type": "BOOLEAN",
"value": true,
"plan_value": true,
"override_value": null
},
{
"code": "guest_access",
"name": "Allow guest access",
"value_type": "BOOLEAN",
"value": true,
"plan_value": false,
"override_value": true
}
]
},
{
"feature_code": "sso",
"name": "Single Sign-On",
"description": "SSO authentication configuration",
"feature_privileges": [
{
"code": "enabled",
"name": "SSO Enabled",
"value_type": "BOOLEAN",
"value": true,
"plan_value": true,
"override_value": null
},
{
"code": "provider",
"name": "SSO Provider",
"value_type": "SELECT",
"value": "saml",
"plan_value": "google",
"override_value": "saml",
"config": {
"select_options": [
"google",
"okta",
"azure",
"saml"
]
}
}
]
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "dc99e3955cdd8",
"details": [
{
"field": "/email",
"value": "abc",
"location": "body",
"issue": "INVALID_PARAMETER_VALUE",
"description": "The value of a field does not conform to the expected format."
}
]
}{
"name": "<string>",
"debug_id": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"value": "<string>",
"location": "<string>",
"issue": "<string>",
"description": "<string>"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "90957fca61718",
"details": [
{
"field": "/email",
"value": "sdfwdj@sdfs.com",
"location": "body",
"issue": "UNSUPPORTED_EMAIL",
"description": "The email provided is not supported."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error has occurred.",
"debug_id": "90957fca61718"
}Update subscription entitlements
This endpoint performs partial updates to subscription entitlements. The entitlements in the request are combined with existing entitlements associated with the subscription (even the ones inherited from plan) that are not mentioned in the request.
PATCH
/
subscriptions
/
{external_subscription_id}
/
entitlements
Update subscription entitlements
curl --request PATCH \
--url https://api-m.sandbox.paypal.com/v1/commerce/billing/subscriptions/{external_subscription_id}/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entitlements": [
{
"feature_code": "seats",
"feature_privilege_values": {
"max": 250,
"max_admins": 25,
"guest_access": true
}
},
{
"feature_code": "sso",
"feature_privilege_values": {
"provider": "saml"
}
}
]
}
'{
"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": 250,
"plan_value": 100,
"override_value": 250
},
{
"code": "max_admins",
"name": "Max Admins",
"value_type": "INTEGER",
"value": 25,
"plan_value": 10,
"override_value": 25
},
{
"code": "root",
"name": "Allow root user",
"value_type": "BOOLEAN",
"value": true,
"plan_value": true,
"override_value": null
},
{
"code": "guest_access",
"name": "Allow guest access",
"value_type": "BOOLEAN",
"value": true,
"plan_value": false,
"override_value": true
}
]
},
{
"feature_code": "sso",
"name": "Single Sign-On",
"description": "SSO authentication configuration",
"feature_privileges": [
{
"code": "enabled",
"name": "SSO Enabled",
"value_type": "BOOLEAN",
"value": true,
"plan_value": true,
"override_value": null
},
{
"code": "provider",
"name": "SSO Provider",
"value_type": "SELECT",
"value": "saml",
"plan_value": "google",
"override_value": "saml",
"config": {
"select_options": [
"google",
"okta",
"azure",
"saml"
]
}
}
]
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "dc99e3955cdd8",
"details": [
{
"field": "/email",
"value": "abc",
"location": "body",
"issue": "INVALID_PARAMETER_VALUE",
"description": "The value of a field does not conform to the expected format."
}
]
}{
"name": "<string>",
"debug_id": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"value": "<string>",
"location": "<string>",
"issue": "<string>",
"description": "<string>"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "90957fca61718",
"details": [
{
"field": "/email",
"value": "sdfwdj@sdfs.com",
"location": "body",
"issue": "UNSUPPORTED_EMAIL",
"description": "The email provided is not supported."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error has occurred.",
"debug_id": "90957fca61718"
}Authorizations
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Path Parameters
The external ID of the subscription
Body
application/json
Show child attributes
Show child attributes
Response
Entitlements updated successfully
List of effective entitlements for the subscription, showing both plan values and subscription-specific overrides
Show child attributes
Show child attributes
Was this page helpful?
⌘I