Skip to navigation

Retrieve a subscription by key

View as Markdown
This REST API reference describes how to retrieve detailed information about a specified subscription in the latest version.

Authentication

AuthorizationBearer

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

Path parameters

subscription-keystringRequired

Possible values are:

  • a subscription number
  • a subscription ID

Headers

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

charge-detailstringOptional

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 >chargeSegments nested field is returned in the response. The chargeSegments field 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 is yyyy-mm-dd.

as-of-datestringOptional

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.

exclude-rate-plans-with-no-chargesbooleanOptional

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.

getDetailedMetricsbooleanOptionalDefaults to false

If the getDetailedMetrics field is true, contractedNetMrr, asOfDayGrossMrr, asOfDayNetMrr, and netTotalContractedValue will be in the response. The default value is false.

asOfDaystringOptional

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.

getInvoiceOwnerDetailsbooleanOptional

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.

getSubscriptionOwnerDetailsbooleanOptional

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

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
accountIdstringOptional
The ID of the account associated with this subscription.
accountNamestringOptional
The name of the account associated with this subscription.
accountNumberstringOptional
The number of the account associated with this subscription.
autoRenewbooleanOptional

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

billToContactobjectOptional

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.
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.

contractEffectiveDatedateOptional

Effective contract date for this subscription, as yyyy-mm-dd.

contractedMrrdoubleOptional
Monthly recurring revenue of the subscription.
contractedNetMrrdoubleOptional

Monthly recurring revenue of the subscription inclusive of all the discounts applicable, including the fixed-amount discounts and percentage discounts.

asOfDayGrossMrrdoubleOptional
Monthly recurring revenue of the subscription exclusive of any discounts applicable as of specified day.
asOfDayNetMrrdoubleOptional

Monthly recurring revenue of the subscription inclusive of all the discounts applicable, including the fixed-amount discounts and percentage discounts as of specified day.

netTotalContractedValuedoubleOptional

Total contracted value of the subscription inclusive of all the discounts applicable, including the fixed-amount discounts and percentage discounts.

currencystringOptional

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

currentTermlongOptional
The length of the period for the current subscription term.
currentTermPeriodTypestringOptional

The period type for the current subscription term.

Values are:

  • Month (default)
  • Year
  • Day
  • Week
customerAcceptanceDatedateOptional

The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.

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:
idstringOptional
Subscription ID.
initialTermlongOptional
The length of the period for the first subscription term.
initialTermPeriodTypestringOptional

The period type for the first subscription term.

Values are:

  • Month (default)
  • Year
  • Day
  • Week
invoiceGroupNumberstring or nullOptional

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.

invoiceOwnerAccountIdstringOptional
invoiceOwnerAccountNamestringOptional
invoiceOwnerAccountNumberstringOptional
invoiceScheduleIdintegerOptional

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.

invoiceSeparatelybooleanOptional

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.

invoiceTemplateIdstring or nullOptional

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.
invoiceTemplateNamestringOptional

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 null in the response body.
  • If you have the Flexible Billing Attributes feature enabled, and you do not specify the invoiceTemplateId field in the request or you select Default Template from Account for the invoiceTemplateId field during subscription creation, the value of the invoiceTemplateName field is automatically set to null in the response body.
isLatestVersionbooleanOptional

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

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.
notesstringOptional
A string of up to 65,535 characters.
orderNumberstringOptional

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.

organizationLabelstringOptional

The organization that this object belongs to.

Note: This field is available only when the Multi-Org feature is enabled.

originalListPricedoubleOptional

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:

  • oneTimeFlatFee
  • oneTimePerUnit
  • recurringFlatFee
  • recurringPerUnit
  • usageFlatFee
  • usagePerUnit
  • usageOverage
  • usageTieredWithOverage
paymentTermstringOptional

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 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 Term from Account for this field during subscription creation, the value of this field is automatically set to null in the response body.
rampobjectOptional
Ramp information associated with the subscription.
ratePlanslist of objectsOptional
Container for rate plans.
renewalSettingstringOptional

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
renewalTermlongOptional
The length of the period for the subscription renewal term.
renewalTermPeriodTypestringOptional

The period type for the subscription renewal term.

Values are:

  • Month (default)
  • Year
  • Day
  • Week
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.

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.
communicationProfileIdstring or nullOptional

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.

sequenceSetNamestringOptional

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 null in the response body.
  • If you have the Flexible Billing Attributes feature enabled, and you do not specify the sequenceSetId field in the request or you select Default Template from Account for the sequenceSetId field during subscription creation, the value of the sequenceSetName field is automatically set to null in the response body.
serviceActivationDatedateOptional

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

shipToContactobjectOptional

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.
soldToContactobjectOptional

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.
statusstringOptional

Subscription status; possible values are:

  • Draft
  • Pending Activation
  • Pending Acceptance
  • Active
  • Cancelled
  • Suspended
statusHistorylist of objectsOptional
Container for status history.
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.

subscriptionNumberstringOptional
Subscription number.
subscriptionStartDatedateOptional
Date the subscription becomes effective.
successbooleanOptional

Returns true if the request was processed successfully.

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.
termTypestringOptional

Possible values are: TERMED, EVERGREEN.

scheduledCancelDatedateOptional
The date when the subscription is scheduled to be canceled.
scheduledSuspendDatedateOptional
The date when the subscription is scheduled to be suspended.
scheduledResumeDatedateOptional
The date when the subscription is scheduled to be resumed.
totalContractedValuedoubleOptional
Total contracted value of the subscription.
totalNumberOfChargeSegmentsintegerOptional

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.

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.
accountOwnerDetailsobjectOptional

Container for basic information about the account.

Notes:

  • In the “Retrieve an order” operation, if the getAccountDetails query parameter is set to true, the subscription owner account details subscriptionOwnerAccountDetails and invoice owner account details existingAccountDetails will be in the response.
  • In the “Retrieve a subscription by key” operation, the returned result differs based on the following query parameters:
    • If the getSubscriptionOwnerDetails query parameter is set to true, the subscription owner account details accountOwnerDetails will be in the response.
    • If the getInvoiceOwnerDetails query parameter is set to true, the invoice owner account details invoiceOwnerAccountDetails will be in the response.
    • If both query parameters are set to true, the subscription owner account details accountOwnerDetails and invoice owner account details invoiceOwnerAccountDetails will be in the response.
invoiceOwnerAccountDetailsobjectOptional

Container for basic information about the account.

Notes:

  • In the “Retrieve an order” operation, if the getAccountDetails query parameter is set to true, the subscription owner account details subscriptionOwnerAccountDetails and invoice owner account details existingAccountDetails will be in the response.
  • In the “Retrieve a subscription by key” operation, the returned result differs based on the following query parameters:
    • If the getSubscriptionOwnerDetails query parameter is set to true, the subscription owner account details accountOwnerDetails will be in the response.
    • If the getInvoiceOwnerDetails query parameter is set to true, the invoice owner account details invoiceOwnerAccountDetails will be in the response.
    • If both query parameters are set to true, the subscription owner account details accountOwnerDetails and invoice owner account details invoiceOwnerAccountDetails will be in the response.
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.
OpportunityCloseDate__QTdateOptional
The closing date 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.
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.
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.
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.
IntegrationId__NSstringOptional<=255 characters

ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite.

IntegrationStatus__NSstringOptional<=255 characters

Status of the subscription’s synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite.

Project__NSstringOptional<=255 characters

The NetSuite project that the subscription was created from. Only available if you have installed the Zuora Connector for NetSuite.

SalesOrder__NSstringOptional<=255 characters

The NetSuite sales order than the subscription was created from. Only available if you have installed the Zuora Connector for NetSuite.

SyncDate__NSstringOptional<=255 characters

Date when the subscription was synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite.

Errors

4XX
Client Request Error
500
Internal Server Error