Update a subscription
Use this call to make the following kinds of changes to a subscription:
- Add a note
- Change the renewal term or auto-renewal flag
- Change the term length or change between evergreen and termed
- Add a new product rate plan
- Remove an existing subscription rate plan
- Change the quantity or price of an existing subscription rate plan
- Change rate plans - to replace the existing rate plans in a subscription with other rate plans. Changing rate plans is currently not supported for the <a href="https://docs.zuora.com?resourceId=revenue-billing-integration" target="_blank">Billing - Revenue Integration</a> feature. When Billing - Revenue Integration is enabled, changing rate plans will no longer be applicable in Zuora Billing.
Notes:
-
The "Update a subscription" call creates a new subscription object that has a new version number and to which the subscription changes are applied. The new subscription object has the same subscription name but a new, different, subscription ID. The Status field of the new subscription object will be set to Active unless the change applied was a cancelation or suspension in which case the status reflects that. The Status field of the originating subscription object changes from Active to Expired. A status of Expired does not imply that the subscription itself has expired or ended, merely that this subscription object is no longer the most recent.
-
In one request, this call can make:
- Up to 9 combined add, update, and remove changes
- No more than 1 change to terms & conditions
-
Updates are performed in the following sequence:
- First change the notes on the existing subscription, if requested.
- Then change the terms and conditions, if requested.
- Then perform the remaining amendments based upon the effective dates specified. If multiple amendments have the same contract-effective dates, then execute adds before updates, and updates before removes.
-
The update operation is atomic. If any of the updates fails, the entire operation is rolled back.
-
The response of the Update Subscription call is based on the REST API minor version you set in the request header. The response structure might be different if you use different minor version numbers.
-
If you have the Invoice Settlement feature enabled, it is best practice to set the Zuora-Version parameter to 211.0 or later available versions. Otherwise, an error occurs.
Override a Tiered Price
There are two ways you override a tiered price:
- Override a specific tier number. For example: tiers[{tier:1,price:8},{tier:2,price:6}]
- Override the entire tier structure. For example: tiers[{tier:1,price:8,startingUnit:1,endingUnit:100,priceFormat:"FlatFee"}, {tier:2,price:6,startingUnit:101,priceFormat:"FlatFee"}]
If you just override a specific tier, do not include the startingUnit field in the request.
Path parameters
Subscription number or ID. ID can be the latest version or any history version of ID.
- To make sure you update the last version of the subscription, use one of the following operations to retrieve the last version of ID:
- List subscriptions by account key
- Retrieve a subscription by key by using the subscription number as the subscription-key
- If you want to use any history version of ID, the STABLE_ID_PUBLIC_API permission must be enabled. Submit a request at Zuora Global Support to enable the permission. To retrieve a history version of ID, use the Retrieve a subscription by key and version operation.
Headers
Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.
If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.
Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.
The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').
An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
Comma separated IDs. If you have <a href="https://docs.zuora.com/en/zuora-platform/organization-and-entity-management/multi-org/overview-of-multi-org" target="_blank">Zuora Multi-Org</a> enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header.
The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
The minor API version.
For a list of available minor versions, see API upgrades.
Request body
Example request
{
"autoRenew": true
}Response
OK