Update subscription
You can modify the auto-renewal configuration and add a flexible discount to the subscription by using the PATCH /v3/customers/<customer-id>/subscriptions/<subscription-id> endpoint.
/v3/customers/<customer-id>/subscriptions/<subscription-id>Usage instructions
Ensure that you are aware of the following before updating the auto-renewal configuration:
-
The
autoRenewalpreferences can only be updated for an active subscription. -
The
autoRenewalobject is only evaluated at the renewal time, which is defined in thecotermDateparameter. -
If the
renewalQuantityis higher thancurrentQuantityat the renewal time, then the additional licenses will be included in renewal. If it is lower, then licenses will be removed at renewal. -
The
flexDiscountCodesparameter indicates the flexible discounts applicable for the subscription. For more information, see Update a subscription with flexible discount codes and Remove flexible discount from a subscription. -
The following three states are possible for autorenewal:
- Disabled <br /> You can achieve this by setting
enabledtofalse. - Enabled with renewal quantity <br />If the
renewalQuantityhas been explicitly set, therenewalQuantitywill remain unchanged by additional orders or cancellations until subscription becomes inactive. - Enabled without explicit renewal quantity <br />In this case, all active licenses in the subscription will be renewed. The
renewalQuantitywill still be returned with the number of purchased licenses.
- Disabled <br /> You can achieve this by setting
Restrictions:
-
Maximum renewalQuantity:
- 10,000 for Team products
- 200,000 for Enterprise products (not supported yet)
Request header
Bearer <token>Request Body
CompanyProfile object with optional externalReferenceId:
{
"autoRenewal": {
"enabled": true,
"renewalQuantity": 7,
"flexDiscountCodes": ["ABCD-XV54-HG34-78YT"]
}
}
Response body
{
"subscriptionId": "cc8efgh8bc4354a4b38006c87804ceNA",
"currentQuantity": 0,
"offerId": "65304470CA01012",
"autoRenewal": {
"enabled": true,
"renewalQuantity": 7,
"flexDiscountCodes": ["ABCD-XV54-HG34-78YT"]
},
"renewalDate": "2026-05-20",
"creationDate": "2025-10-20T22:49:55Z",
"status": "1009",
"links": {
"self": {
"uri": "/v3/customers/P1005053489/subscriptions/cc8efgh8bc4354a4b38006c87804ceNA",
"method": "GET",
"headers": []
}
}
}
Note: Any contacts specified in this call will receive the admin welcome email. This can be resend if an end-user did not receive it.
HTTP status codes
The following sections explain how to modify a subscription with Flexible Discount Codes and High Growth Offers.
Update a subscription with flexible discount code
Use the PATCH /v3/customers/<customer-id>/subscriptions/<subscription-id> API with flexDiscountCodes in the request to update a subscription with the corresponding flexible discount.
Note: Flexible discount codes are not validated while updating a subscription. Verification of customer eligibility occurs exclusively through the Preview Renewal API.
Request
The flexDiscountCodes parameter indicates the flexible discounts applicable for the subscription.
{
"autoRenewal": {
"enabled": true, // If Auto Renew is OFF, it must be turned ON to apply PromoCode. If it is already ON, this field is OPTIONAL.
"flexDiscountCodes": ["ABCD-XV54-HG34-78YT"]
}
}
Response
{
"subscriptionId": "8675309",
"currentQuantity": 10,
"usedQuantity": 2,
"offerId": "65304470CA01012",
"autoRenewal": {
"enabled": true,
"renewalQuantity": 5,
"flexDiscountCodes": ["ABCD-XV54-HG34-78YT"]
},
"renewalDate": "2020-05-20",
"creationDate": "2019-05-20T22:49:55Z",
"deploymentId": "12345",
"currencyCode": "USD",
"status": "1000",
"links": {
"self": {}
}
}
Remove a flexible discount from a subscription
Use the PATCH /v3/customers/<customer-id>/subscriptions/<subscription-id> with the query parameter reset-flex-discount-codes=true to remove a flexible discount from a subscription
Request
- Request URL:
PATCH /v3/customers/<customer-id>/subscriptions/<subscription-id>?reset-flex-discount-codes=true - Request body: None.
Response
{
"subscriptionId": "8675309",
"currentQuantity": 10,
"usedQuantity": 2,
"offerId": "65304470CA01012",
"autoRenewal": {
"enabled": true,
"renewalQuantity": 5
},
"renewalDate": "2020-05-20",
"creationDate": "2019-05-20T22:49:55Z",
"deploymentId": "12345",
"currencyCode": "USD",
"status": "1000",
"links": {
"self": {}
}
}
Update a subscription with High Growth Offers
Use the PATCH /v3/customers/{customer-id}/subscriptions/{sub-id}?reset-renewal-code=false API to update the renewal preferences for the customer's subscription with the High Growth Offer details.
For more information, see Manage High Growth Offer using APIs.