Retrieve a subscription by key
Authentication
Use Bearer {{token}} in the Authorization header for authentication.
Path parameters
Possible values are:
- a subscription number
- a subscription ID
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 Zuora Multi-Org 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.
Query parameters
The segmented rate plan charges. When an amendment results in a change to a charge, Zuora creates a segmented rate plan charge. Use this field to track segment charges.
Possible values are:
-
last-segment: (Default) The last rate plan charge on the subscription, that is, the last segmented rate plan charge with the maximum start and end dates.
-
current-segment: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date <= effectiveEndDate).
-
all-segments: All the segmented charges. The
ratePlans>ratePlanCharges>chargeSegmentsnested field is returned in the response. ThechargeSegmentsfield contains an array of the charge information for all the charge segments. -
specific-segment: Use this value together with
as-of-date={specificDate}. The segmented charge that is active on a date you specified ((specific date = effectiveStartDate) OR (effectiveStartDate < specific date < effectiveEndDate)) is returned. The format of the date isyyyy-mm-dd.
The date for charge-detail. It is only available when charge-detail is specific-segment.
The date should be in the format YYYY-MM-DD.
When a rate plan charge has multiple segments, the last segment is returned by default.
If this charge has been removed before the start date of the last segment (the latest one), with this parameter set to true, this charge is excluded from the response;
If all the charges under a rate plan are excluded, the rate plan is not returned in the response.
The default value is false.
If the getDetailedMetrics field is true, contractedNetMrr, asOfDayGrossMrr, asOfDayNetMrr, and netTotalContractedValue will be in the response.
The default value is false.
The date for detailed metrics. Only available when getDetailedMetrics is true.
The date should be in the format YYYY-MM-DD.
The default value is the current date.
Retrieves the invoice owner of a subscription. If this parameter is set to true, the invoice owner account details invoiceOwnerAccountDetails will be in the response.
Retrieves the owner of a subscription. If this parameter is set to true, the subscription owner account details accountOwnerDetails will be in the response.
Response headers
This header is returned if you specify the Accept-Encoding: gzip request header and the response contains over 1000 bytes of data.
Note that only the following MIME types support gzipped responses:
application/jsonapplication/xmltext/htmltext/csvtext/plain
The request limit quota for the time window closest to exhaustion. See rate limits for more information.
The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.
The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.
The type of the concurrency limit, which can be Default, High-volume transactions, or Object Query.
For more information, see Concurrent request limits.
The total number of the permitted concurrent requests.
For more information, see Concurrent request limits.
The remaining number of the permitted concurrent requests.
For more information, see Concurrent request limits.
Response
If true, the subscription automatically renews at the end of the term. Default is false.
Container for bill-to contact information.
Notes:
- If the bill-to contact is specified on the subscription, its value is populated in this field. For more information about how to specify the bill-to contact on the subscription, see Overview of Flexible Billing Attributes.
- If the bill-to contact is not specified on the subscription, the bill-to contact on the invoice owner account will be populated in this field.
The reason for a subscription cancellation copied from the changeReason field of a Cancel Subscription order action.
This field contains valid value only if a subscription is cancelled through the Orders UI or API. Otherwise, the value for this field will always be null.
Effective contract date for this subscription, as yyyy-mm-dd.
Monthly recurring revenue of the subscription inclusive of all the discounts applicable, including the fixed-amount discounts and percentage discounts.
Monthly recurring revenue of the subscription inclusive of all the discounts applicable, including the fixed-amount discounts and percentage discounts as of specified day.
Total contracted value of the subscription inclusive of all the discounts applicable, including the fixed-amount discounts and percentage discounts.
The currency of the subscription. Note: This field is available only if you have the Multiple Currencies feature enabled.
The period type for the current subscription term.
Values are:
Month(default)YearDayWeek
The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
An enum field on the Subscription object to indicate the name of a third-party store. This field is used to represent subscriptions created through third-party stores.
The period type for the first subscription term.
Values are:
Month(default)YearDayWeek
The number of the invoice group associated with the subscription.
The value of this field is null if you have the Flexible Billing Attributes feature disabled.
The ID of the invoice schedule associated with the subscription.
If multiple invoice schedules are created for different terms of a subscription, this field stores the latest invoice schedule.
Note: This field is available only if you have the Billing Schedule feature enabled.
Separates a single subscription from other subscriptions and creates an invoice for the subscription.
If the value is true, the subscription is billed separately from other subscriptions. If the value is false, the subscription is included with other subscriptions in the account invoice.
The ID of the invoice template associated with the subscription.
Note:
- If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body and the value of this field is
nullin the response body. - If you have the Flexible Billing Attributes feature enabled, and you do not specify this field in the request or you select Default Template from Account for this field during subscription creation, the value of this field is automatically set to
nullin the response body.
The name of the invoice template associated with the subscription.
Note:
- If you have the Flexible Billing Attributes feature disabled, the value of this field is
nullin the response body. - If you have the Flexible Billing Attributes feature enabled, and you do not specify the
invoiceTemplateIdfield in the request or you select Default Template from Account for theinvoiceTemplateIdfield during subscription creation, the value of theinvoiceTemplateNamefield is automatically set tonullin the response body.
If true, the current subscription object is the latest version.
The last booking date of the subscription object. This field is writable only when the subscription is newly created as a first version subscription. You can override the date value when creating a subscription through the Subscribe and Amend API or the subscription creation UI (non-Orders). Otherwise, the default value today is set per the user’s timezone. The value of this field is as follows:
- For a new subscription created by the Subscribe and Amend APIs, this field has the value of the subscription creation date.
- For a subscription changed by an amendment, this field has the value of the amendment booking date.
- For a subscription created or changed by an order, this field has the value of the order date.
The order number of the order in which the changes on the subscription are made.
Note: This field is only available if you have the Order Metrics feature enabled. If you wish to have access to the feature, submit a request at Zuora Global Support. We will investigate your use cases and data before enabling this feature for you.
The organization that this object belongs to.
Note: This field is available only when the Multi-Org feature is enabled.
The original list price is the price of a product or service at which it is listed for sale by a manufacturer or retailer.
Note: This field applies to the following charges in a subscription created through an order:
oneTimeFlatFeeoneTimePerUnitrecurringFlatFeerecurringPerUnitusageFlatFeeusagePerUnitusageOverageusageTieredWithOverage
The name of the payment term associated with the subscription. For example, Net 30. The payment term determines the due dates of invoices.
Note:
- If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body and the value of this field is
nullin the response body. - If you have the Flexible Billing Attributes feature enabled, and you do not specify this field in the request or you select Default Term from Account for this field during subscription creation, the value of this field is automatically set to
nullin the response body.
Specifies whether a termed subscription will remain TERMED or change to EVERGREEN when it is renewed.
Values are:
RENEW_WITH_SPECIFIC_TERM(default)RENEW_TO_EVERGREEN
The period type for the subscription renewal term.
Values are:
Month(default)YearDayWeek
An auto-generated decimal value uniquely tagged with a subscription. The value always contains one decimal place, for example, the revision of a new subscription is 1.0. If a further version of the subscription is created, the revision value will be increased by 1. Also, the revision value is always incremental regardless of deletion of subscription versions.
The ID of the sequence set associated with the subscription.
Note:
- If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body and the value of this field is
nullin the response body. - If you have the Flexible Billing Attributes feature enabled, and you do not specify this field in the request or you select Default Set from Account for this field during subscription creation, the value of this field is automatically set to
nullin the response body.
The ID of the communication profile associated with the subscription.
Note: This field is available in the request body only if you have the Flexible Billing Attributes
feature turned on. The value is null in the response body without this feature turned on.
The name of the sequence set associated with the subscription.
Note:
- If you have the Flexible Billing Attributes feature disabled, the value of this field is
nullin the response body. - If you have the Flexible Billing Attributes feature enabled, and you do not specify the
sequenceSetIdfield in the request or you select Default Template from Account for thesequenceSetIdfield during subscription creation, the value of thesequenceSetNamefield is automatically set tonullin the response body.
The date on which the services or products within a subscription have been activated and access has been provided to the customer, as yyyy-mm-dd
Container for ship-to contact information.
Notes:
- If the ship-to contact is specified on the subscription, its value is populated in this field. For more information about how to specify the ship-to contact on the subscription, see Overview of Flexible Billing Attributes.
- If the ship-to contact is not specified on the subscription, the ship-to contact on the subscription owner account will be populated in this field.
Container for sold-to contact information.
Notes:
- If the sold-to contact is specified on the subscription, its value is populated in this field. For more information about how to specify the sold-to contact on the subscription, see Overview of Flexible Billing Attributes.
- If the sold-to contact is not specified on the subscription, the sold-to contact on the subscription owner account will be populated in this field.
Subscription status; possible values are:
DraftPending ActivationPending AcceptanceActiveCancelledSuspended
The date when the subscription term ends, where the subscription ends at midnight the day before.
For example, if the subscriptionEndDate is 12/31/2016, the subscriptions ends at midnight (00:00:00 hours) on 12/30/2016.
This date is the same as the term end date or the cancelation date, as appropriate.
Returns true if the request was processed successfully.
Date the subscription term ends. If the subscription is evergreen, this is null or is the cancellation date (if one has been set).
Possible values are: TERMED, EVERGREEN.
Total number of charge segments in this subscription, including segments from removed charges. This value is the sum of the segments for all charges under the subscription.
Note: The default value is 0 if there are no charge segments.
Container for basic information about the account.
Notes:
- In the “Retrieve an order” operation, if the
getAccountDetailsquery parameter is set totrue, the subscription owner account detailssubscriptionOwnerAccountDetailsand invoice owner account detailsexistingAccountDetailswill be in the response. - In the “Retrieve a subscription by key” operation, the returned result differs based on the following query parameters:
- If the
getSubscriptionOwnerDetailsquery parameter is set totrue, the subscription owner account detailsaccountOwnerDetailswill be in the response. - If the
getInvoiceOwnerDetailsquery parameter is set totrue, the invoice owner account detailsinvoiceOwnerAccountDetailswill be in the response. - If both query parameters are set to
true, the subscription owner account detailsaccountOwnerDetailsand invoice owner account detailsinvoiceOwnerAccountDetailswill be in the response.
- If the
Container for basic information about the account.
Notes:
- In the “Retrieve an order” operation, if the
getAccountDetailsquery parameter is set totrue, the subscription owner account detailssubscriptionOwnerAccountDetailsand invoice owner account detailsexistingAccountDetailswill be in the response. - In the “Retrieve a subscription by key” operation, the returned result differs based on the following query parameters:
- If the
getSubscriptionOwnerDetailsquery parameter is set totrue, the subscription owner account detailsaccountOwnerDetailswill be in the response. - If the
getInvoiceOwnerDetailsquery parameter is set totrue, the invoice owner account detailsinvoiceOwnerAccountDetailswill be in the response. - If both query parameters are set to
true, the subscription owner account detailsaccountOwnerDetailsand invoice owner account detailsinvoiceOwnerAccountDetailswill be in the response.
- If the
ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite.
Status of the subscription’s synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite.
The NetSuite project that the subscription was created from. Only available if you have installed the Zuora Connector for NetSuite.
The NetSuite sales order than the subscription was created from. Only available if you have installed the Zuora Connector for NetSuite.
Date when the subscription was synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite.