Skip to navigation

Retrieve a subscription

View as Markdown
Retrieve the details of a specific Subscription object.

Authentication

AuthorizationBearer

Use Bearer {{token}} in the Authorization header for authentication.

Path parameters

keystringRequired
Object ID or Number.

Headers

Idempotency-KeystringOptional<=255 characters
Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
Accept-EncodingstringOptional

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.

Content-EncodingstringOptional

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.

Zuora-Track-IdstringOptional<=64 characters

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 (').

Zuora-Entity-IdsstringOptional

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.

Zuora-Org-IdsstringOptional

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.

Zuora-VersionstringOptional

The minor API version.

For a list of available minor versions, see API upgrades.

Query parameters

pageSizeintegerOptional1-99Defaults to 10

The maximum number of results to return in a single page. If the specified pageSize is less than 1 or greater than 99, Zuora will return a 400 error.

cursorstringOptional

A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with next_page=W3sib3JkZXJ=, your subsequent call can include cursor=W3sib3JkZXJ= in order to fetch the next page of the list.

sort[]list of stringsOptional

A case-insensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. accountnumber.ASC) or descending (e.g. accountnumber.DESC). You cannot sort on properties in arrays. If the array-type properties are specified for the sort[] parameter, they are ignored.

expand[]list of enumsOptional
Allows you to expand responses by including related object information in a single call.
filter[]list of stringsOptional

A case-insensitive filter on the list.

fields[]list of stringsOptional

A case-insensitive query parameter that allows you to specify which fields are returned in the response.

includeNullFieldsbooleanOptionalDefaults to false

Specifies whether to include fields with the null value in the response.

  • If set to true, all fields will be returned in the response, including those with the null value.
  • If set to false, only fields with non-null values will be returned.

Response headers

Content-EncodingstringOptional

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/json
  • application/xml
  • text/html
  • text/csv
  • text/plain
RateLimit-LimitstringOptional

The request limit quota for the time window closest to exhaustion. See rate limits for more information.

RateLimit-Remainingdouble

The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.

RateLimit-Resetdouble

The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.

Zuora-Request-IdstringOptional
The Zuora internal identifier of the API call. You cannot control the value of this header.
Zuora-Track-IdstringOptional
A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
Concurrency-Limit-TypestringOptional

The type of the concurrency limit, which can be Default, High-volume transactions, or Object Query.

For more information, see Concurrent request limits.

Concurrency-Limit-Limitinteger

The total number of the permitted concurrent requests.

For more information, see Concurrent request limits.

Concurrency-Limit-Remaininginteger

The remaining number of the permitted concurrent requests.

For more information, see Concurrent request limits.

Response

OK
idstringOptional
The unique identifier of the subscription.
createdByIdstringOptional
The unique identifier of the user who created the subscription.
createdDatedatetimeOptional

The date and time when the subscription was created in the Zuora system, in the yyyy-mm-dd hh:mm:ss format.

updatedByIdstringOptional
The unique identifier of the user who last updated the subscription.
updatedDatedatetimeOptional

The date and time when the subscription was last updated, in the yyyy-mm-dd hh:mm:ss format.

accountIdstringOptional
The ID of the account associated with this subscription.
autoRenewbooleanOptionalDefaults to false

If true, the subscription automatically renews at the end of the term.

cancelledDatedateOptional
The date on which the subscription was canceled.
contractAcceptanceDatedateOptional

The date when the customer accepts the contract, in the yyyy-mm-dd format.

If this field is not set:

  • If the serviceActivationDate field is not set, the value of this field is set to be the contract effective date.

  • If the serviceActivationDate field is set, the value of this field is set to be the service activation date.

The billing trigger dates must follow this rule:

contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate

contractEffectiveDatedateOptional

The date when the subscription is activated, in the yyyy-mm-dd format.

You must specify a Service Activation date if the Customer Acceptance date is set. If the Customer Acceptance date is not set, the value of the serviceActivationDate field defaults to be the Contract Effective Date.

The billing trigger dates must follow this rule:

contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate

creatorAccountIdstringOptional
The ID of the account that created the subscription. This field is automatically populated with the ID of the account that creates the subscription.
creatorInvoiceOwnerIdstringOptional
The account ID that owns the invoices associated with the subscription or the amended subscription.
currentTermlongOptional
The length of the period for the current subscription term.
currentTermPeriodTypeenumOptionalDefaults to Month
The period type for the current subscription term.
Allowed values:
initialTermlongOptional
The length of the period for the initial subscription term.
initialTermPeriodTypeenumOptionalDefaults to Month
The period type for the first subscription term.
Allowed values:
invoiceOwnerIdstringOptional
The account ID that owns the invoices associated with the subscription.
isInvoiceSeparatebooleanOptionalDefaults to false

Determines if the subscription is invoiced separately. If true, then all charges for this subscription are collected into the subscription’s own invoice.

namestringOptional
The name of the subscription.
notesstringOptional<=65535 characters
Additional information about the subscription.
originalCreatedDatestringOptional

The date when the subscription was originally created. This value is the same as the createdDate value until the subscription is amended.

originalIdstringOptional
The original rate plan charge ID. Only available for update subscription.
previousSubscriptionIdstringOptional
The ID of the previous subscription. This field is only available if the subscription is a renewal subscription.
renewalSettingenumOptionalDefaults to RENEW_WITH_SPECIFIC_TERM

Specifies whether a termed subscription will remain TERMED or change to EVERGREEN when it is renewed.

Allowed values:
renewalTermlongOptional
The length of the period for the subscription renewal term.
renewalTermPeriodTypeenumOptionalDefaults to Month
The period type for the subscription renewal term.
Allowed values:
revisionstringOptional

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.

serviceActivationDatedateOptional

The date on which the services or products within a subscription have been activated and access has been provided to the customer, in the yyyy-mm-dd format.

statusenumOptional
Subscription status.
isLatestVersionbooleanOptional

If true, the current subscription object is the latest version.

subscriptionEndDatedateOptional

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.

subscriptionStartDatedateOptional
Date the subscription becomes effective.
subscriptionVersionAmendmentIdstringOptional
The ID of the amendment made to this subscription version.
termEndDatedateOptional

Date the subscription term ends. If the subscription is evergreen, this is null or is the cancellation date (if one has been set).

termStartDatedateOptional
Date the subscription term begins. If this is a renewal subscription, this date is different from the subscription start date.
termTypeenumOptional
The type of the subscription term.
Allowed values:
versionlongOptional
This is the subscription version automatically generated by Zuora Billing. Each order or amendment creates a new version of the subscription, which incorporates the changes made in the order or amendment.
cMRRdoubleOptional
Monthly recurring revenue of the subscription.
billToContactSnapshotIdstringOptional

The ID of the bill-to contact snapshot.

billToContactIdstringOptional

The ID of the bill-to contact for the subscription.

invoiceTemplateIdstringOptional

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 null in 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 null in the response body.
sequenceSetIdstring or nullOptional

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 null in 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 null in the response body.
shipToContactIdstringOptional

The ID of the ship-to contact for the subscription.

shipToContactSnapshotIdstringOptional

The ID of the ship-to contact snapshot.

soldToContactIdstringOptional

The ID of the sold-to contact for the subscription.

soldToContactSnapshotIdstringOptional

The ID of the sold-to contact snapshot.

externallyManagedByenumOptional

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.

Allowed values:
lastBookingDatedateOptional

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.

invoiceScheduleIdstringOptional

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.

cancelReasonstringOptional

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.

prepaymentbooleanOptional
Whether the subscription is prepaid.
currencystringOptional

The currency of the subscription.

Note: This field is available only if you have the Multiple Currencies feature enabled.

orderIdstringOptional

The ID of the order associated with the subscription.

Note: This field is available only for orders that exist after the end of June 2023.

rampIdstringOptional

The ID of the ramp object associated with the subscription.

Note: This field is available only if you have the Ramp feature enabled.

paymentTermstringOptional
Name of the payment term associated with the account. For example, "Net 30". The payment term determines the due dates of invoices.
quoteNumber__QTstringOptional<=32 characters
The unique identifier of the Quote. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
quoteType__QTstringOptional<=32 characters
The Quote type that represents the subscription lifecycle stage such as New, Amendment, Renew or Cancel. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
quoteBusinessType__QTstringOptional<=32 characters
The specific identifier for the type of business transaction the Quote represents such as New, Upsell, Downsell, Renewal or Churn. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
opportunityName__QTstringOptional<=100 characters
The unique identifier of the Opportunity. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
opportunityCloseDate__QTdateOptional
cpqBundleJsonId__QTstringOptional<=32 characters
The Bundle product structures from Zuora Quotes if you utilize Bundling in Salesforce. Do not change the value in this field.
accountobjectOptional
invoiceOwnerobjectOptional
billToContactobjectOptional
soldToContactobjectOptional
invoiceItemslist of objectsOptional
ratePlanslist of objectsOptional

Errors

4XX
Client Request Error
500
Internal Server Error