| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/tenant/how-to/manage-subscriptions/ | [Back] [Original] |
Once your customer has a zone provisioned, you can add zone and account-level subscriptions.
To create a zone subscription, typically used to upgrade a zone's plan from PARTNERS_FREE to a paid Zone plan, send a POST request to the /zones/{zone_id}/subscription endpoint and include the following values:
rate_plan object
component_values array
page_rules.frequency string
"monthly").curl 'https://api.cloudflare.com/client/v4/zones/{zone_id}/subscription' \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{
"rate_plan": {
"id": "<RATE_PLAN>"
},
"frequency": "annual"
}'
Request (with `component_values`)bashcurl 'https://api.cloudflare.com/client/v4/zones/{zone_id}/subscription' \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{
"rate_plan": {
"id": "PARTNERS_BIZ"
},
"component_values": [
{
"name": "page_rules",
"value": 50
}
]
}
To get the details of a zone subscription, send a GET request to the /zones/<ZONE_ID>/subscription endpoint.
To update a subscription on a zone, typically used to update an existing subscription's 'component_values' or to downgrade a zone's subscription, send a PUT request to the /zones/<ZONE_ID>/subscription endpoint.
Depending on your agreement, you may be allowed to resell other add-on services. These are provisioned as account-level subscriptions.
To create an account subscription, send a POST request to the /accounts/{account_id}/subscriptions endpoint and include the following values:
rate_plan object
component_values array
frequency string
"monthly").curl 'https://api.cloudflare.com/client/v4/accounts/{account_id}/subscriptions' \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{
"rate_plan": {
"id": "<RATE_PLAN_NAME>"
}
}'
To get all subscriptions for an account, send a GET request to the /accounts/<ACCOUNT_ID>/subscriptions endpoint.
To update a subscription on an account, send a PUT request to the /accounts/<ACCOUNT_ID>/subscriptions/<SUBSCRIPTION_ID> endpoint.
To delete a subscription on an account, send a DELETE request to the /accounts/<ACCOUNT_ID>/subscriptions/<SUBSCRIPTION_ID> endpoint.
| Web Proxy Viewer | New URL | Original Page |