On this page
No Headings
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
readwriteThe unique code of the plan
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api-m.sandbox.paypal.com/v1/commerce/billing/plans/string/entitlements" \ -H "Content-Type: application/json" \ -d '{ "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"
]
}
}
]
}
]
}{
"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"
}