swagger: '2.0'
info:
version: '2023-12-15'
title: API Reference Accounting Codes Subscriptions API
description: "\n\n# Introduction\n\nWelcome to the REST API reference for the Zuora Billing, Payments, and Central Platform!\n\nTo learn about the common use cases of Zuora REST APIs, check out the [REST API Tutorials](/rest-api/api-guides/overview/).\n\nIn addition to Zuora API Reference, we also provide API references for other Zuora products:\n\n * [Revenue API Reference](/api-references/revenue/overview/)\n * [Collections API Reference](/api-references/collections/overview/)\n \nThe Zuora REST API provides a broad set of operations and resources that:\n\n * Enable Web Storefront integration from your website.\n * Support self-service subscriber sign-ups and account management.\n * Process revenue schedules through custom revenue rule models.\n * Enable manipulation of most objects in the Zuora Billing Object Model.\n\nWant to share your opinion on how our API works for you? Tell us how you feel about using our API and what we can do to make it better.\n\nSome of our older APIs are no longer recommended but still available, not affecting any existing integration. To find related API documentation, see [Older API Reference](/api-references/older-api/overview/).\n\n\n## Access to the API\n\nIf you have a Zuora tenant, you can access the Zuora REST API via one of the following endpoints:\n\n| Tenant | Base URL for REST Endpoints |\n|-------------------------|-------------------------|\n|US Cloud 1 Production | https://rest.na.zuora.com |\n|US Cloud 1 API Sandbox | https://rest.sandbox.na.zuora.com |\n|US Cloud 2 Production | https://rest.zuora.com |\n|US Cloud 2 API Sandbox | https://rest.apisandbox.zuora.com|\n|US Central Sandbox | https://rest.test.zuora.com | \n|US Performance Test | https://rest.pt1.zuora.com |\n|US Production Copy | Submit a request at Zuora Global Support to enable the Zuora REST API in your tenant and obtain the base URL for REST endpoints. See [REST endpoint base URL of Production Copy (Service) Environment for existing and new customers](https://community.zuora.com/t5/API/REST-endpoint-base-URL-of-Production-Copy-Service-Environment/td-p/29611) for more information. |\n|EU Production | https://rest.eu.zuora.com |\n|EU API Sandbox | https://rest.sandbox.eu.zuora.com |\n|EU Central Sandbox | https://rest.test.eu.zuora.com |\n\nThe Production endpoint provides access to your live user data. Sandbox tenants are a good place to test code without affecting real-world data. If you would like Zuora to provision a Sandbox tenant for you, contact your Zuora representative for assistance.\n\n\nIf you do not have a Zuora tenant, go to https://www.zuora.com/resource/zuora-test-drive and sign up for a Production Test Drive tenant. The tenant comes with seed data, including a sample product catalog.\n\n\n# Error Handling\n\nIf a request to Zuora Billing REST API with an endpoint starting with `/v1` (except [Actions](/v1-api-reference/api/Actions) and CRUD operations) fails, the response will contain an eight-digit error code with a corresponding error message to indicate the details of the error.\n\nThe following code snippet is a sample error response that contains an error code and message pair:\n\n```\n {\n \"success\": false,\n \"processId\": \"CBCFED6580B4E076\",\n \"reasons\": [\n {\n \"code\": 53100320,\n \"message\": \"'termType' value should be one of: TERMED, EVERGREEN\"\n }\n ]\n }\n```\nThe `success` field indicates whether the API request has succeeded. The `processId` field is a Zuora internal ID that you can provide to Zuora Global Support for troubleshooting purposes.\n\nThe `reasons` field contains the actual error code and message pair. The error code begins with `5` or `6` means that you encountered a certain issue that is specific to a REST API resource in Zuora Billing, Payments, and Central Platform. For example, `53100320` indicates that an invalid value is specified for the `termType` field of the `subscription` object.\n\nThe error code beginning with `9` usually indicates that an authentication-related issue occurred, and it can also indicate other unexpected errors depending on different cases. For example, `90000011` indicates that an invalid credential is provided in the request header. \n\nWhen troubleshooting the error, you can divide the error code into two components: REST API resource code and error category code. See the following Zuora error code sample:\n\n\n\n\n**Note:** Zuora determines resource codes based on the request payload. Therefore, if GET and DELETE requests that do not contain payloads fail, you will get `500000` as the resource code, which indicates an unknown object and an unknown field. \nThe error category code of these requests is valid and follows the rules described in the [Error Category Codes](/api-references/api/overview/#section/Error-Handling/Error-Category-Codes) section. \nIn such case, you can refer to the returned error message to troubleshoot.\n\n\n## REST API Resource Codes\n\nThe 6-digit resource code indicates the REST API resource, typically a field of a Zuora object, on which the issue occurs. In the preceding example, `531003` refers to the `termType` field of the `subscription` object. \n\nThe value range for all REST API resource codes is from `500000` to `679999`. See Resource Codes in the Knowledge Center for a full list of resource codes.\n\n## Error Category Codes\n\nThe 2-digit error category code identifies the type of error, for example, resource not found or missing required field. \n\nThe following table describes all error categories and the corresponding resolution:\n\n| Code | Error category | Description | Resolution |\n|:--------|:--------|:--------|:--------|\n| 10 | Permission or access denied | The request cannot be processed because a certain tenant or user permission is missing. | Check the missing tenant or user permission in the response message and contact Zuora Global Support for enablement. |\n| 11 | Authentication failed | Authentication fails due to invalid API authentication credentials. | Ensure that a valid API credential is specified. |\n| 20 | Invalid format or value | The request cannot be processed due to an invalid field format or value. | Check the invalid field in the error message, and ensure that the format and value of all fields you passed in are valid. |\n| 21 | Unknown field in request | The request cannot be processed because an unknown field exists in the request body. | Check the unknown field name in the response message, and ensure that you do not include any unknown field in the request body. |\n| 22 | Missing required field | The request cannot be processed because a required field in the request body is missing. | Check the missing field name in the response message, and ensure that you include all required fields in the request body. |\n| 23 | Missing required parameter | The request cannot be processed because a required query parameter is missing. | Check the missing parameter name in the response message, and ensure that you include the parameter in the query. |\n| 30 | Rule restriction | The request cannot be processed due to the violation of a Zuora business rule. | Check the response message and ensure that the API request meets the specified business rules. |\n| 40 | Not found | The specified resource cannot be found. | Check the response message and ensure that the specified resource exists in your Zuora tenant. |\n| 45 | Unsupported request | The requested endpoint does not support the specified HTTP method. | Check your request and ensure that the endpoint and method matches. |\n| 50 | Locking contention | This request cannot be processed because the objects this request is trying to modify are being modified by another API request, UI operation, or batch job process. |
Resubmit the request first to have another try.
If this error still occurs, contact Zuora Global Support with the returned `Zuora-Request-Id` value in the response header for assistance.
|\n| 60 | Internal error | The server encounters an internal error. | Contact Zuora Global Support with the returned `Zuora-Request-Id` value in the response header for assistance. |\n| 61 | Temporary error | A temporary error occurs during request processing, for example, a database communication error. |Resubmit the request first to have another try.
If this error still occurs, contact Zuora Global Support with the returned `Zuora-Request-Id` value in the response header for assistance.
|\n| 70 | Request exceeded limit | The total number of concurrent requests exceeds the limit allowed by the system. |Resubmit the request after the number of seconds specified by the `Retry-After` value in the response header.
Check [Concurrent request limits](/rest-api/general-concepts/rate-concurrency-limits/) for details about Zuora’s concurrent request limit policy.
|\n| 90 | Malformed request | The request cannot be processed due to JSON syntax errors. | Check the syntax error in the JSON request body and ensure that the request is in the correct JSON format. |\n| 99 | Integration error | The server encounters an error when communicating with an external system, for example, payment gateway, tax engine provider. | Check the response message and take action accordingly. |\n\n\n# API Versions\n\nThe Zuora REST API are version controlled. Versioning ensures that Zuora REST API changes are backward compatible. Zuora uses a major and minor version nomenclature to manage changes. By specifying a version in a REST request, you can get expected responses regardless of future changes to the API.\n\n## Major Version\n\nThe major version number of the REST API appears in the REST URL. In this API reference, only the **v1** major version is available. For example, `POST https://rest.zuora.com/v1/subscriptions`.\n\n## Minor Version\n\nZuora uses minor versions for the REST API to control small changes. For example, a field in a REST method is deprecated and a new field is used to replace it. \n\nSome fields in the REST methods are supported as of minor versions. If a field is not noted with a minor version, this field is available for all minor versions. If a field is noted with a minor version, this field is in version control. You must specify the supported minor version in the request header to process without an error. \n\nIf a field is in version control, it is either with a minimum minor version or a maximum minor version, or both of them. You can only use this field with the minor version between the minimum and the maximum minor versions. For example, the `invoiceCollect` field in the POST Subscription method is in version control and its maximum minor version is 189.0. You can only use this field with the minor version 189.0 or earlier.\n\nIf you specify a version number in the request header that is not supported, Zuora will use the minimum minor version of the REST API. In our REST API documentation, if a field or feature requires a minor version number, we note that in the field description.\n\nYou only need to specify the version number when you use the fields require a minor version. To specify the minor version, set the `zuora-version` parameter to the minor version number in the request header for the request call. For example, the `collect` field is in 196.0 minor version. If you want to use this field for the POST Subscription method, set the `zuora-version` parameter to `196.0` in the request header. The `zuora-version` parameter is case sensitive.\n\nFor all the REST API fields, by default, if the minor version is not specified in the request header, Zuora will use the minimum minor version of the REST API to avoid breaking your integration. \n\n### Minor Version History\n\nThe supported minor versions are not consecutive. \nYou can use the following versions to override the default version (`186.0`):\n - 187.0\n - 188.0\n - 189.0\n - 196.0\n - 206.0\n - 207.0\n - 211.0\n - 214.0\n - 215.0\n - 216.0\n - 223.0\n - 224.0\n - 230.0\n - 239.0\n - 256.0\n - 257.0\n - 309.0\n - 314.0\n - 315.0\n - 329.0\n - 330.0\n - 336.0\n - 337.0\n - 338.0\n - 341.0\n\nIf you set the `zuora-version` header to a version excluded from the preceding list, the corresponding API request is processed as you use the default version, `186.0`.\n\nThe following table lists the supported versions and the fields that have a Zuora REST API minor version.\n\n| Fields | Minor Version | REST Methods | Description |\n|:--------|:--------|:--------|:--------|\n| invoiceCollect | 189.0 and earlier | [Create Subscription](/v1-api-reference/api/subscriptions/post_subscription \"Create Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\"); [Renew Subscription](/v1-api-reference/api/subscriptions/put_renewsubscription \"Renew Subscription\"); [Cancel Subscription](/v1-api-reference/api/subscriptions/put_cancelsubscription \"Cancel Subscription\"); [Suspend Subscription](/v1-api-reference/api/subscriptions/put_suspendsubscription/ \"Suspend Subscription\"); [Resume Subscription](/v1-api-reference/api/subscriptions/put_resumesubscription/ \"Resume Subscription\"); [Create Account](/v1-api-reference/api/accounts/post_account \"Create Account\")|Generates an invoice and collects a payment for a subscription. |\n| collect | 196.0 and later | [Create Subscription](/v1-api-reference/api/subscriptions/post_subscription \"Create Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\"); [Renew Subscription](/v1-api-reference/api/subscriptions/put_renewsubscription \"Renew Subscription\"); [Cancel Subscription](/v1-api-reference/api/subscriptions/put_cancelsubscription \"Cancel Subscription\"); [Suspend Subscription](/v1-api-reference/api/subscriptions/put_suspendsubscription/ \"Suspend Subscription\"); [Resume Subscription](/v1-api-reference/api/subscriptions/put_resumesubscription/ \"Resume Subscription\"); [Create Account](/v1-api-reference/api/accounts/post_account \"Create Account\")|Collects an automatic payment for a subscription. |\n| invoice | 196.0 and 207.0| [Create Subscription](/v1-api-reference/api/subscriptions/post_subscription \"Create Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\"); [Renew Subscription](/v1-api-reference/api/subscriptions/put_renewsubscription \"Renew Subscription\"); [Cancel Subscription](/v1-api-reference/api/subscriptions/put_cancelsubscription \"Cancel Subscription\"); [Suspend Subscription](/v1-api-reference/api/subscriptions/put_suspendsubscription/ \"Suspend Subscription\"); [Resume Subscription](/v1-api-reference/api/subscriptions/put_resumesubscription/ \"Resume Subscription\"); [Create Account](/v1-api-reference/api/accounts/post_account \"Create Account\")|Generates an invoice for a subscription. |\n| invoiceTargetDate | 206.0 and earlier | [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview Subscription\") |Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| invoiceTargetDate | 207.0 and earlier | [Create Subscription](/v1-api-reference/api/subscriptions/post_subscription \"Create Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\"); [Renew Subscription](/v1-api-reference/api/subscriptions/put_renewsubscription \"Renew Subscription\"); [Cancel Subscription](/v1-api-reference/api/subscriptions/put_cancelsubscription \"Cancel Subscription\"); [Suspend Subscription](/v1-api-reference/api/subscriptions/put_suspendsubscription/ \"Suspend Subscription\"); [Resume Subscription](/v1-api-reference/api/subscriptions/put_resumesubscription/ \"Resume Subscription\"); [Create Account](/v1-api-reference/api/accounts/post_account \"Create Account\")|Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| targetDate | 207.0 and later | [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview Subscription\") |Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| targetDate | 211.0 and later | [Create Subscription](/v1-api-reference/api/subscriptions/post_subscription \"Create Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\"); [Renew Subscription](/v1-api-reference/api/subscriptions/put_renewsubscription \"Renew Subscription\"); [Cancel Subscription](/v1-api-reference/api/subscriptions/put_cancelsubscription \"Cancel Subscription\"); [Suspend Subscription](/v1-api-reference/api/subscriptions/put_suspendsubscription/ \"Suspend Subscription\"); [Resume Subscription](/v1-api-reference/api/subscriptions/put_resumesubscription/ \"Resume Subscription\"); [Create Account](/v1-api-reference/api/accounts/post_account \"Create Account\")|Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| includeExisting DraftInvoiceItems | 206.0 and earlier| [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\") | Specifies whether to include draft invoice items in subscription previews. Specify it to be `true` (default) to include draft invoice items in the preview result. Specify it to be `false` to excludes draft invoice items in the preview result. |\n| includeExisting DraftDocItems | 207.0 and later | [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\") | Specifies whether to include draft invoice items in subscription previews. Specify it to be `true` (default) to include draft invoice items in the preview result. Specify it to be `false` to excludes draft invoice items in the preview result. |\n| previewType | 206.0 and earlier| [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\") | The type of preview you will receive. The possible values are `InvoiceItem`(default), `ChargeMetrics`, and `InvoiceItemChargeMetrics`. |\n| previewType | 207.0 and later | [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\") | The type of preview you will receive. The possible values are `LegalDoc`(default), `ChargeMetrics`, and `LegalDocChargeMetrics`. |\n| runBilling | 211.0 and later | [Create Subscription](/v1-api-reference/api/subscriptions/post_subscription \"Create Subscription\"); [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\"); [Renew Subscription](/v1-api-reference/api/subscriptions/put_renewsubscription \"Renew Subscription\"); [Cancel Subscription](/v1-api-reference/api/subscriptions/put_cancelsubscription \"Cancel Subscription\"); [Suspend Subscription](/v1-api-reference/api/subscriptions/put_suspendsubscription/ \"Suspend Subscription\"); [Resume Subscription](/v1-api-reference/api/subscriptions/put_resumesubscription/ \"Resume Subscription\"); [Create Account](/v1-api-reference/api/accounts/post_account \"Create Account\")|Generates an invoice or credit memo for a subscription. **Note:** Credit memos are only available if you have the Invoice Settlement feature enabled. |\n| invoiceDate | 214.0 and earlier | [Invoice and Collect](/api-references/api/operation/POST_TransactionInvoicePayment \"Invoice and Collect\") |Date that should appear on the invoice being generated, as `yyyy-mm-dd`. |\n| invoiceTargetDate | 214.0 and earlier | [Invoice and Collect](/api-references/api/operation/POST_TransactionInvoicePayment \"Invoice and Collect\") |Date through which to calculate charges on this account if an invoice is generated, as `yyyy-mm-dd`. |\n| documentDate | 215.0 and later | [Invoice and Collect](/api-references/api/operation/POST_TransactionInvoicePayment \"Invoice and Collect\") |Date that should appear on the invoice and credit memo being generated, as `yyyy-mm-dd`. |\n| targetDate | 215.0 and later | [Invoice and Collect](/api-references/api/operation/POST_TransactionInvoicePayment \"Invoice and Collect\") |Date through which to calculate charges on this account if an invoice or a credit memo is generated, as `yyyy-mm-dd`. |\n| memoItemAmount | 223.0 and earlier | [Create credit memo from charge](/api-references/api/operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](/api-references/api/operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\") | Amount of the memo item. |\n| amount | 224.0 and later | [Create credit memo from charge](/api-references/api/operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](/api-references/api/operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\") | Amount of the memo item. |\n| subscriptionNumbers | 222.4 and earlier | [Create order](/api-references/api/operation/POST_Order \"Create order\") | Container for the subscription numbers of the subscriptions in an order. |\n| subscriptions | 223.0 and later | [Create order](/api-references/api/operation/POST_Order \"Create order\") | Container for the subscription numbers and statuses in an order. |\n| creditTaxItems | 238.0 and earlier | [Get credit memo items](/api-references/api/operation/GET_CreditMemoItems \"Get credit memo items\"); [Get credit memo item](/api-references/api/operation/GET_CreditMemoItem \"Get credit memo item\") | Container for the taxation items of the credit memo item. |\n| taxItems | 238.0 and earlier | [Get debit memo items](/api-references/api/operation/GET_DebitMemoItems \"Get debit memo items\"); [Get debit memo item](/api-references/api/operation/GET_DebitMemoItem \"Get debit memo item\") | Container for the taxation items of the debit memo item. |\n| taxationItems | 239.0 and later | [Get credit memo items](/api-references/api/operation/GET_CreditMemoItems \"Get credit memo items\"); [Get credit memo item](/api-references/api/operation/GET_CreditMemoItem \"Get credit memo item\"); [Get debit memo items](/api-references/api/operation/GET_DebitMemoItems \"Get debit memo items\"); [Get debit memo item](/api-references/api/operation/GET_DebitMemoItem \"Get debit memo item\") | Container for the taxation items of the memo item. |\n| chargeId | 256.0 and earlier | [Create credit memo from charge](/api-references/api/operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](/api-references/api/operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\") | ID of the product rate plan charge that the memo is created from. |\n| productRatePlanChargeId | 257.0 and later | [Create credit memo from charge](/api-references/api/operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](/api-references/api/operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\") | ID of the product rate plan charge that the memo is created from. |\n| comment | 256.0 and earlier | [Create credit memo from charge](/api-references/api/operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](/api-references/api/operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\"); [Create credit memo from invoice](/api-references/api/operation/POST_CreditMemoFromInvoice \"Create credit memo from invoice\"); [Create debit memo from invoice](/api-references/api/operation/POST_DebitMemoFromInvoice \"Create debit memo from invoice\"); [Get credit memo items](/api-references/api/operation/GET_CreditMemoItems \"Get credit memo items\"); [Get credit memo item](/api-references/api/operation/GET_CreditMemoItem \"Get credit memo item\"); [Get debit memo items](/api-references/api/operation/GET_DebitMemoItems \"Get debit memo items\"); [Get debit memo item](/api-references/api/operation/GET_DebitMemoItem \"Get debit memo item\") | Comments about the product rate plan charge, invoice item, or memo item. |\n| description | 257.0 and later | [Create credit memo from charge](/api-references/api/operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](/api-references/api/operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\"); [Create credit memo from invoice](/api-references/api/operation/POST_CreditMemoFromInvoice \"Create credit memo from invoice\"); [Create debit memo from invoice](/api-references/api/operation/POST_DebitMemoFromInvoice \"Create debit memo from invoice\"); [Get credit memo items](/api-references/api/operation/GET_CreditMemoItems \"Get credit memo items\"); [Get credit memo item](/api-references/api/operation/GET_CreditMemoItem \"Get credit memo item\"); [Get debit memo items](/api-references/api/operation/GET_DebitMemoItems \"Get debit memo items\"); [Get debit memo item](/api-references/api/operation/GET_DebitMemoItem \"Get debit memo item\") | Description of the the product rate plan charge, invoice item, or memo item. |\n| taxationItems | 309.0 and later | [Preview an order](/api-references/api/operation/POST_PreviewOrder \"Preview an order\") | List of taxation items for an invoice item or a credit memo item. |\n| batch | 309.0 and earlier | [Create a billing preview run](/api-references/api/operation/POST_BillingPreviewRun \"Create a billing preview run\") | The customer batches to include in the billing preview run. | \n| batches | 314.0 and later | [Create a billing preview run](/api-references/api/operation/POST_BillingPreviewRun \"Create a billing preview run\") | The customer batches to include in the billing preview run. |\n| taxationItems | 315.0 and later | [Preview a subscription](/api-references/api/operation/POST_PreviewSubscription \"Preview a subscription\"); [Update a subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update a subscription\")| List of taxation items for an invoice item or a credit memo item. |\n| billingDocument | 330.0 and later | [Create a payment schedule](/api-references/api/operation/POST_PaymentSchedule \"Create a payment schedule\"); [Create multiple payment schedules at once](/api-references/api/operation/POST_PaymentSchedules \"Create multiple payment schedules at once\")| The billing document with which the payment schedule item is associated. |\n| paymentId | 336.0 and earlier | [Add payment schedule items to a custom payment schedule](/api-references/api/operation/POST_AddItemsToCustomPaymentSchedule/ \"Add payment schedule items to a custom payment schedule\"); [Update a payment schedule](/api-references/api/operation/PUT_PaymentSchedule/ \"Update a payment schedule\"); [Update a payment schedule item](/api-references/api/operation/PUT_PaymentScheduleItem/ \"Update a payment schedule item\"); [Preview the result of payment schedule update](/api-references/api/operation/PUT_PaymentScheduleUpdatePreview/ \"Preview the result of payment schedule update\"); [Retrieve a payment schedule](/api-references/api/operation/GET_PaymentSchedule/ \"Retrieve a payment schedule\"); [Retrieve a payment schedule item](/api-references/api/operation/GET_PaymentScheduleItem/ \"Retrieve a payment schedule item\"); [List payment schedules by customer account](/api-references/api/operation/GET_PaymentSchedules/ \"List payment schedules by customer account\"); [Cancel a payment schedule](/api-references/api/operation/PUT_CancelPaymentSchedule/ \"Cancel a payment schedule\"); [Cancel a payment schedule item](/api-references/api/operation/PUT_CancelPaymentScheduleItem/ \"Cancel a payment schedule item\");[Skip a payment schedule item](/api-references/api/operation/PUT_SkipPaymentScheduleItem/ \"Skip a payment schedule item\");[Retry failed payment schedule items](/api-references/api/operation/POST_RetryPaymentScheduleItem/ \"Retry failed payment schedule items\") | ID of the payment to be linked to the payment schedule item.\n\n\n#### Version 207.0 and Later\n\nThe response structure of the [Preview Subscription](/api-references/api/operation/POST_PreviewSubscription) and [Update Subscription](/v1-api-reference/api/subscriptions/put_subscription \"Update Subscription\") methods are changed. The following invoice related response fields are moved to the invoice container:\n\n * amount\n * amountWithoutTax\n * taxAmount\n * invoiceItems\n * targetDate\n * chargeMetrics\n\n\n# API Names for Zuora Objects\n\nFor information about the Zuora business object model, see [Zuora Business Object Model](/rest-api/general-concepts/object-model/).\n\nYou can use the [Describe](/api-references/api/operation/GET_Describe) operation to list the fields of each Zuora object that is available in your tenant. When you call the operation, you must specify the API name of the Zuora object.\n\nThe following table provides the API name of each Zuora object:\n\n| Object | API Name |\n|-----------------------------------------------|--------------------------------------------|\n| Account | `Account` |\n| Accounting Code | `AccountingCode` |\n| Accounting Period | `AccountingPeriod` |\n| Amendment | `Amendment` |\n| Application Group | `ApplicationGroup` |\n| Billing Run |`BillingRun` - API name used in the [Describe](/api-references/api/operation/GET_Describe) operation, Export ZOQL queries, and Data Query.
`BillRun` - API name used in the [Actions](/v1-api-reference/api/Actions). See the CRUD oprations of [Bill Run](/v1-api-reference/api/Bill-Run) for more information about the `BillRun` object. `BillingRun` and `BillRun` have different fields. | \n| Billing Preview Run | `BillingPreviewRun` | \n| Configuration Templates | `ConfigurationTemplates` |\n| Contact | `Contact` |\n| Contact Snapshot | `ContactSnapshot` |\n| Credit Balance Adjustment | `CreditBalanceAdjustment` |\n| Credit Memo | `CreditMemo` |\n| Credit Memo Application | `CreditMemoApplication` |\n| Credit Memo Application Item | `CreditMemoApplicationItem` |\n| Credit Memo Item | `CreditMemoItem` |\n| Credit Memo Part | `CreditMemoPart` |\n| Credit Memo Part Item | `CreditMemoPartItem` |\n| Credit Taxation Item | `CreditTaxationItem` |\n| Custom Exchange Rate | `FXCustomRate` |\n| Debit Memo | `DebitMemo` |\n| Debit Memo Item | `DebitMemoItem` |\n| Debit Taxation Item | `DebitTaxationItem` |\n| Discount Applied Metrics | `DiscountAppliedMetrics` |\n| Entity | `Tenant` |\n| Fulfillment | `Fulfillment` |\n| Feature | `Feature` |\n| Gateway Reconciliation Event | `PaymentGatewayReconciliationEventLog` |\n| Gateway Reconciliation Job | `PaymentReconciliationJob` |\n| Gateway Reconciliation Log | `PaymentReconciliationLog` |\n| Invoice | `Invoice` |\n| Invoice Adjustment | `InvoiceAdjustment` |\n| Invoice Item | `InvoiceItem` |\n| Invoice Item Adjustment | `InvoiceItemAdjustment` |\n| Invoice Payment | `InvoicePayment` |\n| Invoice Schedule | `InvoiceSchedule` |\n| Invoice Schedule Item | `InvoiceScheduleItem` |\n| Journal Entry | `JournalEntry` |\n| Journal Entry Item | `JournalEntryItem` |\n| Journal Run | `JournalRun` |\n| Notification History - Callout | `CalloutHistory` |\n| Notification History - Email | `EmailHistory` |\n| Offer | `Offer` |\n| Order | `Order` |\n| Order Action | `OrderAction` |\n| Order ELP | `OrderElp` |\n| Order Line Items | `OrderLineItems` | \n| Order Item | `OrderItem` |\n| Order MRR | `OrderMrr` |\n| Order Quantity | `OrderQuantity` |\n| Order TCB | `OrderTcb` |\n| Order TCV | `OrderTcv` |\n| Payment | `Payment` |\n| Payment Application | `PaymentApplication` |\n| Payment Application Item | `PaymentApplicationItem` |\n| Payment Method | `PaymentMethod` |\n| Payment Method Snapshot | `PaymentMethodSnapshot` |\n| Payment Method Transaction Log | `PaymentMethodTransactionLog` |\n| Payment Method Update | `UpdaterDetail` |\n| Payment Part | `PaymentPart` |\n| Payment Part Item | `PaymentPartItem` |\n| Payment Run | `PaymentRun` |\n| Payment Transaction Log | `PaymentTransactionLog` |\n| Price Book Item | `PriceBookItem` |\n| Processed Usage | `ProcessedUsage` |\n| Product | `Product` |\n| Product Charge Definition | `ProductChargeDefinition` | \n| Product Feature | `ProductFeature` |\n| Product Rate Plan | `ProductRatePlan` |\n| Product Rate Plan Definition | `ProductRatePlanDefinition` | \n| Product Rate Plan Charge | `ProductRatePlanCharge` |\n| Product Rate Plan Charge Tier | `ProductRatePlanChargeTier` |\n| Rate Plan | `RatePlan` |\n| Rate Plan Charge | `RatePlanCharge` |\n| Rate Plan Charge Tier | `RatePlanChargeTier` |\n| Refund | `Refund` |\n| Refund Application | `RefundApplication` |\n| Refund Application Item | `RefundApplicationItem` |\n| Refund Invoice Payment | `RefundInvoicePayment` |\n| Refund Part | `RefundPart` |\n| Refund Part Item | `RefundPartItem` |\n| Refund Transaction Log | `RefundTransactionLog` |\n| Revenue Charge Summary | `RevenueChargeSummary` |\n| Revenue Charge Summary Item | `RevenueChargeSummaryItem` |\n| Revenue Event | `RevenueEvent` |\n| Revenue Event Credit Memo Item | `RevenueEventCreditMemoItem` |\n| Revenue Event Debit Memo Item | `RevenueEventDebitMemoItem` |\n| Revenue Event Invoice Item | `RevenueEventInvoiceItem` |\n| Revenue Event Invoice Item Adjustment | `RevenueEventInvoiceItemAdjustment` |\n| Revenue Event Item | `RevenueEventItem` |\n| Revenue Event Item Credit Memo Item | `RevenueEventItemCreditMemoItem` |\n| Revenue Event Item Debit Memo Item | `RevenueEventItemDebitMemoItem` |\n| Revenue Event Item Invoice Item | `RevenueEventItemInvoiceItem` |\n| Revenue Event Item Invoice Item Adjustment | `RevenueEventItemInvoiceItemAdjustment` |\n| Revenue Event Type | `RevenueEventType` |\n| Revenue Schedule | `RevenueSchedule` |\n| Revenue Schedule Credit Memo Item | `RevenueScheduleCreditMemoItem` |\n| Revenue Schedule Debit Memo Item | `RevenueScheduleDebitMemoItem` |\n| Revenue Schedule Invoice Item | `RevenueScheduleInvoiceItem` |\n| Revenue Schedule Invoice Item Adjustment | `RevenueScheduleInvoiceItemAdjustment` |\n| Revenue Schedule Item | `RevenueScheduleItem` |\n| Revenue Schedule Item Credit Memo Item | `RevenueScheduleItemCreditMemoItem` |\n| Revenue Schedule Item Debit Memo Item | `RevenueScheduleItemDebitMemoItem` |\n| Revenue Schedule Item Invoice Item | `RevenueScheduleItemInvoiceItem` |\n| Revenue Schedule Item Invoice Item Adjustment | `RevenueScheduleItemInvoiceItemAdjustment` |\n| Subscription | `Subscription` |\n| Subscription Product Feature | `SubscriptionProductFeature` |\n| Taxable Item Snapshot | `TaxableItemSnapshot` |\n| Taxation Item | `TaxationItem` |\n| Updater Batch | `UpdaterBatch` |\n| Usage | `Usage` |\n"
contact:
email: docs@zuora.com
host: rest.zuora.com
basePath: /
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Subscriptions
description: 'A subscription is a product or service that has recurring charges, such as a monthly flat fee or charges based on usage. Subscriptions can also include one-time charges, such as activation fees. Every subscription must be associated with an account. At least one active account must exist before any subscriptions can be created.
For more information, see Subscriptions.
'
paths:
/v1/subscriptions/preview:
post:
summary: Preview a subscription
operationId: POST_PreviewSubscription
description: "The REST API reference describes how to create a new subscription in preview mode. This call does not require a valid customer account. It can be used to show potential new customers a preview of a subscription with complete details and charges before creating an account, or to let existing customers preview a subscription with all charges before committing.\n\n### Notes\n- The response of the Preview 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. \n\n- If you have the Invoice Settlement feature enabled, we recommend that you set the `zuora-version` parameter to `207.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error is returned.\n\n\n- Default values for **customerAcceptanceDate** and **serviceActivationDate** are set as follows.\n\n| | serviceActivationDate (SA) specified | serviceActivationDate (SA) NOT specified |\n| ------------- |:-------------:| -----:|\n| customerAcceptanceDate (CA) specified | SA uses value in the request call; CA uses value in the request call| CA uses value in the request call;SA uses CE as default |\n| customerAcceptanceDate (CA) NOT specified | SA uses value in the request call; CA uses SA as default | SA and CA use CE as default |\n"
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Idempotency_Key'
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "\nThe minor version of the Zuora REST API. \n\nYou need to set this parameter if you use the following fields:\n* targetDate\n* includeExistingDraftDocItems\n* previewType\n* taxationItems\n\n\nIf you have the Invoice Settlement feature enabled, you need to specify this parameter. Otherwise, an error is returned.\n\n\n. \n"
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/POSTSubscriptionPreviewType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
contractedMrr: 100
amount: 100
amountWithoutTax: 90
taxAmount: 10
invoiceTargetDate: '2021-12-31'
invoice:
amount: 100.0
amountWithoutTax: 90.0
taxAmount: 10.0
invoiceItems:
- serviceStartDate: '2021-08-04'
serviceEndDate: '2021-08-31'
chargeAmount: 90
chargeDescription: Recurring Flat Fee Pricing
chargeName: Recurring_Flat Fee Pricing1628472350306
productName: P_1628472348863
productRatePlanChargeId: 402881547b216168017b2884182f12e7
quantity: 1
taxAmount: 10
taxationItems:
- exemptAmount: 0.0
jurisdiction: Country
locationCode: 000-1
name: taxName1
taxAmount: 10
taxCode: TAXCODE-1628472348524123456789012345678901234567890
taxCodeDescription: null
taxDate: '2021-10-08'
taxRateDescription: taxRateDescription1
taxRateType: FlatFee
description: ''
schema:
$ref: '#/definitions/POSTSubscriptionPreviewResponseType'
/v1/subscriptions:
post:
summary: Create a subscription
operationId: POST_Subscription
description: 'This REST API reference describes how to create a new subscription for an existing customer account.
### Notes
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](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error occurs.
If `invoiceCollect` is `true`, the call will not return `success` = `true` unless the subscription, invoice, and payment are all successful.
Default values for **customerAcceptanceDate** and **serviceActivationDate** are set as follows. This API operation does not support creating a pending subscription.
| | serviceActivationDate(SA) specified | serviceActivationDate (SA) NOT specified |
| ------------- |:-------------:| -----:|
| customerAcceptanceDate (CA) specified| SA uses value in the request call; CA uses value in the request call| CA uses value in the request call;SA uses CE as default |
| customerAcceptanceDate (CA) NOT specified | SA uses value in the request call; CA uses SA as default | SA and CA use CE as default |
'
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Idempotency_Key'
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "The minor version of the Zuora REST API. \n\nYou only need to set this parameter if you use the following fields:\n* invoice\n* collect\n* runBilling\n* targetDate\n"
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/POSTSubscriptionType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
subscriptionId: 402890fc4fa094d5014fa0a4aa78001d
subscriptionNumber: A-S00000041
contractedMrr: 1950
totalContractedValue: 6227.41935465
description: ''
schema:
$ref: '#/definitions/POSTSubscriptionResponseType'
/v1/subscriptions/accounts/{account-key}:
get:
summary: List subscriptions by account key
operationId: GET_SubscriptionsByAccount
description: 'Retrieves all subscriptions associated with the specified account. Zuora only returns the latest version of the subscriptions.
Subscription data is returned in reverse chronological order based on `updatedDate`. Note that the rate plans inside the subscriptions are not sorted specifically and are returned in a random order.
'
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- $ref: '#/parameters/GLOBAL_REQUEST_page'
- $ref: '#/parameters/GLOBAL_REQUEST_pageSize'
- name: account-key
in: path
description: '
Possible values are:
* an account number
* an account ID
'
required: true
type: string
- name: charge-detail
in: query
description: "The segmented rate plan charges.\n\nWhen an amendment results in a change to a charge, Zuora creates a segmented rate plan charge. Use this field to track segment charges.\n\nPossible values are:\n\n* __last-segment__: (Default) The last rate plan charge on the subscription. The last rate plan charge is the last one in the order of time on the subscription rather than the most recent changed charge on the subscription.\n * __current-segment__: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date < effectiveEndDate).\n \n * __all-segments__: All the segmented charges. The `chargeSegments` field is returned in the response. The `chargeSegments` field contains an array of the charge information for all the charge segments.\n\n * __specific-segment&as-of-date=date__: The segmented charge that is active on a date you specified (effectiveStartDate <= specific date < effectiveEndDate). The format of the date is yyyy-mm-dd.\n"
required: false
type: string
- name: exclude-rate-plans-with-no-charges
in: query
required: false
type: boolean
description: 'If the `exclude-rate-plans-with-no-charges` is `true`, only the active charges and rate plans will be in the response. The default value is `false`.
'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
subscriptions:
- id: 8a8082c45aa81b51015ad68743ec0fdb
accountId: 8a8082c45aa81b51015ad64396090f5c
accountNumber: A00002641
accountName: ABCD
version: 1
revision: '1.0'
invoiceOwnerAccountId: 8a8082c45aa81b51015ad64396090f5c
invoiceOwnerAccountNumber: A00002641
invoiceOwnerAccountName: ABCD
subscriptionNumber: A-S00007412
termType: TERMED
invoiceSeparately: false
contractEffectiveDate: '2017-01-01'
serviceActivationDate: '2017-01-01'
customerAcceptanceDate: '2017-01-01'
subscriptionStartDate: '2017-01-01'
termStartDate: '2017-01-01'
termEndDate: '2018-01-01'
initialTerm: 12
initialTermPeriodType: Month
currentTerm: 12
currentTermPeriodType: Month
autoRenew: true
renewalSetting: RENEW_WITH_SPECIFIC_TERM
renewalTerm: 12
renewalTermPeriodType: Month
currency: USD
contractedMrr: 8.33
totalContractedValue: 100
notes: ''
paymentTerm: Net 30
billToContact:
address1: ''
address2: ''
city: ''
country: null
county: null
fax: ''
firstName: Test
homePhone: ''
id: 2c9081a03c6d7b51013c6d7e46c80a17
lastName: Test
mobilePhone: ''
nickname: ''
otherPhone: ''
otherPhoneType: null
personalEmail: ''
state: ''
taxRegion: null
workEmail: contact@example.com
workPhone: ''
zipCode: ''
invoiceTemplateId: 2c9081a03c638994013c63978baf002b
invoiceTemplateName: InvoiceTemplateName
sequenceSetId: 6abcc30846de11e990900242ac1f0003
sequenceSetName: DEFAULT
soldToContact:
address1: ''
address2: ''
city: ''
country: null
county: null
fax: ''
firstName: Test
homePhone: ''
id: 2c9081a03c6d7b51013c6d7e46c80a17
lastName: Test
mobilePhone: ''
nickname: ''
otherPhone: ''
otherPhoneType: null
personalEmail: ''
state: ''
taxRegion: null
workEmail: contact@example.com
workPhone: ''
zipCode: ''
status: Active
invoiceScheduleId: ec6f0d5dc8af451ab95343fb3c588c1a
ratePlans:
- id: 8a8082c45aa81b51015ad68744030fe3
productId: 8a8082c45aa81b51015ad5a2d07d0e89
productName: ABC
productSku: SKU-00000987
productRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
ratePlanName: RatePlan 1
ratePlanCharges:
- id: 8a8082c45aa81b51015ad68744160fe4
originalChargeId: 8a8082c45aa81b51015ad68744160fe4
productRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
number: C-00032238
name: Annual Charge
type: Recurring
model: FlatFee
uom: null
version: 1
pricingSummary: USD100
priceChangeOption: NoChange
priceIncreasePercentage: null
currency: USD
price: 100
tiers: null
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: null
applyDiscountTo: null
discountLevel: null
discountClass: null
discountApplyDetails: null
billingDay: DefaultFromCustomer
listPriceBase: Per_Billing_Period
billingPeriod: Annual
specificBillingPeriod: null
billingTiming: IN_ADVANCE
billingPeriodAlignment: AlignToCharge
quantity: 1
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 1
effectiveStartDate: '2017-01-01'
effectiveEndDate: '2018-01-01'
processedThroughDate: null
chargedThroughDate: null
done: false
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: Subscription_End
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: 8.333333
dmrc: 8.333333
tcv: 100
dtcv: 100
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
- id: 8a8082c45aa81b51015ad68744240fe5
originalChargeId: 8a8082c45aa81b51015ad68744240fe5
productRatePlanChargeId: 8a8082c45aa81b51015ad683bc590fd8
number: C-00032239
name: Discount-Fixed 10
type: Recurring
model: DiscountFixedAmount
uom: null
version: 1
pricingSummary: USD10 fixed amount discount
priceChangeOption: null
priceIncreasePercentage: null
currency: USD
price: null
tiers: null
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: 10
applyDiscountTo: ONETIMERECURRINGUSAGE
discountLevel: subscription
discountClass: VIP Discount
discountApplyDetails:
- appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
appliedProductName: ABC
appliedProductRatePlanName: RatePlan 1
appliedProductRatePlanChargeName: Annual Charge
- appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
appliedProductName: ABC
appliedProductRatePlanName: RatePlan 1
appliedProductRatePlanChargeName: Annual Charge
billingDay: DefaultFromCustomer
listPriceBase: null
billingPeriod: Month
specificBillingPeriod: null
billingTiming: null
billingPeriodAlignment: AlignToCharge
quantity: null
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 1
effectiveStartDate: '2017-01-01'
effectiveEndDate: '2018-01-01'
processedThroughDate: null
chargedThroughDate: null
done: false
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: Subscription_End
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: 0
dmrc: 0
tcv: 0
dtcv: 0
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
- id: 4028818386ba85070186bab54f99573d
originalChargeId: 4028818386ba85070186bab54f065731
productRatePlanChargeId: 4028818386b61be50186b6293eb30017
number: C-00032240
name: Delivery Charge
type: Recurring
model: Delivery
uom: null
version: 1
subscriptionChargeDeliverySchedule:
frequency: Weekly
monday: false
tuesday: false
wednesday: false
thursday: false
friday: false
saturday: false
sunday: true
dayOfMonth: null
monthOfYear: null
subscriptionChargeIntervalPricing:
- sequence: 1
type: Day
duration: 365
price: 5.0
subscriptionChargeIntervalPriceTiers: []
- sequence: 2
type: Day
duration: 365
price: 7.0
subscriptionChargeIntervalPriceTiers: []
- sequence: 3
type: Infinity
duration: null
price: 9.0
subscriptionChargeIntervalPriceTiers: []
numberOfDeliveries: 52.0
pricingSummary: ''
priceChangeOption: null
priceIncreasePercentage: null
currency: USD
price: 9.0
tiers: null
chargeModelConfiguration: null
inputArgumentId: null
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: null
applyDiscountTo: null
discountLevel: null
discountClass: null
discountApplyDetails: null
billingDay: DefaultFromCustomer
listPriceBase: Per_Billing_Period
billingPeriod: Month
specificBillingPeriod: null
billingTiming: IN_ADVANCE
ratingGroup: null
billingPeriodAlignment: AlignToCharge
quantity: 1.0
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 3
effectiveStartDate: '2024-12-31'
effectiveEndDate: '2026-01-01'
processedThroughDate: null
chargedThroughDate: null
done: false
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: Subscription_End
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: 38.571428571
dmrc: 38.571428571
tcv: 468.0
dtcv: 468.0
originalOrderDate: '2023-01-01'
amendedByOrderOn: null
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
success: true
description: ''
schema:
$ref: '#/definitions/GETSubscriptionWrapper'
/v1/subscriptions/{subscription-key}:
put:
summary: Update a subscription
operationId: PUT_Subscription
description: "Use this call to make the following kinds of changes to a subscription:\n * Add a note\n * Change the renewal term or auto-renewal flag\n * Change the term length or change between evergreen and termed\n * Add a new product rate plan\n * Remove an existing subscription rate plan\n * Change the quantity or price of an existing subscription rate plan\n * Change rate plans - to replace the existing rate plans in a subscription with other rate plans. Changing rate plans is currently not supported for Billing - Revenue Integration. When Billing - Revenue Integration is enabled, changing rate plans will no longer be applicable in Zuora Billing.\n\n### Notes\n* 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.\n* In one request, this call can make:\n * Up to 9 combined add, update, and remove changes\n * No more than 1 change to terms & conditions\n* Updates are performed in the following sequence:\n 1. First change the notes on the existing subscription, if requested.\n 2. Then change the terms and conditions, if requested.\n 3. 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.\n* The update operation is atomic. If any of the updates fails, the entire operation is rolled back.\n* 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. \n* 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](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error occurs.\n\n### Override a Tiered Price\nThere are two ways you override a tiered price:\n\n* Override a specific tier number\nFor example: `tiers[{tier:1,price:8},{tier:2,price:6}]`\n\n* Override the entire tier structure\nFor example: `tiers[{tier:1,price:8,startingUnit:1,endingUnit:100,priceFormat:\"FlatFee\"},\n{tier:2,price:6,startingUnit:101,priceFormat:\"FlatFee\"}]`\n\nIf you just override a specific tier, do not include the `startingUnit` field in the request.\n"
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "\nThe minor version of the Zuora REST API. \n\nYou need to set this parameter if you use the following fields:\n* collect\n* invoice\n* includeExistingDraftDocItems\n* previewType\n* runBilling\n* targetDate\n* taxationItems\n\n\nIf you have the Invoice Settlement feature enabled, you need to specify this parameter. Otherwise, an error is returned.\n\n\nSee [Zuora REST API Versions](/api-references/api/overview/#section/API-Versions) for more information.\n"
- name: subscription-key
in: path
required: true
type: string
description: "\nSubscription number or ID. \nID can be the latest version or any history version of ID. \n* To make sure you update the last version of the subscription, use one of the following operations to retrieve the last version of ID:\n * [List subscriptions by account key](/api-references/api/operation/GET_SubscriptionsByAccount)\n * [Retrieve a subscription by key](/api-references/api/operation/GET_SubscriptionsByKey) by using the subscription number as the subscription-key\n* 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](http://support.zuora.com/) to enable the permission. To retrieve a history version of ID, use the [Retrieve a subscription by key and version](/api-references/api/operation/GET_SubscriptionsByKeyAndVersion) operation.\n"
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/PUTSubscriptionType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
subscriptionId: 4028bb83510f8ed7015114a503cf0373
totalDeltaMrr: 100.0
totalDeltaTcv: 4867.7419355
description: ''
schema:
$ref: '#/definitions/PUTSubscriptionResponseType'
get:
summary: Retrieve a subscription by key
operationId: GET_SubscriptionsByKey
description: 'This REST API reference describes how to retrieve detailed information about a specified subscription in the latest version.
'
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: subscription-key
in: path
description: "Possible values are:\n * a subscription number\n * a subscription ID\n"
required: true
type: string
- name: charge-detail
in: query
description: "\nThe 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.\n\nPossible values are:\n\n * __last-segment__: (Default) The last rate plan charge on the subscription. The last rate plan charge is the last one in the order of time on the subscription rather than the most recent changed charge on the subscription.\n * __current-segment__: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date < effectiveEndDate).\n \n * __all-segments__: All the segmented charges. The `chargeSegments` field is returned in the response. The `chargeSegments` field contains an array of the charge information for all the charge segments.\n\n * __specific-segment&as-of-date=date__: The segmented charge that is active on a date you specified ((specific date = effectiveStartDate) OR (effectiveStartDate < specific date < effectiveEndDate)). The format of the date is yyyy-mm-dd.\n"
required: false
type: string
- name: exclude-rate-plans-with-no-charges
in: query
required: false
type: boolean
description: 'If the `exclude-rate-plans-with-no-charges` is `true`, only the active charges and rate plans will be in the response. The default value is `false`.
'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
id: 8a8082c45aa81b51015ad68743ec0fdb
accountId: 8a8082c45aa81b51015ad64396090f5c
accountNumber: A00002641
accountName: ABCD
version: 1
revision: '1.0'
invoiceOwnerAccountId: 8a8082c45aa81b51015ad64396090f5c
invoiceOwnerAccountNumber: A00002641
invoiceOwnerAccountName: ABCD
subscriptionNumber: A-S00007412
termType: TERMED
invoiceSeparately: false
contractEffectiveDate: '2017-01-01'
serviceActivationDate: '2017-01-01'
customerAcceptanceDate: '2017-01-01'
subscriptionStartDate: '2017-01-01'
termStartDate: '2017-01-01'
termEndDate: '2018-01-01'
initialTerm: 12
initialTermPeriodType: Month
currentTerm: 12
currentTermPeriodType: Month
autoRenew: true
renewalSetting: RENEW_WITH_SPECIFIC_TERM
renewalTerm: 12
renewalTermPeriodType: Month
currency: USD
contractedMrr: 8.33
totalContractedValue: 100
notes: ''
status: Active
paymentTerm: Net 30
billToContact:
address1: ''
address2: ''
city: ''
country: null
county: null
fax: ''
firstName: Test
homePhone: ''
id: 2c9081a03c6d7b51013c6d7e46c80a17
lastName: Test
mobilePhone: ''
nickname: ''
otherPhone: ''
otherPhoneType: null
personalEmail: ''
state: ''
taxRegion: null
workEmail: contact@example.com
workPhone: ''
zipCode: ''
invoiceTemplateId: 2c9081a03c638994013c63978baf002b
invoiceTemplateName: InvoiceTemplateName
sequenceSetId: 6abcc30846de11e990900242ac1f0003
invoiceScheduleId: ec6f0d5dc8af451ab95343fb3c588c1a
sequenceSetName: DEFAULT
soldToContact:
address1: ''
address2: ''
city: ''
country: null
county: null
fax: ''
firstName: Test
homePhone: ''
id: 2c9081a03c6d7b51013c6d7e46c80a17
lastName: Test
mobilePhone: ''
nickname: ''
otherPhone: ''
otherPhoneType: null
personalEmail: ''
state: ''
taxRegion: null
workEmail: contact@example.com
workPhone: ''
zipCode: ''
ratePlans:
- id: 8a8082c45aa81b51015ad68744030fe3
productId: 8a8082c45aa81b51015ad5a2d07d0e89
productName: ABC
productSku: SKU-00000987
productRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
ratePlanName: RatePlan 1
ratePlanCharges:
- id: 8a8082c45aa81b51015ad68744160fe4
originalChargeId: 8a8082c45aa81b51015ad68744160fe4
productRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
number: C-00032238
name: Annual Charge
type: Recurring
model: FlatFee
uom: null
version: 1
pricingSummary: USD100
priceChangeOption: NoChange
priceIncreasePercentage: null
currency: USD
price: 100
tiers: null
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: null
applyDiscountTo: null
discountLevel: null
discountClass: null
discountApplyDetails: null
billingDay: DefaultFromCustomer
listPriceBase: Per_Billing_Period
billingPeriod: Annual
specificBillingPeriod: null
billingTiming: IN_ADVANCE
billingPeriodAlignment: AlignToCharge
quantity: 1
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 1
effectiveStartDate: '2017-01-01'
effectiveEndDate: '2018-01-01'
processedThroughDate: null
chargedThroughDate: null
done: false
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: Subscription_End
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: 8.333333
dmrc: 8.333333
tcv: 100
dtcv: 100
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
- id: 8a8082c45aa81b51015ad68744240fe5
originalChargeId: 8a8082c45aa81b51015ad68744240fe5
productRatePlanChargeId: 8a8082c45aa81b51015ad683bc590fd8
number: C-00032239
name: Discount-Fixed 10
type: Recurring
model: DiscountFixedAmount
uom: null
version: 1
pricingSummary: USD10 fixed amount discount
priceChangeOption: null
priceIncreasePercentage: null
currency: USD
price: null
tiers: null
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: 10
applyDiscountTo: ONETIMERECURRINGUSAGE
discountLevel: subscription
discountClass: VIP Discount
discountApplyDetails:
- appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
appliedProductName: ABC
appliedProductRatePlanName: RatePlan 1
appliedProductRatePlanChargeName: Annual Charge
billingDay: DefaultFromCustomer
listPriceBase: null
billingPeriod: Month
specificBillingPeriod: null
billingTiming: null
billingPeriodAlignment: AlignToCharge
quantity: null
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 1
effectiveStartDate: '2017-01-01'
effectiveEndDate: '2018-01-01'
processedThroughDate: null
chargedThroughDate: null
done: false
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: Subscription_End
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: 0
dmrc: 0
tcv: 0
dtcv: 0
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
- id: 4028818386ba85070186bab54f99573d
originalChargeId: 4028818386ba85070186bab54f065731
productRatePlanChargeId: 4028818386b61be50186b6293eb30017
number: C-00032240
name: Delivery Charge
type: Recurring
model: Delivery
uom: null
version: 1
subscriptionChargeDeliverySchedule:
frequency: Weekly
monday: false
tuesday: false
wednesday: false
thursday: false
friday: false
saturday: false
sunday: true
dayOfMonth: null
monthOfYear: null
subscriptionChargeIntervalPricing:
- sequence: 1
type: Day
duration: 365
price: 5.0
subscriptionChargeIntervalPriceTiers: []
- sequence: 2
type: Day
duration: 365
price: 7.0
subscriptionChargeIntervalPriceTiers: []
- sequence: 3
type: Infinity
duration: null
price: 9.0
subscriptionChargeIntervalPriceTiers: []
numberOfDeliveries: 52.0
pricingSummary: ''
priceChangeOption: null
priceIncreasePercentage: null
currency: USD
price: 9.0
tiers: null
chargeModelConfiguration: null
inputArgumentId: null
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: null
applyDiscountTo: null
discountLevel: null
discountClass: null
discountApplyDetails: null
billingDay: DefaultFromCustomer
listPriceBase: Per_Billing_Period
billingPeriod: Month
specificBillingPeriod: null
billingTiming: IN_ADVANCE
ratingGroup: null
billingPeriodAlignment: AlignToCharge
quantity: 1.0
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 3
effectiveStartDate: '2024-12-31'
effectiveEndDate: '2026-01-01'
processedThroughDate: null
chargedThroughDate: null
done: false
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: Subscription_End
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: 38.571428571
dmrc: 38.571428571
tcv: 468.0
dtcv: 468.0
originalOrderDate: '2023-01-01'
amendedByOrderOn: null
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
description: ''
schema:
$ref: '#/definitions/GETSubscriptionTypeWithSuccess'
/v1/subscriptions/{subscription-key}/versions/{version}:
get:
summary: Retrieve a subscription by key and version
operationId: GET_SubscriptionsByKeyAndVersion
description: 'This REST API reference describes how to retrieve detailed information about a specified subscription in a specified version. When you create a subscription amendment, you create a new version of the subscription. You can use this method to retrieve information about a subscription in any version.
'
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: subscription-key
in: path
description: 'Subscription number. For example, A-S00000135.
'
required: true
type: string
- name: version
in: path
description: 'Subscription version. For example, 1.
'
required: true
type: string
- name: charge-detail
in: query
description: "\nThe 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.\n\nPossible values are:\n\n * __last-segment__: (Default) The last rate plan charge on the subscription. The last rate plan charge is the last one in the order of time on the subscription rather than the most recent changed charge on the subscription.\n * __current-segment__: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date < effectiveEndDate).\n \n * __all-segments__: All the segmented charges. The `chargeSegments` field is returned in the response. The `chargeSegments` field contains an array of the charge information for all the charge segments.\n\n * __specific-segment&as-of-date=date__: The segmented charge that is active on a date you specified (effectiveStartDate <= specific date < effectiveEndDate). The format of the date is yyyy-mm-dd.\n"
required: false
type: string
- name: exclude-rate-plans-with-no-charges
in: query
required: false
type: boolean
description: 'If the `exclude-rate-plans-with-no-charges` is `true`, only the active charges and rate plans will be in the response. The default value is `false`.
'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
id: 2c9081a03c63c94c013c687b864e0195
accountId: 2c9081a03c63c94c013c66688a2c00bf
accountNumber: RestAPI
accountName: RestAPI
subscriptionNumber: A-S00000004
version: 1
revision: '1.0'
termType: TERMED
contractEffectiveDate: '2012-02-01'
serviceActivationDate: '2012-02-01'
customerAcceptanceDate: '2012-02-01'
subscriptionStartDate: '2012-02-01'
termStartDate: '2012-02-01'
termEndDate: '2013-02-01'
initialTermPeriodType: Week
currentTerm: 12
currentTermPeriodType: Week
autoRenew: false
renewalSetting: RENEW_WITH_SPECIFIC_TERM
renewalTerm: 0
renewalTermPeriodType: Week
currency: USD
contractedMrr: 26.67
totalContractedValue: 404.0
notes: ''
status: Active
invoiceScheduleId: ec6f0d5dc8af451ab95343fb3c588c1a
ratePlans:
- id: 2c9081a03c63c94c013c687b868901a4
productId: 2c9081a03c63c94c013c66499ef0001b
productName: OneTime
productSku: SKU-00000022
productRatePlanId: 2c9081a03c63c94c013c665102e5003a
ratePlanName: OT_Tiered
ratePlanCharges:
- id: 2c9081a03c63c94c013c687b868901a5
originalChargeId: 2c9081a03c63c94c013c687a92d70175
productRatePlanChargeId: 2c9081a03c63c94c013c6651d677003c
number: C-00000010
name: OT_Tiered
type: OneTime
model: Tiered
uom: Each
version: 1
pricingSummary: '0 to 10 Each: USD20 flat fee; 11 Each or more: USD4/Each'
priceChangeOption: null
priceIncreasePercentage: null
currency: USD
price: null
tiers:
- tier: 1
startingUnit: 0E-9
endingUnit: 10.0
price: 20.0
priceFormat: FlatFee
- tier: 2
startingUnit: 11.0
endingUnit: null
price: 4.0
priceFormat: PerUnit
includedUnits: null
overagePrice: null
discountPercentage: null
discountAmount: null
applyDiscountTo: null
discountLevel: null
billingDay: null
listPriceBase: null
billingPeriod: null
specificBillingPeriod: null
billingTiming: null
billingPeriodAlignment: null
quantity: 11.0
smoothingModel: null
numberOfPeriods: null
overageCalculationOption: null
overageUnusedUnitsCreditOption: null
unusedUnitsCreditRates: null
usageRecordRatingOption: null
segment: 1
effectiveStartDate: '2012-02-01'
effectiveEndDate: '2012-02-02'
processedThroughDate: '2012-02-02'
chargedThroughDate: '2012-02-02'
done: true
triggerDate: null
triggerEvent: ContractEffective
endDateCondition: One_Time
upToPeriodsType: null
upToPeriods: null
specificEndDate: null
mrr: null
dmrc: null
tcv: 24.0
dtcv: 24.0
description: ''
invoiceScheduleId: 8a8082c45aa81b51015ad68744240ff5
description: ''
schema:
$ref: '#/definitions/GETSubscriptionTypeWithSuccess'
/v1/subscriptions/{subscription-key}/renew:
put:
summary: Renew a subscription
operationId: PUT_RenewSubscription
description: "Renews a termed subscription using existing renewal terms. \nWhen you renew a subscription, the current subscription term is extended by creating a new term. \nIf any charge in your subscription has the billing period set as `SubscriptionTerm`, a new charge segment is generated for the new term.\n\n\n**Note**: 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](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error occurs.\n"
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "The minor version of the Zuora REST API. \n\nYou only need to set this parameter if you use the following fields:\n* invoice\n* collect\n* runBilling\n* targetDate \n"
- name: subscription-key
in: path
required: true
type: string
description: Subscription number or ID
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/PUTRenewSubscriptionType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
termStartDate: '2014-02-01'
success: true
termEndDate: '2014-05-01'
subscriptionId: 2c92c8f83dcbd8b1013dcce0f09100a5
description: ''
schema:
$ref: '#/definitions/PUTRenewSubscriptionResponseType'
/v1/subscriptions/{subscription-key}/cancel:
put:
summary: Cancel a subscription
operationId: PUT_CancelSubscription
description: 'This REST API reference describes how to cancel an active subscription.
**Note**: 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](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error occurs.
'
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "The minor version of the Zuora REST API. \n\nYou only need to set this parameter if you use the following fields:\n* invoice\n* collect\n* runBilling\n* targetDate \n"
- name: subscription-key
in: path
required: true
type: string
description: Subscription number or ID. Subscription status must be `Active`.
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/POSTSubscriptionCancellationType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
subscriptionId: 8a8082c453cd2a620154efc7bba0350e
cancelledDate: '2019-05-31'
totalDeltaMrr: 0
totalDeltaTcv: -703.2258065
invoiceId: 8a8082c453cd2a620153e426c7eb78b3
description: ''
schema:
$ref: '#/definitions/POSTSubscriptionCancellationResponseType'
/v1/subscriptions/{subscription-key}/resume:
put:
summary: Resume a subscription
operationId: PUT_ResumeSubscription
description: "This REST API reference describes how to resume a suspended subscription. \n\n**Note**: 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](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error occurs.\n"
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "The minor version of the Zuora REST API. \n\nYou only need to set this parameter if you use the following fields:\n* invoice\n* collect\n* runBilling\n* targetDate\n"
- name: subscription-key
in: path
required: true
type: string
description: Subscription number or ID. Subscription status must be Suspended.
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/PUTSubscriptionResumeType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
subscriptionId: 8a8082c4539c5bcc0153a752f9c87094
resumeDate: '2019-10-01'
termEndDate: '2020-01-31'
totalDeltaTcv: 396.7741935
description: ''
schema:
$ref: '#/definitions/PUTSubscriptionResumeResponseType'
/v1/subscriptions/{subscription-key}/suspend:
put:
summary: Suspend a subscription
operationId: PUT_SuspendSubscription
description: "This REST API reference describes how to suspend an active subscription. \n\n**Note**: 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](/api-references/api/overview/#section/API-Versions/Minor-Version). Otherwise, an error occurs.\n"
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: zuora-version
in: header
required: false
type: string
description: "The minor version of the Zuora REST API. \n\nYou only need to set this parameter if you use the following fields:\n* invoice\n* collect\n* runBilling\n* targetDate\n"
- name: subscription-key
in: path
required: true
type: string
description: Subscription number or ID. Subscription status must be Active.
- name: Request
in: body
description: ''
required: true
schema:
$ref: '#/definitions/PUTSubscriptionSuspendType'
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
subscriptionId: 8a8082c4539c5bcc0153a658a9636fcc
suspendDate: '2019-05-01'
resumeDate: '2016-06-01'
termEndDate: '2020-02-01'
totalDeltaTcv: -896.6666667
invoiceId: 8a8082c453bb061f0153c529bc921b4b
description: ''
schema:
$ref: '#/definitions/PUTSubscriptionSuspendResponseType'
/v1/subscriptions/{subscription-key}/delete:
put:
summary: Delete a subscription by number
operationId: PUT_DeleteSubscription
description: 'This REST API reference describes how to delete a subscription of the specified subscription number.
'
tags:
- Subscriptions
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: subscription-key
in: path
required: true
type: string
description: Subscription number
responses:
'200':
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
examples:
application/json:
success: true
description: ''
schema:
$ref: '#/definitions/PUTDeleteSubscriptionResponseType'
/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields:
put:
tags:
- Subscriptions
summary: Update subscription custom fields of a subscription version
description: 'Updates the custom fields of a specified subscription version.
'
operationId: PUT_UpdateSubscriptionCustomFieldsOfASpecifiedVersion
parameters:
- $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding'
- $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single'
- $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids'
- name: subscriptionNumber
in: path
description: The subscription number to be updated.
required: true
type: string
format: string
- name: version
in: path
description: The subscription version to be updated.
required: true
type: string
format: string
- name: body
in: body
description: ''
required: true
schema:
$ref: '#/definitions/PUTSubscriptionPatchSpecificVersionRequestType'
responses:
200:
headers:
Content-Encoding:
type: string
description: "This header is returned if you specify the `Accept-Encoding: gzip` request header and the response contains over 1000 bytes of data.\n\nNote that only the following MIME types support gzipped responses:\n - `application/json`\n - `application/xml`\n - `text/html`\n - `text/csv`\n - `text/plain`\n"
RateLimit-Limit:
type: string
description: 'The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Remaining:
type: number
description: 'The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
RateLimit-Reset:
type: number
description: 'The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
'
Zuora-Request-Id:
type: string
minLength: 36
maxLength: 36
description: 'The Zuora internal identifier of the API call. You cannot control the value of this header.
'
Zuora-Track-Id:
type: string
maxLength: 64
description: '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.
'
description: ''
schema:
$ref: '#/definitions/CommonResponseType'
examples:
application/json:
success: true
definitions:
PUTSrpAddType:
allOf:
- properties:
bookingDate:
description: "The booking date that you want to set for the amendment contract. The booking date of an amendment is the equivalent of the order date of an order. This field must be in the `yyyy-mm-dd` format. The default value is the current date when you make the API call. \n"
format: date
type: string
chargeOverrides:
description: 'This optional container is used to override the quantity of one or more product rate plan charges for this subscription.
'
items:
$ref: '#/definitions/PUTScAddType'
type: array
contractEffectiveDate:
description: 'The date when the amendment changes take effect. The format of the date is yyyy-mm-dd.
If there is already a future-dated Update Product amendment on the subscription, the `specificUpdateDate` field will be used instead of this field to specify when the Update Product amendment takes effect.
'
format: date
type: string
customerAcceptanceDate:
description: 'The date when the customer accepts the contract in 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
'
format: date
type: string
externalCatalogPlanId:
description: 'An external ID of the product rate plan to be added. You can use this field to specify a product rate plan that is imported from an external system. The value of the `externalCatalogPlanId` field must match one of the values that are predefined in the `externallyManagedPlanIds` field on a product rate plan.
**Note:** If both `externalCatalogPlanId` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externalIdSourceSystem:
description: 'The ID of the external source system. You can use this field and `externalCatalogPlanId` to specify a product rate plan that is imported from an external system.
**Note:** If both `externalCatalogPlanId`, `externalIdSourceSystem` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externallyManagedPlanId:
description: 'Indicates the unique identifier for the rate plan purchased on a third-party store. This field is used to represent a subscription rate plan created through third-party stores.
'
type: string
productRatePlanId:
description: 'ID of a product rate plan for this subscription
'
type: string
productRatePlanNumber:
description: 'Number of a product rate plan for this subscription
'
type: string
serviceActivationDate:
description: 'The date when the new product in the subscription is activated in 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
'
format: date
type: string
required:
- contractEffectiveDate
type: object
- $ref: '#/definitions/RatePlanObjectCustomFields'
title: add
PUTSrpChangeType:
allOf:
- properties:
bookingDate:
description: "The booking date that you want to set for the amendment contract. The booking date of an amendment is the equivalent of the order date of an order. This field must be in the `yyyy-mm-dd` format. The default value is the current date when you make the API call. \n"
format: date
type: string
chargeOverrides:
description: This optional container is used to override one or more product rate plan charges for this subscription.
items:
$ref: '#/definitions/PUTScAddType'
type: array
contractEffectiveDate:
description: Effective date of the new subscription, as yyyy-mm-dd.
format: date
type: string
customerAcceptanceDate:
description: 'The date when the customer accepts the contract in yyyy-mm-dd format.
When 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
'
format: date
type: string
effectivePolicy:
description: "The default value for the `effectivePolicy` field is as follows:\n * If the rate plan change (from old to new) is an upgrade, the effective policy is `EffectiveImmediately` by default.\n * If the rate plan change (from old to new) is a downgrade, the effective policy is `EffectiveEndOfBillingPeriod` by default.\n * Otherwise, the effective policy is `SpecificDate` by default.\n\n**Notes**: \n * When setting this field to `EffectiveEndOfBillingPeriod`, you cannot set the billing trigger dates for the subscription as the system will automatically set the trigger dates to the end of billing period.\n * When setting this field to `SpecificDate`, you must also set the `contractEffectiveDate` field.\n"
enum:
- EffectiveImmediately
- EffectiveEndOfBillingPeriod
- SpecificDate
type: string
externalCatalogPlanId:
description: 'An external ID of the rate plan to be removed. You can use this field to specify an existing rate plan in your subscription. The value of the `externalCatalogPlanId` field must match one of the values that are predefined in the `externallyManagedPlanIds` field on a product rate plan. However, if there are multiple rate plans with the same `productRatePlanId` value existing in the subscription, you must use the `ratePlanId` field to remove the rate plan. The `externalCatalogPlanId` field cannot be used to distinguish multiple rate plans in this case.
**Note:** Provide only one of `externalCatalogPlanId`, `ratePlanId` or `productRatePlanId`. If more than one field is provided then the request would fail.
'
type: string
externalIdSourceSystem:
description: 'The ID of the external source system. You can use this field and `externalCatalogPlanId` to specify a product rate plan that is imported from an external system.
**Note:** If both `externalCatalogPlanId`, `externalIdSourceSystem` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
newExternalCatalogPlanId:
description: 'An external ID of the product rate plan to be added. You can use this field to specify a product rate plan that is imported from an external system. The value of the `externalCatalogPlanId` field must match one of the values that are predefined in the `externallyManagedPlanIds` field on a product rate plan.
**Note:** Provide only one of `newExternalCatalogPlanId` or `newProductRatePlanId`. If both fields are provided then the request would fail.
'
type: string
newExternalIdSourceSystem:
description: 'The ID of the external source system. You can use this field and `newExternalCatalogPlanId` to specify a product rate plan that is imported from an external system.
**Note:** If both `newExternalCatalogPlanId`, `newExternalIdSourceSystem` and `newProductRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
newProductRatePlanId:
description: ID of a product rate plan for this subscription.
type: string
newProductRatePlanNumber:
description: Number of a product rate plan for this subscription.
type: string
productRatePlanId:
description: 'ID of the product rate plan that the removed rate plan is based on.
'
type: string
productRatePlanNumber:
description: 'Number of a product rate plan for this subscription. '
type: string
ratePlanId:
description: 'ID of a rate plan to remove. Note that the removal of a rate plan through the Change Plan amendment supports the function of removal before future-dated removals, as in a Remove Product amendment.
'
type: string
resetBcd:
default: false
description: 'If resetBcd is true then reset the Account BCD to the effective date; if it is false keep the original BCD.
'
type: boolean
serviceActivationDate:
description: 'The date when the change in the subscription is activated in 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'
format: date
type: string
subType:
description: "Use this field to choose the sub type for your change plan amendment. \n\nHowever, if you do not set this field, the field will be automatically generated by the system according to the following rules:\n\nWhen the old and new rate plans are within the same Grading catalog group:\n* If the grade of new plan is greater than that of the old plan, this is an \"Upgrade\".\n* If the grade of new plan is less than that of the old plan, this is a \"Downgrade\".\n* If the grade of new plan equals that of the old plan, this is a \"Crossgrade\".\n\nWhen the old and new rate plans are not in the same Grading catalog group, or either has no group, this is \"PlanChanged\".\n"
enum:
- Upgrade
- Downgrade
- Crossgrade
- PlanChanged
type: string
subscriptionRatePlanNumber:
description: 'Number of a rate plan for this subscription. '
type: string
type: object
- $ref: '#/definitions/RatePlanObjectCustomFields'
title: change
SubscriptionOfferObjectCustomFields:
additionalProperties:
description: 'Custom fields of the Subscription Offer object. The name of each custom field has the form *customField*__c. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
'
description: 'Container for custom fields of a Subscription Offer object.
'
title: subscriptionOfferFieldsCustom
type: object
POSTSubscriptionPreviewResponseType:
properties:
amount:
description: 'Invoice amount.
'
type: number
amountWithoutTax:
description: 'Invoice amount minus tax.
'
type: number
chargeMetrics:
description: 'Container for charge metrics.
'
properties:
dmrr:
description: 'Change in monthly recurring revenue.
'
type: string
dtcv:
description: 'Change in total contract value.
'
type: string
mrr:
description: 'Monthly recurring revenue.
'
type: string
number:
description: 'The charge number of the subscription. Only available for update subscription.
'
type: string
originRatePlanId:
description: 'The origin rate plan ID. Only available for update subscription.
'
type: string
originalId:
description: 'The original rate plan charge ID. Only available for update subscription.
'
type: string
productRatePlanChargeId:
description: 'The product rate plan charge ID.
'
type: string
productRatePlanId:
description: 'The product rate plan ID.
'
type: string
tcv:
description: 'Total contract value.
'
type: string
type: object
contractedMrr:
description: 'Monthly recurring revenue of the subscription.
'
type: number
creditMemo:
description: "\nContainer for credit memos.\n\n**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. \n"
properties:
amount:
description: Credit memo amount.
format: double
type: number
amountWithoutTax:
description: Credit memo amount minus tax.
format: double
type: number
creditMemoItems:
description: ''
items:
$ref: '#/definitions/POSTSubscriptionPreviewCreditMemoItemsType'
type: array
taxAmount:
description: Tax amount on the credit memo.
format: double
type: number
type: object
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
invoice:
description: "Container for invoices.\n\n\n **Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header. Also, the response structure is changed and the following invoice related response fields are moved to this **invoice** container:\n \n * amount\n * amountWithoutTax\n * taxAmount\n * invoiceItems\n * targetDate\n"
properties:
amount:
description: Invoice amount.
type: number
amountWithoutTax:
description: 'Invoice amount minus tax.
'
type: number
invoiceItems:
description: 'Container for invoice items.
'
items:
$ref: '#/definitions/POSTSubscriptionPreviewInvoiceItemsType'
type: array
targetDate:
description: 'Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.
**Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header.
'
type: string
taxAmount:
description: 'The tax amount of the invoice.
'
type: number
type: object
invoiceItems:
description: 'Container for invoice items.
'
items:
$ref: '#/definitions/POSTSubscriptionPreviewInvoiceItemsType'
type: array
invoiceTargetDate:
description: 'Date through which charges are calculated on the invoice, as yyyy-mm-dd.
**Note:** This field is only available if you do not specify the Zuora REST API minor version or specify the minor version to 186.0, 187.0, 188.0, 189.0, 196.0, and 206.0.
'
format: date
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
targetDate:
description: 'Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.
**Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header.
'
format: date
type: string
taxAmount:
description: 'Tax amount on the invoice.
'
type: number
totalContractedValue:
description: 'Total contracted value of the subscription.
'
type: number
type: object
PUTSubscriptionResumeType:
example:
collect: false
contractEffectiveDate: '2019-02-01'
creditMemoReasonCode: Unsatisfactory service
extendsTerm: true
resumePolicy: SpecificDate
resumeSpecificDate: '2019-10-01'
runBilling: true
properties:
applicationOrder:
description: "The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.\n\n**Note:**\n - This field is valid only if the `applyCredit` field is set to `true`.\n - If no value is specified for this field, the default priority order is used, [\"CreditMemo\", \"UnappliedPayment\"], to apply credit memos first and then apply unapplied payments.\n - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `[\"CreditMemo\"]`, only credit memos are used to apply to invoices.\n"
items:
type: string
type: array
applyCredit:
description: 'If the value is true, the credit memo or unapplied payment on the order account will be automatically applied to the invoices generated by this order. The credit memo generated by this order will not be automatically applied to any invoices.
**Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: boolean
applyCreditBalance:
description: "Whether to automatically apply a credit balance to an invoice.\n\nIf the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.\n\n\nTo view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.\n\nPrerequisite: `invoice` must be `true`. \n\n**Note:** \n - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.\n - This field is deprecated if you have the Invoice Settlement feature enabled.\n"
type: boolean
bookingDate:
description: "The booking date that you want to set for the amendment contract when you resume the subscription. If `extendsTerm` is `true`, which means you also extend the term, then this field is also the booking date for the Terms and Conditions amendment contract.\n\nThis field must be in the `yyyy-mm-dd` format. The default value of this field is the current date when you make the API call. \n"
format: date
type: string
collect:
default: false
description: "Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.\n\nIf the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.\n\nPrerequisite: The `invoice` or `runBilling` field must be `true`. \n\n**Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).\n"
type: boolean
contractEffectiveDate:
description: 'The date when the customer notifies you that they want to resume their subscription.
'
format: date
type: string
creditMemoReasonCode:
description: A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code.
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
extendsTerm:
description: 'Whether to extend the subscription term by the length of time the suspension is in effect.
Values: `true`, `false`.
'
type: boolean
invoice:
description: '**Note:** This field has been replaced by the `runBilling` field. The
`invoice` field is only available for backward compatibility.
Creates an invoice for a subscription. The invoice generated in this
operation is only for this subscription, not for the entire customer
account.
If the value is `true`, an invoice is created. If the value is
`false`, no action is taken. The default value is `false`.
This field is in Zuora REST API version control. Supported minor
versions are `196.0` and `207.0`. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
type: boolean
invoiceCollect:
default: false
description: '**Note:** This field has been replaced by the `invoice` field
and the `collect` field. `invoiceCollect` is available only for backward
compatibility.
If `true`, an invoice is generated and payment collected automatically during
the subscription process. If `false`, no invoicing or payment
takes place. The invoice generated in this operation is only for this subscription,
not for the entire customer account.
**Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
'
type: boolean
invoiceTargetDate:
description: '**Note:** This field has been replaced by the `targetDate` field. The
`invoiceTargetDate` field is only available for backward
compatibility.
Date through which to calculate charges if an invoice is generated, as
yyyy-mm-dd. Default is current date.
This field is in Zuora REST API version control. Supported minor
versions are `207.0` and earlier [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
format: date
type: string
orderDate:
description: 'The date when the order is signed. If no additinal contractEffectiveDate is provided, this order will use this order date as the contract effective date.
This field must be in the `yyyy-mm-dd` format.
This field is required for Orders customers only, not applicable to Orders Harmonization customers.
'
format: date
type: string
resumePeriods:
description: 'The length of the period used to specify when the subscription is resumed. The subscription resumption takes effect after a specified period based on the suspend date or today''s date. You must use this field together with the `resumePeriodsType` field to specify the period.
**Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
'
type: string
resumePeriodsType:
description: 'The period type used to define when the subscription resumption takes effect. The subscription resumption takes effect after a specified period based on the suspend date or today''s date. You must use this field together with the `resumePeriods` field to specify the period.
Values: `Day`, `Week`, `Month`, `Year`
**Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
'
type: string
resumePolicy:
description: 'Resume methods. Specify a way to resume a subscription.
Values:
* `Today`: The subscription resumption takes effect on today''s date.
* `FixedPeriodsFromSuspendDate`: The subscription resumption takes effect after a specified period based on the suspend date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.
* `SpecificDate`: The subscription resumption takes effect on a specific date. You must define the specific date in the `resumeSpecificDate` field.
* `FixedPeriodsFromToday`: The subscription resumption takes effect after a specified period based on the today''s date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.
* `suspendDate`: The subscription resumption takes effect on the date of suspension of the subscription.
'
type: string
resumeSpecificDate:
description: 'A specific date when the subscription resumption takes effect, in the format yyyy-mm-dd.
**Note:** This field is only applicable only when the `resumePolicy` field is set to `SpecificDate`.
The value should not be earlier than the subscription suspension date.
'
format: date
type: string
runBilling:
default: false
description: "Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). \n\n\nThe billing documents generated\nin this operation is only for this subscription, not for the entire\ncustomer account.\n\n\nPossible values:\n\n- `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.\n\n\n- `false`: No invoice is created.\n\n\n**Note:** This field is in Zuora REST API version control. Supported\nminor versions are `211.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method,\nyou must set the `zuora-version` parameter to the minor version number\nin the request header.\n"
enum:
- true
- false
type: boolean
targetDate:
description: 'Date through which to calculate charges if an invoice or a credit memo is generated, as
yyyy-mm-dd. Default is current date.
**Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.
This field is in Zuora REST API version control. Supported minor
versions are `211.0` and later. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
format: date
type: string
required:
- resumePolicy
type: object
GETIntervalPriceType:
properties:
duration:
description: 'Duration period of this interval.
'
type: integer
price:
description: 'Price of this interval.
'
type: number
sequence:
description: 'A system-generated number that indicates the sequence in which each interval price is billed.
'
type: integer
subscriptionChargeIntervalPriceTiers:
items:
$ref: '#/definitions/GETIntervalPriceTierType'
type: array
type:
description: 'Interval type of this pricing.
'
enum:
- Day
- Month
- Infinity
type: string
title: IntervalPricing
type: object
POSTScCreateType:
allOf:
- properties:
amendedByOrderOn:
description: 'The date when the rate plan charge is amended through an order or amendment. This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
'
type: string
applyDiscountTo:
description: 'Specifies the type of charges that you want a specific discount to apply to.
Values:
* `ONETIME`
* `RECURRING`
* `USAGE`
* `ONETIMERECURRING`
* `ONETIMEUSAGE`
* `RECURRINGUSAGE`
* `ONETIMERECURRINGUSAGE`
'
type: string
billCycleDay:
description: 'Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month the customer is billed.
Values: `1`-`31`
'
type: string
billCycleType:
description: 'Specifies how to determine the billing day for the charge. When this field is set to `SpecificDayofMonth`, set the `BillCycleDay` field. When this field is set to `SpecificDayofWeek`, set the `weeklyBillCycleDay` field.
Values:
* `DefaultFromCustomer`
* `SpecificDayofMonth`
* `SubscriptionStartDay`
* `ChargeTriggerDay`
* `SpecificDayofWeek`
'
type: string
billingPeriod:
description: 'Billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).
Values:
* `Month`
* `Quarter`
* `Semi_Annual`
* `Annual`
* `Eighteen_Months`
* `Two_Years`
* `Three_Years`
* `Five_Years`
* `Specific_Months`
* `Subscription_Term`
* `Week`
* `Specific_Weeks`
'
type: string
billingPeriodAlignment:
description: 'Aligns charges within the same subscription if multiple charges begin on different dates.
Values:
* `AlignToCharge`
* `AlignToSubscriptionStart`
* `AlignToTermStart`
'
type: string
billingTiming:
description: 'Billing timing for the charge for recurring charge types. Not avaliable for one time, usage, and discount charges.
Values:
* `IN_ADVANCE` (default)
* `IN_ARREARS`
'
type: string
chargeModelConfiguration:
$ref: '#/definitions/ChargeModelConfigurationType'
description:
description: 'Description of the charge.
'
type: string
discountAmount:
description: 'Specifies the amount of fixed-amount discount.
'
type: number
discountLevel:
description: 'Specifies if the discount applies to the product rate plan only, the entire subscription, or to any activity in the account.
Values:
* `rateplan`
* `subscription`
* `account`
'
type: string
discountPercentage:
description: "Percentage of discount for a percentage discount. \n"
type: number
endDateCondition:
description: 'Defines when the charge ends after the charge trigger date. If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.
Values:
* `Subscription_End`
* `Fixed_Period`
* `Specific_End_Date`
* `One_Time`
'
type: string
excludeItemBillingFromRevenueAccounting:
default: false
description: 'The flag to exclude rate plan charge related invoice items, invoice item adjustments, credit memo items, and debit memo items from revenue accounting.
**Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
'
type: boolean
excludeItemBookingFromRevenueAccounting:
default: false
description: 'The flag to exclude rate plan charges from revenue accounting.
**Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
'
type: boolean
includedUnits:
description: 'Specifies the number of units in the base set of units for this charge. Must be >=`0`.
'
type: number
isAllocationEligible:
description: 'This field is used to identify if the charge segment is allocation eligible in revenue recognition.
**Note**: This feature is in the **Early Adopter** phase. If you want to use the feature, submit a request at Zuora Global Support, and we will evaluate whether the feature is suitable for your use cases.
'
type: boolean
isUnbilled:
description: 'This field is used to dictate how to perform the accounting during revenue recognition.
**Note**: This feature is in the **Early Adopter** phase. If you want to use the feature, submit a request at Zuora Global Support, and we will evaluate whether the feature is suitable for your use cases.
'
type: boolean
listPriceBase:
description: 'The list price base for the product rate plan charge.
Values:
* `Per_Billing_Period`
* `Per_Month`
* `Per_Week`
* `Per_Year`
* `Per_Specific_Months`
'
type: string
number:
description: 'Unique number that identifies the charge. Max 50 characters. System-generated if not provided.
'
type: string
numberOfPeriods:
description: 'Specifies the number of periods to use when calculating charges in an overage smoothing charge model.
'
format: int64
type: integer
originalOrderDate:
description: 'The date when the rate plan charge is created through an order or amendment. This field is not updatable.
This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
'
format: date
type: string
overagePrice:
description: 'Price for units over the allowed amount.
'
type: number
overageUnusedUnitsCreditOption:
description: 'Determines whether to credit the customer with unused units of usage.
Values:
* `NoCredit`
* `CreditBySpecificRate`
'
type: string
price:
description: 'Price for units in the subscription rate plan.
'
type: number
priceChangeOption:
description: 'Applies an automatic price change when a termed subscription is renewed. The Billing Admin setting **Enable Automatic Price Change When Subscriptions are Renewed?** must be set to Yes to use this field.
Values:
* `NoChange` (default)
* `SpecificPercentageValue`
* `UseLatestProductCatalogPricing`
'
type: string
priceIncreasePercentage:
description: "Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Required if you set the `PriceChangeOption` field to `SpecificPercentageValue`. \n\nValue must be a decimal between `-100` and `100`.\n"
type: number
productRatePlanChargeId:
description: 'ID of a product rate-plan charge for this subscription.
'
type: string
productRatePlanChargeNumber:
description: 'Number of a product rate-plan charge for this subscription.
'
type: string
quantity:
description: "Number of units. Must be a decimal >=`0`. \n\nWhen using `chargeOverrides` for creating subscriptions with recurring charge types, the `quantity` field must be populated when the charge model is \"Tiered Pricing\" or \"Volume Pricing\". It is not required for \"Flat Fee Pricing\" charge model.\n"
type: number
ratingGroup:
description: "Specifies a rating group based on which usage records are rated.\n\nPossible values:\n\n- `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.\n- `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. \n- `ByUsageRecord`: The rating is based on each usage record.\n- `ByUsageUpload`: The rating is based on all the usages in a uploaded usage file (`.xls` or `.csv`).\n- `ByGroupId`: The rating is based on all the usages in a custom group.\n\n**Note:** \n- The `ByBillingPeriod` value can be applied for all charge models. \n- The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. \n- The `ByGroupId` value is only available if you have the Active Rating feature enabled.\n- Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.\n"
type: string
specificBillingPeriod:
description: 'Specifies the number of month or week for the charges billing period. Required if you set the value of the `billingPeriod` field to `Specific_Months` or `Specific_Weeks`.
'
format: int64
type: integer
specificEndDate:
description: 'Defines when the charge ends after the charge trigger date.
**note:**
* This field is only applicable when the `endDateCondition` field is set to `Specific_End_Date`.
* If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
'
format: date
type: string
specificListPriceBase:
description: "The number of months for the list price base of the charge. This field is required if you set the value of the `listPriceBase` field to `Per_Specific_Months`.\n\n**Note**: \n - This field is available only if you have the Annual List Price feature enabled.\n - The value of this field is `null` if you do not set the value of the `listPriceBase` field to `Per_Specific_Months`.\n"
format: int32
maximum: 200
minimum: 1
type: integer
tiers:
description: 'Container for Volume, Tiered, or Tiered with Overage charge models. Supports the following charge types:
* One-time
* Recurring
* Usage-based
'
items:
$ref: '#/definitions/POSTTierType'
type: array
triggerDate:
description: 'Specifies when to start billing the customer for the charge. Required if the `triggerEvent` field is set to `USD`.
'
format: date
type: string
triggerEvent:
description: 'Specifies when to start billing the customer for the charge.
Values:
* `UCE`
* `USA`
* `UCA`
* `USD`
'
type: string
unusedUnitsCreditRates:
description: 'Specifies the rate to credit a customer for unused units of usage. This field applies only for overage charge models when the `OverageUnusedUnitsCreditOption` field is set to `CreditBySpecificRate`.
'
type: number
upToPeriods:
description: "Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.\n\n**Note:** You must use this field together with the `upToPeriodsType` field to specify the time period.\n\n* This field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. \n* If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.\n"
format: int64
type: integer
upToPeriodsType:
description: "\nThe period type used to define when the charge ends. \n\nValues:\n\n* `Billing_Periods`\n* `Days`\n* `Weeks`\n* `Months`\n* `Years`\n\nYou must use this field together with the `upToPeriods` field to specify the time period.\n\nThis field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. \n"
type: string
weeklyBillCycleDay:
description: "Specifies which day of the week is the bill cycle day (BCD) for the charge. \n\nValues:\n\n* `Sunday`\n* `Monday`\n* `Tuesday`\n* `Wednesday`\n* `Thursday`\n* `Friday`\n* `Saturday`\n"
type: string
required:
- productRatePlanChargeId
type: object
- $ref: '#/definitions/RatePlanChargeObjectCustomFields'
title: chargeOverrides
GETIntervalPriceTierType:
properties:
endingUnit:
description: 'Decimal defining end of tier range.
'
type: number
isOveragePrice:
description: 'True if the price is overage price for the tier.
'
type: boolean
price:
description: 'The decimal value of the tiered charge model. If the charge model is not a tiered type then this price field will be null and the `price` field directly under the `productRatePlanCharges` applies.
'
type: number
priceFormat:
description: 'Tier price format. Allowed values: `flat fee`, `per unit`.
'
type: string
startingUnit:
description: 'Decimal defining start of tier range.
'
type: number
tier:
description: 'Unique number of the tier.
'
format: int64
type: integer
title: IntervalPricing
type: object
AccountObjectCustomFields:
additionalProperties:
description: 'Custom fields of the Account object. The name of each custom field has the form *customField*__c. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
'
description: 'Container for custom fields of an Account object.
'
title: accountFieldsCustom
type: object
SubscriptionObjectQTFields:
description: 'Container for Subscription fields provided by Zuora Quotes.
'
properties:
CpqBundleJsonId__QT:
description: 'The Bundle product structures from Zuora Quotes if you utilize Bundling in Salesforce. Do not change the value in this field.
'
maxLength: 32
type: string
OpportunityCloseDate__QT:
description: '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.
'
format: date
type: string
OpportunityName__QT:
description: '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.
'
maxLength: 100
type: string
QuoteBusinessType__QT:
description: '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.
'
maxLength: 32
type: string
QuoteNumber__QT:
description: '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.
'
maxLength: 32
type: string
QuoteType__QT:
description: '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.
'
maxLength: 32
type: string
title: subscriptionFieldsQT
type: object
AccountObjectNSFields:
description: 'Container for Account fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
properties:
Class__NS:
description: 'Value of the Class field for the corresponding customer account in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
CustomerType__NS:
description: 'Value of the Customer Type field for the corresponding customer account in NetSuite. The Customer Type field is used when the customer account is created in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
enum:
- Company
- Individual
type: string
Department__NS:
description: 'Value of the Department field for the corresponding customer account in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
IntegrationId__NS:
description: 'ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
IntegrationStatus__NS:
description: 'Status of the account''s synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
Location__NS:
description: 'Value of the Location field for the corresponding customer account in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
Subsidiary__NS:
description: 'Value of the Subsidiary field for the corresponding customer account in NetSuite. The Subsidiary field is required if you use NetSuite OneWorld. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
SyncDate__NS:
description: 'Date when the account was sychronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
SynctoNetSuite__NS:
description: 'Specifies whether the account should be synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
enum:
- 'Yes'
- 'No'
type: string
title: accountFieldsNetSuite
type: object
CommonResponseType:
properties:
processId:
description: 'The Id of the process that handle the operation.
'
type: string
reasons:
items:
properties:
code:
description: 'The error code of response.
'
type: string
message:
description: 'The detail information of the error response
'
type: string
type: object
type: array
success:
description: 'Indicates whether the call succeeded.
'
type: boolean
type: object
PUTSubscriptionPreviewInvoiceItemsType:
properties:
chargeAmount:
description: 'The amount of the charge. This amount doesn''t include taxes unless the charge''s tax mode is inclusive.
'
type: number
chargeDescription:
description: 'Description of the charge.
'
type: string
chargeName:
description: 'Name of the charge
'
type: string
productName:
description: 'Name of the product associated with this item.
'
type: string
productRatePlanChargeId:
description: ''
type: string
quantity:
description: 'Quantity of this item.
'
type: number
serviceEndDate:
description: 'End date of the service period for this item, i.e., the last day of the period, as yyyy-mm-dd.
'
format: date
type: string
serviceStartDate:
description: 'Service start date as yyyy-mm-dd. If the charge is a one-time fee, this is the date of that charge.
'
format: date
type: string
taxationItems:
description: 'List of taxation items.
**Note**: This field is only available if you set the `zuora-version` request header to `315.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). '
items:
$ref: '#/definitions/POSTSubscriptionPreviewTaxationItemsType'
type: array
unitOfMeasure:
description: ''
type: string
title: invoiceItems
type: object
GETSubscriptionRatePlanChargesType:
allOf:
- properties:
amendedByOrderOn:
description: 'The date when the rate plan charge is amended through an order or amendment. This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
'
type: string
applyDiscountTo:
description: "Specifies the type of charges a specific discount applies to. \n\nThis field is only used when applied to a discount charge model. If you are not using a discount charge model, the value is null.\n\nPossible values:\n\n* `RECURRING`\n* `USAGE`\n* `ONETIMERECURRING`\n* `ONETIMEUSAGE`\n* `RECURRINGUSAGE`\n* `ONETIMERECURRINGUSAGE`\n"
type: string
applyToBillingPeriodPartially:
description: 'Allow the discount duration to be aligned with the billing period partially.
**Note**: This field is only available if you have the [Enhanced Discounts](https://knowledgecenter.zuora.com/Zuora_Billing/Build_products_and_prices/Basic_concepts_and_terms/B_Charge_Models/D_Manage_Enhanced_Discount) feature enabled.
'
type: boolean
billingDay:
description: "Billing cycle day (BCD), which is when bill runs generate invoices\nfor charges associated with the product rate plan charge or the account. \n\nValues:\n\n* `DefaultFromCustomer`\n* `SpecificDayofMonth(# of the month)`\n* `SubscriptionStartDay`\n* `ChargeTriggerDay`\n* `SpecificDayofWeek/dayofweek`: in which dayofweek is the day in the week you define your billing periods to start.\n\nIn the response data, a day-of-the-month ordinal value (`first`-`31st`) appears in place of the hash sign above (\"#\"). If this value exceeds the number of days in a particular month, the last day of the month is used as the BCD.\n"
type: string
billingPeriod:
description: 'Allows billing period to be overridden on the rate plan charge.
'
type: string
billingPeriodAlignment:
description: 'Possible values:
* `AlignToCharge`
* `AlignToSubscriptionStart`
* `AlignToTermStart`
'
type: string
billingTiming:
description: 'The billing timing for the charge. This field is only used if the `ratePlanChargeType` value is `Recurring`.
Possible values are:
* `In Advance`
* `In Arrears`
**Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
'
type: string
chargeModelConfiguration:
$ref: '#/definitions/ChargeModelConfigurationType'
chargedThroughDate:
description: 'The date through which a customer has been billed for the charge.
'
format: date
type: string
creditOption:
description: "**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled. \nTo use this field, you must set the `X-Zuora-WSDL-Version` request header to 114 or higher. Otherwise, an error occurs. \nThe way to calculate credit. See [Credit Option](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge#Credit_Option) for more information.\n"
enum:
- TimeBased
- ConsumptionBased
- FullCreditBack
type: string
currency:
description: 'Currency used by the account. For example, `USD` or `EUR`.
'
type: string
description:
description: 'Description of the rate plan charge.
'
type: string
discountAmount:
description: 'The amount of the discount.
'
type: number
discountApplyDetails:
description: "Container for the application details about a discount rate plan charge. \n\nOnly discount rate plan charges have values in this field.\n"
items:
$ref: '#/definitions/GETDiscountApplyDetailsType'
type: array
discountClass:
description: 'The class that the discount belongs to. The discount class defines the order in which discount rate plan charges are applied.
For more information, see [Manage Discount Classes](https://knowledgecenter.zuora.com/BC_Subscription_Management/Product_Catalog/B_Charge_Models/Manage_Discount_Classes).
'
type: string
discountLevel:
description: 'The level of the discount. Values: `RatePlan`, `Subscription`, `Account`.
'
type: string
discountPercentage:
description: 'The amount of the discount as a percentage.
'
type: number
dmrc:
description: 'The change (delta) of monthly recurring charge exists when the change in monthly recurring revenue caused by an amendment or a new subscription.
'
type: number
done:
description: 'A value of `true` indicates that an invoice for a charge segment has been completed. A value of `false` indicates that an invoice has not been completed for the charge segment.
'
type: boolean
drawdownRate:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
The [conversion rate](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_drawdown_charge#UOM_Conversion) between Usage UOM and Drawdown UOM for a [drawdown charge](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_drawdown_charge). Must be a positive number (>0).
'
type: number
drawdownUom:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
Unit of measurement for a [drawdown charge](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_drawdown_charge).
'
type: string
dtcv:
description: 'After an amendment or an AutomatedPriceChange event, `dtcv` displays the change (delta) for the total contract value (TCV) amount for this charge, compared with its previous value with recurring charge types.
'
type: number
effectiveEndDate:
description: 'The effective end date of the rate plan charge.
'
format: date
type: string
effectiveStartDate:
description: 'The effective start date of the rate plan charge.
'
format: date
type: string
endDateCondition:
description: 'Defines when the charge ends after the charge trigger date.
If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.
Values:
* `Subscription_End`
* `Fixed_Period`
* `Specific_End_Date`
* `One_Time`
'
type: string
excludeItemBillingFromRevenueAccounting:
description: "The flag to exclude rate plan charge related invoice items, invoice item adjustments, credit memo items, and debit memo items from revenue accounting.\n\n**Note**: This field is only available if you have the Billing - Revenue Integration feature enabled. \n"
type: boolean
excludeItemBookingFromRevenueAccounting:
description: "The flag to exclude rate plan charges from revenue accounting.\n\n**Note**: This field is only available if you have the Billing - Revenue Integration feature enabled. \n"
type: boolean
id:
description: 'Rate plan charge ID.
'
type: string
includedUnits:
description: 'Specifies the number of units in the base set of units.
'
type: number
invoiceScheduleId:
description: 'The ID of the invoice schedule associated with the rate plan charge on the subscription.
**Note**: This field is available only if you have the Billing Schedule feature enabled.
'
type: string
isAllocationEligible:
description: 'This field is used to identify if the charge segment is allocation eligible in revenue recognition.
**Note**: This feature is in the **Early Adopter** phase. If you want to use the feature, submit a request at Zuora Global Support, and we will evaluate whether the feature is suitable for your use cases.
'
type: boolean
isPrepaid:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
Indicates whether this charge is a prepayment (topup) charge or a drawdown charge. Values: `true` or `false`.
'
type: boolean
isRollover:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
The value is either "True" or "False". It determines whether the rollover fields are needed.
'
type: boolean
isStackedDiscount:
description: "**Note**: This field is only applicable to the Discount - Percentage charge model.\n\nTo use this field, you must set the `X-Zuora-WSDL-Version` request header to 130 or higher. Otherwise, an error occurs.\n\nThis field indicates whether the discount is to be calculated as stacked discount. Possible values are as follows:\n - `True`: This is a stacked discount, which should be calculated by stacking with other discounts.\n - `False`: This is not a stacked discount, which should be calculated in sequence with other discounts.\n\nFor more information, see [Stacked discounts](https://knowledgecenter.zuora.com/Zuora_Billing/Products/Product_Catalog/B_Charge_Models/B_Discount_Charge_Models).\n"
type: boolean
isUnbilled:
description: 'This field is used to dictate how to perform the accounting during revenue recognition.
**Note**: This feature is in the **Early Adopter** phase. If you want to use the feature, submit a request at Zuora Global Support, and we will evaluate whether the feature is suitable for your use cases.
'
type: boolean
listPriceBase:
description: 'List price base; possible values are:
* `Per_Billing_Period`
* `Per_Month`
* `Per_Week`
* `Per_Year`
* `Per_Specific_Months`
'
type: string
model:
description: 'Charge model; possible values are:
* `FlatFee`
* `PerUnit`
* `Overage`
* `Volume`
* `Tiered`
* `TieredWithOverage`
* `DiscountFixedAmount`
* `DiscountPercentage`
* `MultiAttributePricing`
* `PreratedPerUnit`
* `PreratedPricing`
* `HighWatermarkVolumePricing`
* `HighWatermarkTieredPricing`
* `Delivery`
'
type: string
mrr:
description: 'Monthly recurring revenue of the rate plan charge.
'
type: number
name:
description: 'Charge name.
'
type: string
number:
description: 'Charge number.
'
type: string
numberOfDeliveries:
description: "Number of deliveries in the billing period for the charge segment.\n\nThe `numberOfDeliveries` is used for the Delivery Pricing charge model only. \n\n**Note**: The Delivery Pricing charge model is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Enable billing features by yourself](https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Billing_Settings/Manage_Features) in the Knowledge Center. You can check **Delivery Pricing** in **Billing Settings** > **Enable Charge Types / Models**.\n"
type: number
numberOfPeriods:
description: 'Specifies the number of periods to use when calculating charges in an overage smoothing charge model.
'
format: int64
type: integer
originalChargeId:
description: 'The original ID of the rate plan charge.
'
type: string
originalOrderDate:
description: 'The date when the rate plan charge is created through an order or amendment.
This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
'
format: date
type: string
overageCalculationOption:
description: 'Determines when to calculate overage charges.
'
type: string
overagePrice:
description: 'The price for units over the allowed amount.
'
type: number
overageUnusedUnitsCreditOption:
description: 'Determines whether to credit the customer with unused units of usage.
'
type: string
prepaidOperationType:
description: "**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.\n\nThe type of this charge. It is either a prepayment (topup) charge or a drawdown charge. \n"
enum:
- topup
- drawdown
type: string
prepaidQuantity:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
The number of units included in a [prepayment charge](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge). Must be a positive number (>0).
'
type: number
prepaidTotalQuantity:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
The total amount of units that end customers can use during a validity period when they subscribe to a [prepayment charge](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge).
'
type: number
prepaidUom:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
Unit of measurement for a [prepayment charge](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge).
'
type: string
price:
description: 'The price associated with the rate plan charge expressed as a decimal.
'
type: number
priceChangeOption:
description: "When the following is true:\n\n1. AutomatedPriceChange setting is on\n\n2. Charge type is not one-time\n\n3. Charge model is not discount percentage\n\nThen an automatic price change can have a value for when a termed subscription is renewed. \n\nValues (one of the following):\n\n* `NoChange` (default)\n* `SpecificPercentageValue`\n* `UseLatestProductCatalogPricing`\n"
type: string
priceIncreasePercentage:
description: 'A planned future price increase amount as a percentage.
'
type: number
pricingSummary:
description: 'Concise description of rate plan charge model.
'
type: string
processedThroughDate:
description: 'The date until when charges have been processed. When billing in arrears, such as usage, this field value is the the same as the `ChargedThroughDate` value. This date is the earliest date when a charge can be amended.
'
format: date
type: string
productCategory:
description: "This is used to maintain the product category. \n\n**Note**: This field is only available if you have the Additional Revenue Fields property enabled.\n"
type: string
productClass:
description: "This is used to maintain the product class. \n\n**Note**: This field is only available if you have the Additional Revenue Fields property enabled. \n"
type: string
productFamily:
description: "This is used to maintain the product family. \n\n**Note**: This field is only available if you have the Additional Revenue Fields property enabled.\n"
type: string
productLine:
description: "This is used to maintain the product line. \n\n**Note**: This field is only available if you have the Additional Revenue Fields property enabled.\n"
type: string
productRatePlanChargeId:
description: ''
type: string
quantity:
description: 'The quantity of units, such as the number of authors in a hosted wiki service. Valid for all charge models except for Flat Fee pricing.
'
type: number
ratingGroup:
description: "Specifies a rating group based on which usage records are rated.\n\nPossible values:\n\n- `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.\n- `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. \n- `ByUsageRecord`: The rating is based on each usage record.\n- `ByUsageUpload`: The rating is based on all the usages in a uploaded usage file (`.xls` or `.csv`).\n- `ByGroupId`: The rating is based on all the usages in a custom group.\n\n**Note:** \n- The `ByBillingPeriod` value can be applied for all charge models. \n- The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. \n- The `ByGroupId` value is only available if you have the Active Rating feature enabled.\n- Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.\n"
type: string
rolloverApply:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
This field defines the priority of rollover, which is either first or last.
'
enum:
- ApplyFirst
- ApplyLast
type: string
rolloverPeriodLength:
default: null
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
The period length of the rollover fund.
'
type: integer
rolloverPeriods:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
This field defines the number of rollover periods, it is restricted to 3.
'
type: number
segment:
description: 'The identifying number of the subscription rate plan segment. Segments are numbered sequentially, starting with 1.
'
format: int64
type: integer
smoothingModel:
description: 'Specifies when revenue recognition begins. When charge model is `Overage` or `TieredWithOverage`, `smoothingModel` will be one of the following values:
* `ContractEffectiveDate`
* `ServiceActivationDate`
* `CustomerAcceptanceDate`
'
type: string
specificBillingPeriod:
description: 'Customizes the number of month or week for the charges billing period. This field is required if you set the value of the `BillingPeriod` field to `Specific_Months` or `Specific_Weeks`.
'
format: int64
type: integer
specificEndDate:
description: 'The specific date on which the charge ends. If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
'
format: date
type: string
specificListPriceBase:
description: "The number of months for the list price base of the charge. \n\n**Note**: \n - This field is available only if you have the Annual List Price feature enabled.\n - The value of this field is `null` if you do not set the value of the `listPriceBase` field to `Per_Specific_Months`.\n"
subscriptionChargeDeliverySchedule:
$ref: '#/definitions/GETDeliveryScheduleType'
subscriptionChargeIntervalPricing:
description: 'Interval Pricing information. This field is available if the Offers feature is enabled.
'
items:
$ref: '#/definitions/GETIntervalPriceType'
type: array
tcv:
description: 'The total contract value.
'
type: number
tiers:
description: 'One or many defined ranges with distinct pricing.
'
items:
$ref: '#/definitions/GETTierType'
type: array
triggerDate:
description: 'The date that the rate plan charge will be triggered.
'
format: date
type: string
triggerEvent:
description: "The event that will cause the rate plan charge to be triggered.\n\nPossible values: \n\n* `ContractEffective`\n* `ServiceActivation`\n* `CustomerAcceptance`\n* `SpecificDate`\n"
type: string
type:
description: 'Charge type. Possible values are: `OneTime`, `Recurring`, `Usage`.
'
type: string
unusedUnitsCreditRates:
description: "Specifies the rate to credit a customer for unused units of usage. This field is applicable only for overage charge models when the \n`OverageUnusedUnitsCreditOption` field value is `CreditBySpecificRate`.\n"
type: number
uom:
description: "Specifies the units to measure usage. \n"
type: string
upToPeriods:
description: 'Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.
If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
'
type: string
upToPeriodsType:
description: "The period type used to define when the charge ends. \n\nValues:\n\n* `Billing_Periods`\n* `Days`\n* `Weeks`\n* `Months`\n* `Years`\n"
type: string
usageRecordRatingOption:
description: "Determines how Zuora processes usage records for per-unit usage charges. \n"
type: string
validityPeriodType:
description: '**Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled.
The period in which the prepayment units are valid to use as defined in a [prepayment charge](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge).
'
enum:
- SUBSCRIPTION_TERM
- ANNUAL
- SEMI_ANNUAL
- QUARTER
- MONTH
type: string
version:
description: 'Rate plan charge revision number.
'
format: int64
type: integer
type: object
- $ref: '#/definitions/RatePlanChargeObjectCustomFields'
title: ratePlanCharges
ChargeModelConfigurationType:
description: 'Container for charge model configuration data.
**Note**: This field is only available if you have the High Water Mark, Pre-Rated Pricing, or Multi-Attribute Pricing charge models enabled. These charge models are available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
'
properties:
customFieldPerUnitRate:
description: "The custom field that carries the per-unit rate for each usage record. For example, `perUnitAmount__c`.\n \nThis field is only available for the usage-based charges that use the Pre-Rated Per Unit Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.\n"
type: string
customFieldTotalAmount:
description: "The custom field that carries the total amount to charge for a usage record. For example, `totalAmount__c`. \n \nThis field is only available for the usage-based charges that use the Pre-Rated Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.\n"
type: string
formula:
description: 'The pricing formula to calculate actual rating amount for each usage record.
This field is only available for the usage-based charges that use the Multi-Attribute Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
'
type: string
title: chargeModelConfiguration
type: object
GETDeliveryScheduleType:
description: "The `deliverySchedule` is used for the Delivery Pricing charge model only. \n\n**Note**: The Delivery Pricing charge model is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Enable billing features by yourself](https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Billing_Settings/Manage_Features) in the Knowledge Center. You can check **Delivery Pricing** in **Billing Settings** > **Enable Charge Types / Models**.\n"
properties:
frequency:
description: 'Specifies delivery frequency for the delivery schedule.
'
enum:
- Weekly
type: string
friday:
description: 'Indicates whether delivery occurs on Friday.
'
type: boolean
monday:
description: 'Indicates whether delivery occurs on Monday.
'
type: boolean
saturday:
description: 'Indicates whether delivery occurs on Saturday.
'
type: boolean
sunday:
description: 'Indicates whether delivery occurs on Sunday.
'
type: boolean
thursday:
description: 'Indicates whether delivery occurs on Thursday.
'
type: boolean
tuesday:
description: 'Indicates whether delivery occurs on Tuesday.
'
type: boolean
wednesday:
description: 'Indicates whether delivery occurs on Wednesday.
'
type: boolean
title: deliverySchedule
type: object
PUTScUpdateType:
allOf:
- properties:
billingPeriodAlignment:
description: 'Aligns charges within the same subscription if multiple charges begin on different dates.
Values:
* `AlignToCharge`
* `AlignToSubscriptionStart`
* `AlignToTermStart`
Available for the following charge types:
* Recurring
* Usage-based
'
type: string
chargeModelConfiguration:
$ref: '#/definitions/ChargeModelConfigurationType'
description:
description: 'Description of the charge.
'
type: string
includedUnits:
description: 'Specifies the number of units in the base set of units for this charge. Must be >=0.
Available for the following charge type for the Overage charge model:
* Usage-based
'
type: number
overagePrice:
description: "Price for units over the allowed amount. \n\nAvailable for the following charge type for the Overage and Tiered with Overage charge models:\n\n* Usage-based\n"
type: number
price:
description: 'Price for units in the subscription rate plan.
Supports all charge types for the Flat Fee and Per Unit charge models
'
type: number
priceChangeOption:
description: 'Applies an automatic price change when a termed subscription is renewed. The Billing Admin setting **Enable Automatic Price Change When Subscriptions are Renewed?** must be set to Yes to use this field.
Values:
* `NoChange` (default)
* `SpecificPercentageValue`
* `UseLatestProductCatalogPricing`
Available for the following charge types:
* Recurring
* Usage-based
Not available for the Fixed-Amount Discount charge model.
'
type: string
priceIncreasePercentage:
description: 'Specifies the percentage to increase or decrease the price of a termed subscription''s renewal. Required if you set the `PriceChangeOption` field to `SpecificPercentageValue`.
Decimal between `-100` and `100`.
Available for the following charge types:
* Recurring
* Usage-based
Not available for the Fixed-Amount Discount charge model.
'
type: number
quantity:
description: 'Quantity of units; must be greater than zero.
'
type: number
ratePlanChargeId:
description: 'ID of a rate-plan charge for this subscription. It can be the latest version or any history version of ID.
'
type: string
tiers:
description: 'Container for Volume, Tiered or Tiered with Overage charge models. Supports the following charge types:
* One-time
* Recurring
* Usage-based
'
items:
$ref: '#/definitions/POSTTierType'
type: array
triggerDate:
description: 'Specifies when to start billing the customer for the charge. Required if the `triggerEvent` field is set to USD.
`triggerDate` cannot be updated for the following using the REST update subscription call:
* One-time charge type
* Discount-Fixed Amount charge model
* Discount-Percentage charge model
'
format: date
type: string
triggerEvent:
description: 'Specifies when to start billing the customer for the charge.
Values:
* `UCE`
* `USA`
* `UCA`
* `USD`
This is the date when charge changes in the REST request become effective.
`triggerEvent` cannot be updated for the following using the REST update subscription call:
* One-time charge type
* Discount-Fixed Amount charge model
* Discount-Percentage charge model
'
type: string
required:
- ratePlanChargeId
type: object
- $ref: '#/definitions/RatePlanChargeObjectCustomFields'
title: chargeUpdateDetails
GETSubscriptionOfferType:
allOf:
- properties:
description:
description: ''
type: string
id:
description: 'Subscription offer ID.
'
type: string
lastChangeType:
description: 'The last change amendment type.
'
type: string
originalSubscriptionId:
description: 'The ID of the subscription of version 1.
'
type: string
originalSubscriptionOfferId:
description: 'The subscription Offer ID when the offer is added to the subscription.
'
type: string
productOfferId:
description: 'Product offer ID.
'
type: string
productOfferName:
description: 'Product offer name.
'
type: string
productOfferNumber:
description: 'Product offer number.
'
type: string
ratePlans:
description: 'Container for rate plans.
'
items:
$ref: '#/definitions/GETSubscriptionRatePlanType'
subscriptionId:
description: 'Subscription ID.
'
type: string
subscriptionOfferNumber:
description: 'Subscription offer number.
'
type: string
type:
description: 'The offer type.
'
enum:
- Static
- Dynamic
type: string
type: object
- $ref: '#/definitions/SubscriptionOfferObjectCustomFields'
title: subscriptionOffers
SubscriptionObjectNSFields:
description: 'Container for Subscription fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
properties:
IntegrationId__NS:
description: 'ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
IntegrationStatus__NS:
description: 'Status of the subscription''s synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
Project__NS:
description: 'The NetSuite project that the subscription was created from. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
SalesOrder__NS:
description: 'The NetSuite sales order than the subscription was created from. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
SyncDate__NS:
description: 'Date when the subscription was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
'
maxLength: 255
type: string
title: subscriptionFieldsNS
type: object
GETAccountSummaryTypeSoldToContact:
allOf:
- properties:
address1:
description: 'First address line, 255 characters or less.
'
type: string
address2:
description: 'Second address line, 255 characters or less.
'
type: string
city:
description: 'City, 40 characters or less.
'
type: string
country:
description: 'Full country name. This field does not contain the ISO-standard abbreviation of the country name.
'
type: string
county:
description: 'County; 32 characters or less. Zuora Tax uses this information to calculate county taxation. '
type: string
fax:
description: 'Fax phone number, 40 characters or less.
'
type: string
firstName:
description: 'First name, 100 characters or less.
'
type: string
id:
description: 'Contact ID.
'
type: string
lastName:
description: 'Last name, 100 characters or less.
'
type: string
state:
description: 'Full state name. This field does not contain the ISO-standard abbreviation of the state name.
'
type: string
taxRegion:
description: 'A region string, defined in your Zuora tax rules.
'
type: string
workEmail:
description: 'Work email address, 80 characters or less.
'
type: string
workPhone:
description: 'Work phone number, 40 characters or less.
'
type: string
zipCode:
description: 'Zip code, 20 characters or less.
'
type: string
type: object
- $ref: '#/definitions/ContactObjectCustomFields'
description: "Container for sold-to contact information.\n\n**Note**: \n - 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. \n - If you have the Flexible Billing Attributes feature enabled, and you do not specify the `soldToContactId` field in the request or you select **Default Contact from Account** for the `soldToContactId` field during subscription creation, the value of the `soldToContact` field is automatically set to `null` in the response body.\n"
title: Contact
GETSubscriptionRatePlanType:
allOf:
- properties:
externallyManagedPlanId:
description: 'Indicates the unique identifier for the rate plan purchased on a third-party store. This field is used to represent a subscription rate plan created through third-party stores.
'
type: string
id:
description: 'Rate plan ID.
'
type: string
lastChangeType:
description: "The last amendment on the rate plan. \n\n\n**Note:** If a subscription is created through an order, this field is only available if multiple orders are created on the subscription.\n\n\nPossible Values:\n * `Add`\n * `Update`\n * `Remove`\n"
type: string
productId:
description: ''
type: string
productName:
description: ''
type: string
productRatePlanId:
description: ''
type: string
productSku:
description: 'The unique SKU for the product.
'
type: string
ratePlanCharges:
description: 'Container for one or more charges.
'
items:
$ref: '#/definitions/GETSubscriptionRatePlanChargesType'
type: array
ratePlanName:
description: 'Name of the rate plan.
'
type: string
subscriptionProductFeatures:
description: "Container for one or more features. \n\nOnly available when the following settings are enabled:\n\n* The Entitlements feature in your tenant.\n\n* The Enable Feature Specification in Product and Subscriptions setting in Zuora Billing Settings"
items:
$ref: '#/definitions/GETSubscriptionProductFeatureType'
type: array
type: object
- $ref: '#/definitions/RatePlanObjectCustomFields'
title: ratePlans
GETSubscriptionTypeWithSuccess:
allOf:
- properties:
accountId:
description: The ID of the account associated with this subscription.
type: string
accountName:
description: The name of the account associated with this subscription.
type: string
accountNumber:
description: The number of the account associated with this subscription.
type: string
autoRenew:
description: 'If `true`, the subscription automatically renews at the end of the term. Default is `false`.
'
type: boolean
billToContact:
$ref: '#/definitions/GETAccountSummaryTypeBillToContact'
cancelReason:
description: "The reason for a subscription cancellation copied from the `changeReason` field of a Cancel Subscription order action. \n\nThis 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`.\n"
type: string
contractEffectiveDate:
description: 'Effective contract date for this subscription, as yyyy-mm-dd.
'
format: date
type: string
contractedMrr:
description: 'Monthly recurring revenue of the subscription.
'
type: number
currency:
description: 'The currency of the subscription.
**Note**: This field is available only if you have the Multiple Currencies feature in the **Early Adopter** phase enabled.
'
type: string
currentTerm:
description: 'The length of the period for the current subscription term.
'
format: int64
type: integer
currentTermPeriodType:
description: 'The period type for the current subscription term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
customerAcceptanceDate:
description: 'The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
'
format: date
type: string
externallyManagedBy:
description: '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.
'
enum:
- Amazon
- Apple
- Google
- Roku
type: string
id:
description: 'Subscription ID.
'
type: string
initialTerm:
description: 'The length of the period for the first subscription term.
'
format: int64
type: integer
initialTermPeriodType:
description: 'The period type for the first subscription term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
invoiceOwnerAccountId:
description: ''
type: string
invoiceOwnerAccountName:
description: ''
type: string
invoiceOwnerAccountNumber:
description: ''
type: string
invoiceScheduleId:
description: '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 in the **Early Adopter** phase enabled.
'
type: integer
invoiceSeparately:
description: "Separates a single subscription from other subscriptions and creates an invoice for the subscription. \n\nIf 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.\n"
type: string
invoiceTemplateId:
description: "The ID of the invoice template associated with the subscription.\n\n**Note**: \n - 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. \n - 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.\n"
type: string
invoiceTemplateName:
description: "The name of the invoice template associated with the subscription.\n\n**Note**: \n - If you have the Flexible Billing Attributes feature disabled, the value of this field is `null` in the response body. \n - 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.\n \n"
type: string
isLatestVersion:
description: If `true`, the current subscription object is the latest version.
type: boolean
lastBookingDate:
description: '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](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Migration_Guidance#Subscribe_and_Amend_APIs_to_Migrate), 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. '
format: date
type: string
notes:
description: 'A string of up to 65,535 characters.
'
type: string
offers:
description: "Container for offers. \n**Note**:The Offers feature is only available in tenants with Orders enabled. To enable the Offers feature, submit a request at Zuora Global Support.\n"
items:
$ref: '#/definitions/GETSubscriptionOfferType'
type: array
orderNumber:
description: "The order number of the order in which the changes on the subscription are made. \n\n**Note:** This field is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). We will investigate your use cases and data before enabling this feature for you.\n"
type: string
organizationLabel:
description: 'The organization that this object belongs to.
Note: This field is available only when the Multi-Org feature is enabled.
'
type: string
paymentTerm:
description: "The name of the payment term associated with the subscription. For example, `Net 30`. The payment term determines the due dates of invoices.\n\n**Note**: \n - 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. \n - 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.\n"
type: string
ratePlans:
description: 'Container for rate plans.
'
items:
$ref: '#/definitions/GETSubscriptionRatePlanType'
type: array
renewalSetting:
description: "Specifies whether a termed subscription will remain `TERMED` or change to `EVERGREEN` when it is renewed. \n\nValues are:\n\n* `RENEW_WITH_SPECIFIC_TERM` (default)\n* `RENEW_TO_EVERGREEN`\n"
type: string
renewalTerm:
description: 'The length of the period for the subscription renewal term.
'
format: int64
type: integer
renewalTermPeriodType:
description: 'The period type for the subscription renewal term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
revision:
description: '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.
'
type: string
sequenceSetId:
description: "The ID of the sequence set associated with the subscription.\n\n**Note**: \n - 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. \n - 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.\n"
type: string
sequenceSetName:
description: "The name of the sequence set associated with the subscription.\n\n**Note**: \n - If you have the Flexible Billing Attributes feature disabled, the value of this field is `null` in the response body. \n - 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.\n"
type: string
serviceActivationDate:
description: '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
'
format: date
type: string
soldToContact:
$ref: '#/definitions/GETAccountSummaryTypeSoldToContact'
status:
description: 'Subscription status; possible values are:
* `Draft`
* `Pending Activation`
* `Pending Acceptance`
* `Active`
* `Cancelled`
* `Suspended`
'
type: string
statusHistory:
description: 'Container for status history.
'
items:
$ref: '#/definitions/GETSubscriptionStatusHistoryType'
type: array
subscriptionEndDate:
description: '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.
'
format: date
type: string
subscriptionNumber:
description: Subscription number.
type: string
subscriptionStartDate:
description: 'Date the subscription becomes effective.
'
format: date
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
termEndDate:
description: 'Date the subscription term ends. If the subscription is evergreen, this is null or is the cancellation date (if one has been set).
'
format: date
type: string
termStartDate:
description: 'Date the subscription term begins. If this is a renewal subscription, this date is different from the subscription start date.
'
format: date
type: string
termType:
description: 'Possible values are: `TERMED`, `EVERGREEN`.
'
type: string
totalContractedValue:
description: 'Total contracted value of the subscription.
'
type: number
version:
description: 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.
format: int64
type: integer
type: object
- $ref: '#/definitions/SubscriptionObjectQTFields'
- $ref: '#/definitions/SubscriptionObjectNSFields'
- $ref: '#/definitions/SubscriptionObjectCustomFields'
ContactObjectCustomFields:
additionalProperties:
description: 'Custom fields of the Contact object. The name of each custom field has the form *customField*__c. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
'
description: 'Container for custom fields of a Contact object.
'
title: contactFieldsCustom
type: object
POSTSubscriptionPreviewTypePreviewAccountInfo:
allOf:
- properties:
billCycleDay:
description: 'The account''s bill cycle day (BCD), when bill runs generate invoices for the account. Specify any day of the month (`1`-`31`, where `31` = end-of-month), or `0` for auto-set.
'
format: int64
type: integer
billToContact:
description: 'Container for bill-to contact information of this account.
'
properties:
city:
description: 'The city of the bill-to address. The value should be 40 characters or less.
'
type: string
country:
description: 'The country of the bill-to address. The value must be a valid country name or abbreviation.
**Note:** You must specify this field if you are using Zuora Tax for this account.
'
type: string
county:
description: 'The county of the bill-to address. The value should be 32 characters or less.
'
type: string
state:
description: 'The state of the bill-to address. The value must be a valid state or province name or 2-character abbreviation.
**Note:** You must specify this field if you are using Zuora Tax for this account and the country is `USA` or `Canada`.
'
type: string
taxRegion:
description: 'If using Zuora Tax, a region string as optionally defined in your tax rules.
'
type: string
zipCode:
description: 'The zip code of the bill-to address. The value should be 20 characters or less.
'
type: string
type: object
currency:
description: 'A currency as defined in Billing Settings.
'
type: string
required:
- billCycleDay
- billToContact
- currency
type: object
- $ref: '#/definitions/AccountObjectNSFields'
- $ref: '#/definitions/AccountObjectCustomFields'
description: 'A container for providing a customer account information if you do not have an existing customer account. This customer account information is only used for subscription preview.
You must specify the account information either in this field or in the `accountKey` field with the following conditions:
* If you already have a customer account, specify the account number or ID in the accountKey field.
* If you do not have a customer account, provide account information in this field.
'
title: previewAccountInfo
GETSubscriptionStatusHistoryType:
allOf:
- properties:
endDate:
description: The effective end date of the status history.
format: date
type: string
startDate:
description: The effective start date of the status history.
format: date
type: string
status:
description: 'The status of the subscription.
Values are:
* `Pending Activation`
* `Pending Acceptance`
* `Active`
* `Cancelled`
* `Suspended`
* `OutOfTerm`
'
type: string
type: object
title: statusHistory
GETSubscriptionProductFeatureType:
properties:
description:
description: 'Feature description.
'
type: string
featureCode:
description: 'Feature code, up to 255 characters long.
'
type: string
id:
description: 'SubscriptionProductFeature ID.
'
type: string
name:
description: 'Feature name, up to 255 characters long.
'
type: string
title: subscriptionProductFeatures
type: object
PUTSrpRemoveType:
properties:
bookingDate:
description: "The booking date that you want to set for the amendment contract. The booking date of an amendment is the equivalent of the order date of an order. This field must be in the `yyyy-mm-dd` format. The default value is the current date when you make the API call. \n"
format: date
type: string
contractEffectiveDate:
description: 'Effective date of the new subscription, as yyyy-mm-dd.
'
format: date
type: string
customerAcceptanceDate:
description: 'The date when the customer accepts the contract in 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
'
format: date
type: string
externalCatalogPlanId:
description: 'An external ID of the rate plan to be removed. You can use this field to specify an existing rate plan in your subscription. The value of the `externalCatalogPlanId` field must match one of the values that are predefined in the `externallyManagedPlanIds` field on a product rate plan. However, if there are multiple rate plans with the same `productRatePlanId` value existing in the subscription, you must use the `ratePlanId` field to remove the rate plan. The `externalCatalogPlanId` field cannot be used to distinguish multiple rate plans in this case.
**Note:** If both `externalCatalogPlanId` and `ratePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externalIdSourceSystem:
description: 'The ID of the external source system. You can use this field and `externalCatalogPlanId` to specify a product rate plan that is imported from an external system.
**Note:** If both `externalCatalogPlanId`, `externalIdSourceSystem` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
productRatePlanNumber:
description: 'Number of a product rate plan for this subscription.
'
type: string
ratePlanId:
description: 'ID of a rate plan for this subscription. This can be the latest version or any history version of ID.
'
type: string
serviceActivationDate:
description: 'The date when the remove amendment is activated in 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
'
format: date
type: string
subscriptionRatePlanNumber:
description: 'Number of a rate plan for this subscription.
'
type: string
required:
- contractEffectiveDate
title: remove
type: object
PUTScAddType:
allOf:
- properties:
amendedByOrderOn:
description: 'The date when the rate plan charge is amended through an order or amendment. This field is not updatable.
This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
'
type: string
applyDiscountTo:
description: 'Specifies the type of charges that you want a specific discount to apply to.
Values:
* `ONETIME`
* `RECURRING`
* `USAGE`
* `ONETIMERECURRING`
* `ONETIMEUSAGE`
* `RECURRINGUSAGE`
* `ONETIMERECURRINGUSAGE`
Available for the following charge type for the Discount-Fixed Amount and Discount-Percentage charge models:
* Recurring
'
type: string
billCycleDay:
description: 'Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month customer is billed.
Values: `1`-`31`
Available for the following charge types:
* Recurring
* Usage-based
'
type: string
billCycleType:
description: 'Specifies how to determine the billing day for the charge. When this field is set to `SpecificDayofMonth`, set the `BillCycleDay` field. When this field is set to `SpecificDayofWeek`, set the `weeklyBillCycleDay` field.
Values:
* `DefaultFromCustomer`
* `SpecificDayofMonth`
* `SubscriptionStartDay`
* `ChargeTriggerDay`
* `SpecificDayofWeek`
Available for the following charge types:
* Recurring
* Usage-based
'
type: string
billingPeriod:
description: 'Billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD). When you renew a subscription, the current subscription term is extended by creating a new term. If any charge in your subscription has the billing period set as `SubscriptionTerm`, a new charge segment is generated for the new term.
Values:
* `Month`
* `Quarter`
* `Semi_Annual`
* `Annual`
* `Eighteen_Months`
* `Two_Years`
* `Three_Years`
* `Five_Years`
* `Specific_Months`
* `Subscription_Term`
* `Week`
* `Specific_Weeks`
Available for the following charge types:
* Recurring
* Usage-based
'
type: string
billingPeriodAlignment:
description: 'Aligns charges within the same subscription if multiple charges begin on different dates.
Values:
* `AlignToCharge`
* `AlignToSubscriptionStart`
* `AlignToTermStart`
Available for the following charge types:
* Recurring
* Usage-based
'
type: string
billingTiming:
description: 'Billing timing for the charge for recurring charge types. Not avaliable for one time, usage and discount charges.
Values:
* `IN_ADVANCE` (default)
* `IN_ARREARS`
'
type: string
chargeModelConfiguration:
$ref: '#/definitions/ChargeModelConfigurationType'
description:
description: 'Description of the charge.
'
type: string
discountAmount:
description: 'Specifies the amount of fixed-amount discount.
Available for the following charge type for the Discount-Fixed Amount charge model:
* Recurring
'
type: number
discountLevel:
description: 'Specifies if the discount applies to the product rate plan only , the entire subscription, or to any activity in the account.
Values:
* `rateplan`
* `subscription`
* `account`
Available for the following charge type for the Discount-Fixed Amount and Discount-Percentage charge models:
* Recurring
'
type: string
discountPercentage:
description: "Specifies the percentage of a percentage discount. \n\nAvailable for the following charge type for the Discount-Percentage charge model:\n\n* Recurring\n"
type: number
endDateCondition:
description: 'Defines when the charge ends after the charge trigger date. If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.
Values:
* `Subscription_End`
* `Fixed_Period`
* `Specific_End_Date`
* `One_Time`
'
type: string
excludeItemBillingFromRevenueAccounting:
default: false
description: 'The flag to exclude rate plan charge related invoice items, invoice item adjustments, credit memo items, and debit memo items from revenue accounting.
**Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
'
type: boolean
excludeItemBookingFromRevenueAccounting:
default: false
description: 'The flag to exclude rate plan charges from revenue accounting.
**Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
'
type: boolean
includedUnits:
description: 'Specifies the number of units in the base set of units for this charge. Must be >=`0`.
Available for the following charge type for the Overage charge model:
* Usage-based
'
type: number
isAllocationEligible:
description: 'This field is used to identify if the charge segment is allocation eligible in revenue recognition.
**Note**: This feature is in the **Early Adopter** phase. If you want to use the feature, submit a request at Zuora Global Support, and we will evaluate whether the feature is suitable for your use cases.
'
type: boolean
isUnbilled:
description: 'This field is used to dictate how to perform the accounting during revenue recognition.
**Note**: This feature is in the **Early Adopter** phase. If you want to use the feature, submit a request at Zuora Global Support, and we will evaluate whether the feature is suitable for your use cases.
'
type: boolean
listPriceBase:
description: 'The list price base for the product rate plan charge.
Values:
* `Per_Billing_Period`
* `Per_Month`
* `Per_Week`
* `Per_Year`
* `Per_Specific_Months`
Available for the following charge type for the Flat Fee, Per Unit, Volume Pricing, and Tiered Pricing charge models:
* Recurring
'
type: string
number:
description: 'Unique number that identifies the charge. System-generated if not provided.
'
type: string
numberOfPeriods:
description: 'Specifies the number of periods to use when calculating charges in an overage smoothing charge model.
Available for the following charge type for the Overage and Tiered with Overage charge models:
* Usage-based
'
format: int64
type: integer
originalOrderDate:
description: 'The date when the rate plan charge is created through an order or amendment. This field is not updatable.
This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
'
format: date
type: string
overagePrice:
description: "Price for units over the allowed amount. \n\nAvailable for the following charge type for the Overage and Tiered with Overage charge models:\n\n* Usage-based\n"
type: number
overageUnusedUnitsCreditOption:
description: 'Determines whether to credit the customer with unused units of usage.
Values:
* `NoCredit`
* `CreditBySpecificRate`
Available for the following charge type for the Overage and Tiered with Overage charge models:
* Usage-based
'
type: string
price:
description: 'Price for units in the subscription rate plan.
Supports all charge types for the Flat Fee and Per Unit charge models
'
type: number
priceChangeOption:
description: 'Applies an automatic price change when a termed subscription is renewed. The Zuora Billing Admin setting Enable Automatic Price Change When Subscriptions are Renewed? must be set to Yes to use this field. See Define Default Subscription Settings for more information on setting this option.
Values:
* `NoChange` (default)
* `SpecificPercentageValue`
* `UseLatestProductCatalogPricing`
Available for the following charge types:
* Recurring
* Usage-based
* Not available for the Fixed-Amount Discount charge model.
'
type: string
priceIncreasePercentage:
description: 'Specifies the percentage to increase or decrease the price of a termed subscription''s renewal. Required if you set the `PriceChangeOption` field to `SpecificPercentageValue`.
Decimal between -100 and 100.
Available for the following charge types:
* Recurring
* Usage-based
Not available for the Fixed-Amount Discount charge model.
'
type: number
productRatePlanChargeId:
description: ''
type: string
productRatePlanChargeNumber:
description: 'Number of a product rate-plan charge for this subscription. '
type: string
quantity:
description: 'Number of units. Must be >=`0`.
Available for the following charge types for the Per Unit, Volume Pricing, and Tiered Pricing charge models:
* One-time
* Recurring
'
type: number
ratingGroup:
description: "Specifies a rating group based on which usage records are rated.\n\nPossible values:\n\n- `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.\n- `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. \n- `ByUsageRecord`: The rating is based on each usage record.\n- `ByUsageUpload`: The rating is based on all the usages in a uploaded usage file (`.xls` or `.csv`).\n- `ByGroupId`: The rating is based on all the usages in a custom group.\n\n**Note:** \n- The `ByBillingPeriod` value can be applied for all charge models. \n- The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. \n- The `ByGroupId` value is only available if you have the Active Rating feature enabled.\n- Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.\n"
type: string
specificBillingPeriod:
description: 'Specifies the number of month or week for the charges billing period. Required if you set the value of the `billingPeriod` field to `Specific_Months` or `Specific_Weeks`.
Available for the following charge types:
* Recurring
* Usage-based
'
format: int64
type: integer
specificEndDate:
description: 'Defines when the charge ends after the charge trigger date.
This field is only applicable when the `endDateCondition` field is set to `Specific_End_Date`.
If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
'
format: date
type: string
specificListPriceBase:
description: "The number of months for the list price base of the charge. This field is required if you set the value of the `listPriceBase` field to `Per_Specific_Months`.\n\n**Note**: \n - This field is available only if you have the Annual List Price feature enabled.\n - The value of this field is `null` if you do not set the value of the `listPriceBase` field to `Per_Specific_Months`.\n"
format: int32
maximum: 200
minimum: 1
type: integer
tiers:
description: 'Container for Volume, Tiered or Tiered with Overage charge models. Supports the following charge types:
* One-time
* Recurring
* Usage-based
'
items:
$ref: '#/definitions/POSTTierType'
type: array
triggerDate:
description: 'Specifies when to start billing the customer for the charge. Required if the `triggerEvent` field is set to `USD`.
'
format: date
type: string
triggerEvent:
description: 'Specifies when to start billing the customer for the charge.
Values:
* `UCE`
* `USA`
* `UCA`
* `USD`
'
type: string
unusedUnitsCreditRates:
description: 'Specifies the rate to credit a customer for unused units of usage. This field applies only for overage charge models when the `OverageUnusedUnitsCreditOption` field is set to `CreditBySpecificRate`.
Available for the following charge type for the Overage and Tiered with Overage charge models:
* Usage-based
'
type: number
upToPeriods:
description: "The period type used to define when the charge ends. \n\nValues:\n\n* `Billing_Periods`\n* `Days`\n* `Weeks`\n* `Months`\n* `Years`\n\nYou must use this field together with the `upToPeriods` field to specify the time period.\n\nThis field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. \n"
format: int64
type: integer
upToPeriodsType:
description: "The period type used to define when the charge ends. \n\nValues:\n\n* `Billing_Periods`\n* `Days`\n* `Weeks`\n* `Months`\n* `Years`\n\nYou must use this field together with the `upToPeriods` field to specify the time period.\n\nThis field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. \n"
type: string
required:
- productRatePlanChargeId
type: object
- $ref: '#/definitions/RatePlanChargeObjectCustomFields'
title: chargeOverrides
POSTSubscriptionResponseType:
properties:
contractedMrr:
description: 'Monthly recurring revenue of the subscription.
'
type: number
creditMemoId:
description: 'The credit memo ID, if a credit memo is generated during the subscription process.
**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: string
invoiceId:
description: 'Invoice ID, if an invoice is generated during the subscription process.
'
type: string
paidAmount:
description: 'Payment amount, if a payment is collected.
'
type: number
paymentId:
description: 'Payment ID, if a payment is collected.
'
type: string
subscriptionId:
description: ''
type: string
subscriptionNumber:
description: ''
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
totalContractedValue:
description: 'Total contracted value of the subscription.
'
type: number
type: object
GETTierType:
properties:
endingUnit:
description: 'Decimal defining end of tier range.
'
type: number
price:
description: 'The decimal value of the tiered charge model. If the charge model is not a tiered type then this price field will be null and the `price` field directly under the `productRatePlanCharges` applies.
'
type: number
priceFormat:
description: 'Tier price format. Allowed values: `flat fee`, `per unit`.
'
type: string
startingUnit:
description: 'Decimal defining start of tier range.
'
type: number
tier:
description: 'Unique number of the tier.
'
format: int64
type: integer
title: tiers
type: object
POSTSubscriptionPreviewCreditMemoItemsType:
properties:
amountWithoutTax:
description: 'The credit memo item amount excluding tax.
'
format: double
type: number
chargeAmount:
description: 'The amount of the credit memo item. For tax-inclusive credit memo items, the amount indicates the credit memo item amount including tax. For tax-exclusive credit memo items, the amount indicates the credit memo item amount excluding tax
'
format: double
type: number
chargeDescription:
description: 'Description of this credit memo item.
'
type: string
chargeName:
description: 'Name of this credit memo item.
'
type: string
productName:
description: 'Name of the product associated with this credit memo item.
'
type: string
productRatePlanChargeId:
description: 'ID of the product rate plan charge associated with this credit memo item.
'
type: string
quantity:
description: 'Quantity of the charge associated with this credit memo item.
'
type: integer
serviceEndDate:
description: 'End date of the service period for this credit memo item, as yyyy-mm-dd.
'
format: date
type: string
serviceStartDate:
description: 'Service start date of this credit memo item, as yyyy-mm-dd.
'
format: date
type: string
taxAmount:
description: 'The tax amount of the credit memo item.
'
format: double
type: number
taxationItems:
description: 'List of taxation items.
**Note**: This field is only available if you set the `zuora-version` request header to `315.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). '
items:
$ref: '#/definitions/POSTSubscriptionPreviewTaxationItemsType'
type: array
unitOfMeasure:
description: Unit used to measure consumption.
type: string
title: creditMemoItems
type: object
PUTSrpUpdateType:
allOf:
- properties:
bookingDate:
description: "The booking date that you want to set for the amendment contract. The booking date of an amendment is the equivalent of the order date of an order. This field must be in the `yyyy-mm-dd` format. The default value is the current date when you make the API call. \n"
format: date
type: string
chargeUpdateDetails:
description: "Container for one or more product rate plan charges. \n"
items:
$ref: '#/definitions/PUTScUpdateType'
type: array
contractEffectiveDate:
description: 'The date when the amendment changes take effect. The format of the date is yyyy-mm-dd.
If there is already a future-dated Update Product amendment on the subscription, the `specificUpdateDate` field will be used instead of this field to specify when the Update Product amendment takes effect.
'
format: date
type: string
customerAcceptanceDate:
description: 'The date when the customer accepts the contract in 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
'
format: date
type: string
externalCatalogPlanId:
description: 'An external ID of the rate plan to be updated. You can use this field to specify an existing rate plan in your subscription. The value of the `externalCatalogPlanId` field must match one of the values that are predefined in the `externallyManagedPlanIds` field on a product rate plan. However, if there are multiple rate plans with the same `productRatePlanId` value existing in the subscription, you must use the `ratePlanId` field to update the rate plan. The `externalCatalogPlanId` field cannot be used to distinguish multiple rate plans in this case.
**Note:** If both `externalCatalogPlanId` and `ratePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externalIdSourceSystem:
description: 'The ID of the external source system. You can use this field and `externalCatalogPlanId` to specify a product rate plan that is imported from an external system.
**Note:** If both `externalCatalogPlanId`, `externalIdSourceSystem` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externallyManagedPlanId:
description: 'Indicates the unique identifier for the rate plan purchased on a third-party store. This field is used to represent a subscription rate plan created through third-party stores.
'
type: string
productRatePlanNumber:
description: 'Number of a product rate plan for this subscription.
'
type: string
ratePlanId:
description: 'ID of a rate plan for this subscription. This can be the latest version or any history version of ID.
'
type: string
serviceActivationDate:
description: 'The date when the update amendment is activated in 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
'
format: date
type: string
specificUpdateDate:
description: 'The date when the Update Product amendment takes effect. This field is only applicable if there is already a future-dated Update Product amendment on the subscription. The format of the date is yyyy-mm-dd.
Required only for Update Product amendments if there is already a future-dated Update Product amendment on the subscription.
'
format: date
type: string
subscriptionRatePlanNumber:
description: 'Number of a rate plan for this subscription.
'
type: string
required:
- contractEffectiveDate
type: object
- $ref: '#/definitions/RatePlanObjectCustomFields'
title: update
GETSubscriptionWrapper:
properties:
nextPage:
description: 'URL to retrieve the next page of the response if it exists; otherwise absent.
'
format: URL
type: string
subscriptions:
description: 'Array of subscriptions.
'
items:
$ref: '#/definitions/GETSubscriptionType'
type: array
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
type: object
POSTSubscriptionPreviewType:
allOf:
- properties:
accountKey:
description: "\nCustomer account number or ID.\n\nYou must specify the account information either in this field or in the `previewAccountInfo` field with the following conditions:\n \n* If you already have a customer account, specify the account number or ID in this field.\n* If you do not have a customer account, provide account information in the `previewAccountInfo` field.\n"
type: string
contractEffectiveDate:
description: 'Effective contract date for this subscription, as yyyy-mm-dd.
'
format: date
type: string
customerAcceptanceDate:
description: 'The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
Default value is dependent on the value of other fields. See **Notes** section for more details.
'
format: date
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
includeExistingDraftDocItems:
description: 'Specifies whether to include draft invoice items in subscription previews.
Values are:
* `true` (default). Includes draft invoice items in the preview result.
* `false`. Excludes draft invoice items in the preview result.
**Note:** This field is in Zuora REST API version control. Supported minor versions are 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
type: boolean
includeExistingDraftInvoiceItems:
description: 'Specifies whether to include draft invoice items in previews.
Values are:
* `true` (default). Includes draft invoice items in the preview result.
* `false`. Excludes draft invoice items in the preview result.
**Note:** This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, 196.0, and 206.0.
'
type: boolean
initialTerm:
description: "Duration of the first term of the subscription, in whole months. If `termType` is `TERMED`, then this field is required, and the value must be greater than `0`. If `termType` is `EVERGREEN`, this field is ignored. \n"
format: int64
type: integer
initialTermPeriodType:
description: "The period type of the initial term. \n\nSupported values are:\n\n* `Month`\n* `Year`\n* `Day`\n* `Week`\n \nThe default period type is `Month`.\n\n"
type: string
invoiceOwnerAccountKey:
description: 'Invoice owner account number or ID.
**Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
'
type: string
invoiceTargetDate:
description: 'Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.
**Note:** This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, 196.0, and 206.0. .
'
format: date
type: string
notes:
description: String of up to 500 characters.
type: string
previewAccountInfo:
$ref: '#/definitions/POSTSubscriptionPreviewTypePreviewAccountInfo'
previewType:
description: "The type of preview you will receive. \n\nThis field is in Zuora REST API version control. The supported values of this field depend on the REST API minor version you specified in the request header.\n\n\n* If you do not specify the REST API minor version or specify the minor version number to one of following values in the request header:\n \n * 186.0\n * 187.0\n * 188.0\n * 189.0\n * 196.0\n * 206.0\n \n The following values are supported in the **previewType** field:\n\n * InvoiceItem\n * ChargeMetrics\n * InvoiceItemChargeMetrics\n \n The default value is InvoiceItem.\n\n* If you specify the REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, the following values are supported in the **previewType** field:\n\n - LegalDoc\n - ChargeMetrics\n - LegalDocChargeMetrics\n\n The default value is LegalDoc.\n\n.\n"
type: string
serviceActivationDate:
description: '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.
Default value is dependent on the value of other fields. See **Notes** section for more details.
'
format: date
type: string
subscribeToRatePlans:
description: 'Container for one or more rate plans for this subscription.
'
items:
$ref: '#/definitions/POSTSrpCreateType'
type: array
targetDate:
description: 'Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.
**Note:** This field is in Zuora REST API version control. Supported minor versions are 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method, you must set the `zuora-version` parameter to the minor version number in the request header.
'
format: date
type: string
termStartDate:
description: 'The date on which the subscription term begins, as yyyy-mm-dd. If this is a renewal subscription, this date is different from the subscription start date.
'
format: date
type: string
termType:
description: 'Possible values are: `TERMED`, `EVERGREEN`.
'
type: string
required:
- termType
- contractEffectiveDate
- subscribeToRatePlans
type: object
- $ref: '#/definitions/SubscriptionObjectCustomFields'
example:
contractEffectiveDate: 2013-1-15
initialTerm: 12
initialTermPeriodType: Week
invoiceTargetDate: '2013-12-31'
previewAccountInfo:
billCycleDay: 31
billToContact:
city: Walnut Creek
country: United States
county: Contra Consta
state: California
zipCode: '94549'
currency: USD
subscribeToRatePlans:
- chargeOverrides:
- productRatePlanChargeId: ff8080811ca15d19011cddad8c953b53
quantity: 100
productRatePlanId: ff8080811ca15d19011cdda9b0ad3b51
termType: TERMED
POSTSubscriptionPreviewInvoiceItemsType:
properties:
chargeAmount:
description: 'The amount of the charge. This amount doesn''t include taxes unless the charge''s tax mode is inclusive.
'
type: number
chargeDescription:
description: 'Description of the charge.
'
type: string
chargeName:
description: 'Name of the charge.
'
type: string
productName:
description: 'Name of the product associated with this item.
'
type: string
productRatePlanChargeId:
description: 'ID of the product rate plan charge.
'
type: string
quantity:
description: 'Quantity of this item.
'
type: number
serviceEndDate:
description: 'End date of the service period for this item, i.e., the last day of the period, as yyyy-mm-dd.
'
format: date
type: string
serviceStartDate:
description: 'Service start date as yyyy-mm-dd. If the charge is a one-time fee, this is the date of that charge.
'
format: date
type: string
taxAmount:
description: 'The tax amount of the invoice item.
'
format: double
type: number
taxationItems:
description: 'List of taxation items.
**Note**: This field is only available if you set the `zuora-version` request header to `315.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). '
items:
$ref: '#/definitions/POSTSubscriptionPreviewTaxationItemsType'
type: array
unitOfMeasure:
description: ''
type: string
title: invoiceItems
type: object
POSTTierType:
properties:
endingUnit:
description: 'End number of a range of units for the tier.
'
type: number
price:
description: 'Price of the tier if the charge is a flat fee, or the price of each unit in the tier if the charge model is tiered pricing.
'
type: number
priceFormat:
description: 'Indicates if pricing is a flat fee or is per unit.
Values:
* `FlatFee`
* `PerUnit`
'
type: string
startingUnit:
description: 'Starting number of a range of units for the tier.
'
type: number
tier:
description: 'Unique number that identifies the tier that the price applies to.
'
format: int64
type: integer
required:
- tier
- price
title: tiers
type: object
PUTSubscriptionResumeResponseType:
properties:
creditMemoId:
description: 'The credit memo ID, if a credit memo is generated during the subscription process.
**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: string
invoiceId:
description: 'Invoice ID, if an invoice is generated during the subscription process.
'
type: string
paidAmount:
description: 'Payment amount, if a payment is collected.
'
type: number
paymentId:
description: 'Payment ID, if a payment is collected.
'
type: string
resumeDate:
description: 'The date when subscription resumption takes effect, as yyyy-mm-dd.
'
format: date
type: string
subscriptionId:
description: 'The subscription ID.
'
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
termEndDate:
description: 'The date when the new subscription term ends, as yyyy-mm-dd.
'
format: date
type: string
totalDeltaTcv:
description: 'Change in the total contracted value of the subscription as a result of the update.
'
type: number
type: object
PUTSubscriptionSuspendType:
example:
collect: false
contractEffectiveDate: '2019-02-01'
creditMemoReasonCode: Unsatisfactory service
extendsTerm: true
resume: true
resumePolicy: SpecificDate
resumeSpecificDate: '2019-06-01'
runBilling: true
suspendPeriods: 10
suspendPeriodsType: Day
suspendPolicy: FixedPeriodsFromToday
properties:
applicationOrder:
description: "The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.\n\n**Note:**\n - This field is valid only if the `applyCredit` field is set to `true`.\n - If no value is specified for this field, the default priority order is used, [\"CreditMemo\", \"UnappliedPayment\"], to apply credit memos first and then apply unapplied payments.\n - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `[\"CreditMemo\"]`, only credit memos are used to apply to invoices.\n"
items:
type: string
type: array
applyCredit:
description: 'If the value is true, the credit memo or unapplied payment on the order account will be automatically applied to the invoices generated by this order. The credit memo generated by this order will not be automatically applied to any invoices.
**Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: boolean
applyCreditBalance:
description: "Whether to automatically apply a credit balance to an invoice.\n\nIf the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.\n\n\nTo view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.\n\nPrerequisite: `invoice` must be `true`. \n\n**Note:** \n - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.\n - This field is deprecated if you have the Invoice Settlement feature enabled.\n"
type: boolean
bookingDate:
description: "The booking date that you want to set for the amendment contract when you suspend the subscription. If `resume` is `true`, which means you also choose to resume the subscription at some point, then this field is also the booking date for the Resume amendment contract.\n\nThis field must be in the `yyyy-mm-dd` format. The default value of this field is the current date when you make the API call. \n"
format: date
type: string
collect:
default: false
description: "Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.\n\nIf the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.\n\nPrerequisite: The `invoice` or `runBilling` field must be `true`. \n\n**Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).\n"
type: boolean
contractEffectiveDate:
description: 'The date when the customer notifies you that they want to amend their subscription.
'
format: date
type: string
creditMemoReasonCode:
description: A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code.
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
extendsTerm:
description: 'Whether to extend the subscription term by the length of time the suspension is in effect. Values: `true`, `false`.
'
type: boolean
invoice:
description: "**Note:** This field has been replaced by the `runBilling` field. The\n`invoice` field is only available for backward compatibility.\n\n\nCreates an invoice for a subscription. The invoice generated in this\noperation is only for this subscription, not for the entire customer\naccount.\n\n\nIf the value is `true`, an invoice is created. If the value is\n`false`, no action is taken. The default value is `false`. \n\n\nThis field is in Zuora REST API version control. Supported minor\nversions are `196.0` and `207.0`. To use this field in the method, you\nmust set the zuora-version parameter to the minor version number in\nthe request header.\n"
type: boolean
invoiceCollect:
description: '**Note:** This field has been replaced by the `invoice` field
and the `collect` field. `invoiceCollect` is available only for backward
compatibility.
**Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
'
type: boolean
invoiceTargetDate:
description: '**Note:** This field has been replaced by the `targetDate` field. The
`invoiceTargetDate` field is only available for backward
compatibility.
Date through which to calculate charges if an invoice is generated, as
yyyy-mm-dd. Default is current date.
This field is in Zuora REST API version control. Supported minor
versions are `207.0` and earlier [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
format: date
type: string
orderDate:
description: 'The date when the order is signed. If no additinal contractEffectiveDate is provided, this order will use this order date as the contract effective date.
This field must be in the `yyyy-mm-dd` format.
This field is required for Orders customers only, not applicable to Orders Harmonization customers.
'
format: date
type: string
resume:
description: 'Whether to set when to resume a subscription when creating a suspend amendment. Values: `true`, `false`.
'
type: boolean
resumePeriods:
description: 'The length of the period used to specify when the subscription is resumed. The subscription resumption takes effect after a specified period based on the suspend date or today''s date. You must use this field together with the `resumePeriodsType` field to specify the period.
**Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
'
type: string
resumePeriodsType:
description: 'The period type used to define when the subscription resumption takes effect. The subscription resumption takes effect after a specified period based on the suspend date or today''s date. You must use this field together with the resumePeriods field to specify the period.
Values: `Day`, `Week`, `Month`, `Year`
**Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
'
type: string
resumePolicy:
description: 'Resume methods. Specify a way to resume a subscription. Values:
* `Today`: The subscription resumption takes effect on today''s date.
* `FixedPeriodsFromSuspendDate`: The subscription resumption takes effect after a specified period based on the suspend date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.
* `SpecificDate`: The subscription resumption takes effect on a specific date. You must define the specific date in the `resumeSpecificDate` field.
* `FixedPeriodsFromToday`: The subscription resumption takes effect after a specified period based on the today''s date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.
* `suspendDate`: The subscription resumption takes effect on the date of suspension of the subscription.
'
type: string
resumeSpecificDate:
description: 'A specific date when the subscription resumption takes effect, in the format yyyy-mm-dd.
**Note:** This field is only applicable only when the `resumePolicy` field is set to `SpecificDate`.
The value should not be earlier than the subscription suspension date.
'
format: date
type: string
runBilling:
default: false
description: "Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). \n\n\nThe billing documents generated\nin this operation is only for this subscription, not for the entire\ncustomer account.\n\n\nPossible values:\n\n- `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.\n\n\n- `false`: No invoice is created.\n\n\n**Note:** This field is in Zuora REST API version control. Supported\nminor versions are `211.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method,\nyou must set the `zuora-version` parameter to the minor version number\nin the request header.\n"
enum:
- true
- false
type: boolean
suspendPeriods:
description: 'The length of the period used to specify when the subscription suspension takes effect. The subscription suspension takes effect after a specified period based on today''s date. You must use this field together with the `suspendPeriodsType` field to specify the period.
**Note:** This field is only applicable only when the suspendPolicy field is set to FixedPeriodsFromToday.
'
type: string
suspendPeriodsType:
description: 'The period type used to define when the subscription suspension takes effect. The subscription suspension takes effect after a specified period based on today''s date. You must use this field together with the suspendPeriods field to specify the period.
Type: string (enum)
Values: `Day`, `Week`, `Month`, `Year`
**Note:** This field is only applicable only when the suspendPolicy field is set to FixedPeriodsFromToday.
'
type: string
suspendPolicy:
description: "Suspend methods. Specify a way to suspend a subscription. \n\nValue:\n\n* `Today`: The subscription suspension takes effect on today's date.\n* `EndOfLastInvoicePeriod`: The subscription suspension takes effect at the end of the last invoice period. The suspend date defaults to a date that is one day after the last invoiced period. You can choose this option to avoid any negative invoices (credits) issued back to the customer after the subscription suspension. \n* `SpecificDate`: The subscription suspension takes effect on a specific date. You must define the specific date in the `suspendSpecificDate` field.\n* `FixedPeriodsFromToday`: The subscription suspension takes effect after a specified period based on today's date. You must specify the `suspendPeriods` and `suspendPeriodsType` fields to define the period.\n"
type: string
suspendSpecificDate:
description: 'A specific date when the subscription suspension takes effect, in the format yyyy-mm-dd.
**Note:** This field is only applicable only when the suspendPolicy field is set to SpecificDate.
The value should not be earlier than the subscription contract effective date, later than the subscription term end date, or within a period for which the customer has been invoiced.
'
format: date
type: string
targetDate:
description: 'Date through which to calculate charges if an invoice or a credit memo is generated, as
yyyy-mm-dd. Default is current date.
**Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.
This field is in Zuora REST API version control. Supported minor
versions are `211.0` and later. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
format: date
type: string
required:
- suspendPolicy
type: object
PUTSubscriptionSuspendResponseType:
properties:
creditMemoId:
description: 'The credit memo ID, if a credit memo is generated during the subscription process.
**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: string
invoiceId:
description: 'Invoice ID, if an invoice is generated during the subscription process.
'
type: string
paidAmount:
description: 'Payment amount, if a payment is collected.
'
type: number
paymentId:
description: 'Payment ID, if a payment is collected.
'
type: string
resumeDate:
description: 'The date when subscription resumption takes effect, in the format yyyy-mm-dd.
'
format: date
type: string
subscriptionId:
description: 'The subscription ID.
'
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
suspendDate:
description: 'The date when subscription suspension takes effect, in the format yyyy-mm-dd.
'
format: date
type: string
termEndDate:
description: 'The date when the new subscription term ends, in the format yyyy-mm-dd.
'
format: date
type: string
totalDeltaTcv:
description: 'Change in the total contracted value of the subscription as a result of the update.
'
type: number
type: object
PUTSubscriptionPatchSpecificVersionRequestType:
example:
customFields:
sub_cf__c: subscription custom field
ratePlans:
- charges:
- chargeNumber: C-00000016
customFields:
sub_rpc__c: rate plan charge custom field
customFields:
sub_rate_plan__c: rate plan custom field
ratePlanId: 8a8081085d834928015da220da08207f
properties:
customFields:
$ref: '#/definitions/SubscriptionObjectCustomFields'
ratePlans:
items:
properties:
charges:
items:
properties:
chargeId:
description: 'Use either this field or the `chargeNumber` field to specify the charge for which you will be updating the custom fields. By using this field you actually specify a specific charge segment of a charge. See [Segmented rate plan charges](https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/RatePlanCharge#Segmented_rate_plan_charges) for more information about charge segments.
'
type: string
chargeNumber:
description: 'Use either this field or the `chargeId` field to specify the charge for which you will be updating the custom fields. By using this field you actually specify the last charge segment of a charge. See [Segmented rate plan charges](https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/RatePlanCharge#Segmented_rate_plan_charges) for more information about charge segments.
'
type: string
customFields:
$ref: '#/definitions/RatePlanChargeObjectCustomFields'
type: object
type: array
customFields:
$ref: '#/definitions/RatePlanObjectCustomFields'
ratePlanId:
description: The rate plan id in any version of the subscription. This will be linked to the only one rate plan in the current version.
type: string
required:
- ratePlanId
type: object
type: array
type: object
POSTSubscriptionType:
allOf:
- properties:
accountKey:
description: 'Customer account number or ID
'
type: string
applicationOrder:
description: "The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.\n\n**Note:**\n - This field is valid only if the `applyCredit` field is set to `true`.\n - If no value is specified for this field, the default priority order is used, [\"CreditMemo\", \"UnappliedPayment\"], to apply credit memos first and then apply unapplied payments.\n - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `[\"CreditMemo\"]`, only credit memos are used to apply to invoices.\n"
items:
type: string
type: array
applyCredit:
description: 'If the value is true, the credit memo or unapplied payment on the order account will be automatically applied to the invoices generated by this order. The credit memo generated by this order will not be automatically applied to any invoices.
**Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: boolean
applyCreditBalance:
description: "Whether to automatically apply a credit balance to an invoice.\n\nIf the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.\n\n\nTo view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.\n\nPrerequisite: `invoice` must be `true`. \n\n**Note:** \n - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.\n - This field is deprecated if you have the Invoice Settlement feature enabled.\n"
type: boolean
autoRenew:
default: false
description: 'If true, this subscription automatically renews at the end of the subscription term.
This field is only required if the `termType` field is set to `TERMED`.
'
type: boolean
collect:
default: true
description: "Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.\n\nIf the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.\n\nPrerequisite: The `invoice` or `runBilling` field must be `true`. \n\n**Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).\n"
type: boolean
contractEffectiveDate:
description: 'Effective contract date for this subscription, as yyyy-mm-dd
'
format: date
type: string
creditMemoReasonCode:
description: A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code.
type: string
customerAcceptanceDate:
description: 'The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
Default value is dependent on the value of other fields. See **Notes** section for more details.
'
format: date
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
externallyManagedBy:
description: '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.
'
enum:
- Amazon
- Apple
- Google
- Roku
type: string
gatewayId:
description: 'The ID of the payment gateway instance. For example, `2c92c0f86078c4d5016091674bcc3e92`.
'
type: string
initialTerm:
description: 'The length of the period for the first subscription term. If `termType` is `TERMED`, then this field is required, and the value must be greater than `0`. If `termType` is `EVERGREEN`, this field is ignored.
'
format: int64
type: integer
initialTermPeriodType:
description: 'The period type for the first subscription term.
This field is used with the `InitialTerm` field to specify the initial subscription term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
invoice:
description: "**Note:** This field has been replaced by the `runBilling` field. The\n`invoice` field is only available for backward compatibility.\n\n\nCreates an invoice for a subscription. The invoice generated in this\noperation is only for this subscription, not for the entire customer\naccount.\n\n\nIf the value is `true`, an invoice is created. If the value is\n`false`, no action is taken. The default value is `true`. \n\n\nThis field is in Zuora REST API version control. Supported minor\nversions are `196.0` and `207.0`. To use this field in the method, you\nmust set the zuora-version parameter to the minor version number in\nthe request header.\n"
type: boolean
invoiceCollect:
default: true
description: '**Note:** This field has been replaced by the `invoice` field
and the `collect` field. `invoiceCollect` is available only for backward compatibility.
If this field is set to `true`, an invoice is generated and payment collected automatically
during the subscription process. If `false`, no invoicing or payment takes
place. The invoice generated in this operation is only for this subscription,
not for the entire customer account.
**Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
'
type: boolean
invoiceOwnerAccountKey:
description: 'Invoice owner account number or ID.
**Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
'
type: string
invoiceSeparately:
description: "Separates a single subscription from other subscriptions and invoices the charge independently. \n\nIf 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.\n\nThe default value is `false`.\n\nPrerequisite: The default subscription setting Enable Subscriptions to be Invoiced Separately must be set to Yes.\n"
type: boolean
invoiceTargetDate:
description: '**Note:** This field has been replaced by the `targetDate` field. The
`invoiceTargetDate` field is only available for backward
compatibility.
Date through which to calculate charges if an invoice is generated, as
yyyy-mm-dd. Default is current date.
This field is in Zuora REST API version control. Supported minor
versions are `207.0` and earlier [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
format: date
type: string
lastBookingDate:
description: '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](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Migration_Guidance#Subscribe_and_Amend_APIs_to_Migrate), 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. '
format: date
type: string
notes:
description: 'String of up to 500 characters.
'
type: string
paymentMethodId:
description: 'The ID of the payment method used for the payment.
'
type: string
prepayment:
description: "Indicates whether the subscription will consume the reserved payment amount of the customer account. See [Prepaid Cash with Drawdown](https://knowledgecenter.zuora.com/Zuora_Billing/Billing_and_Invoicing/JA_Advanced_Consumption_Billing/Prepaid_Cash_with_Drawdown) for more information. \n"
type: boolean
renewalSetting:
description: 'Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.
Values:
* `RENEW_WITH_SPECIFIC_TERM` (default)
* `RENEW_TO_EVERGREEN`
'
type: string
renewalTerm:
description: 'The length of the period for the subscription renewal term. Default is `0`.
'
format: int64
type: integer
renewalTermPeriodType:
description: 'The period type for the subscription renewal term.
This field is used with the `renewalTerm` field to specify the subscription renewal term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
runBilling:
default: true
description: "Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). \n\n\nThe billing documents generated\nin this operation is only for this subscription, not for the entire\ncustomer account.\n\n\nPossible values:\n\n- `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.\n\n\n- `false`: No invoice is created.\n\n\n**Note:** This field is in Zuora REST API version control. Supported\nminor versions are `211.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method,\nyou must set the `zuora-version` parameter to the minor version number\nin the request header.\n"
enum:
- true
- false
type: boolean
serviceActivationDate:
description: '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.
Default value is dependent on the value of other fields. See **Notes** section for more details.
'
format: date
type: string
subscribeToRatePlans:
description: 'Container for one or more rate plans for this subscription.
'
items:
$ref: '#/definitions/POSTSrpCreateType'
type: array
subscriptionNumber:
description: 'Subscription Number. The value can be up to 1000 characters.
If you do not specify a subscription number when creating a subscription, Zuora will generate a subscription number automatically.
If the account is created successfully, the subscription number is returned in the `subscriptionNumber` response field.
'
type: string
targetDate:
description: 'Date through which to calculate charges if an invoice or a credit memo is generated, as
yyyy-mm-dd. Default is current date.
**Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.
This field is in Zuora REST API version control. Supported minor
versions are `211.0` and later. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
format: date
type: string
termStartDate:
description: 'The date on which the subscription term begins, as yyyy-mm-dd. If this is a renewal subscription, this date is different from the subscription start date.
'
format: date
type: string
termType:
description: 'Possible values are: `TERMED`, `EVERGREEN`.
'
type: string
required:
- accountKey
- contractEffectiveDate
- subscribeToRatePlans
- termType
- renewalTerm
type: object
- $ref: '#/definitions/SubscriptionObjectQTFields'
- $ref: '#/definitions/SubscriptionObjectNSFields'
- $ref: '#/definitions/SubscriptionObjectCustomFields'
example:
accountKey: A00001115
autoRenew: true
contractEffectiveDate: 2015-02-1
creditMemoReasonCode: Unsatisfactory service
initialTerm: '12'
initialTermPeriodType: Week
notes: Test POST subscription from z-ruby-sdk
renewalTerm: '3'
renewalTermPeriodType: Week
subscribeToRatePlans:
- chargeOverrides:
- billCycleDay: '5'
billCycleType: SpecificDayofMonth
billingPeriodAlignment: AlignToCharge
billingTiming: IN_ARREARS
description: This is rate plan charge description
number: TestCharge
price: 12.01
productRatePlanChargeId: ff8080811ca15d19011cddad8c953b53
triggerDate: '2015-09-01'
triggerEvent: USD
productRatePlanId: ff8080811ca15d19011cdda9b0ad3b51
termType: TERMED
SubscriptionObjectCustomFields:
additionalProperties:
description: 'Custom fields of the Subscription object. The name of each custom field has the form *customField*__c. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
'
description: 'Container for custom fields of a Subscription object.
'
title: subscriptionFieldsCustom
type: object
PUTRenewSubscriptionResponseType:
properties:
creditMemoId:
description: 'The credit memo ID, if a credit memo is generated during the subscription process.
**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: string
invoiceId:
description: 'Invoice ID, if one is generated.
'
type: string
paidAmount:
description: 'Payment amount, if payment is collected.
'
type: number
paymentId:
description: 'Payment ID, if payment is collected.
'
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
termEndDate:
description: 'Date the new subscription term ends, as yyyy-mm-dd.
'
format: date
type: string
termStartDate:
description: 'Date the new subscription term begins, as yyyy-mm-dd.
'
format: date
type: string
totalDeltaMrr:
description: 'Change in the subscription monthly recurring revenue as a result of the update. For a renewal, this is the MRR of the subscription in the new term.
'
type: number
totalDeltaTcv:
description: 'Change in the total contracted value of the subscription as a result of the update. For a renewal, this is the TCV of the subscription in the new term.
'
type: number
type: object
PUTDeleteSubscriptionResponseType:
properties:
success:
description: Returns `true` if the request is processed successfully.
type: boolean
type: object
GETDiscountApplyDetailsType:
properties:
appliedProductName:
description: 'The name of the product that the discount rate plan charge applies to.
'
type: string
appliedProductRatePlanChargeId:
description: 'The ID of the product rate plan charge that the discount rate plan charge applies to.
'
type: string
appliedProductRatePlanChargeName:
description: 'The name of the product rate plan charge that the discount rate plan charge applies to.
'
type: string
appliedProductRatePlanId:
description: 'The ID of the product rate plan that the discount rate plan charge applies to.
'
type: string
appliedProductRatePlanName:
description: 'The name of the product rate plan that the discount rate plan charge applies to.
'
type: string
title: discountApplyDetails
type: object
GETAccountSummaryTypeBillToContact:
allOf:
- properties:
address1:
description: 'First address line, 255 characters or less.
'
type: string
address2:
description: 'Second address line, 255 characters or less.
'
type: string
city:
description: 'City, 40 characters or less.
'
type: string
country:
description: 'Full country name. This field does not contain the ISO-standard abbreviation of the country name.
'
type: string
county:
description: 'County; 32 characters or less. Zuora Tax uses this information to calculate county taxation. '
type: string
fax:
description: 'Fax phone number, 40 characters or less.
'
type: string
firstName:
description: 'First name, 100 characters or less.
'
type: string
id:
description: 'Contact ID.
'
type: string
lastName:
description: 'Last name, 100 characters or less.
'
type: string
state:
description: 'Full state name. This field does not contain the ISO-standard abbreviation of the state name.
'
type: string
taxRegion:
description: 'A region string, defined in your Zuora tax rules.
'
type: string
workEmail:
description: 'Work email address, 80 characters or less.
'
type: string
workPhone:
description: 'Work phone number, 40 characters or less.
'
type: string
zipCode:
description: 'Zip code, 20 characters or less.
'
type: string
type: object
- $ref: '#/definitions/ContactObjectCustomFields'
description: "Container for bill-to contact information.\n\n**Note**: \n - 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. \n - If you have the Flexible Billing Attributes feature enabled, and you do not specify the `billToContactId` field in the request or you select **Default Contact from Account** for the `billToContactId` field during subscription creation, the value of the `billToContact` field is automatically set to `null` in the response body.\n"
title: Contact
PUTSubscriptionResponseType:
properties:
amount:
description: 'Invoice amount. Preview mode only.
'
type: number
amountWithoutTax:
description: 'Invoice amount minus tax. Preview mode only.
'
type: number
chargeMetrics:
description: 'Container for charge metrics.
'
properties:
dmrr:
description: 'Change in total contract value.
'
type: string
dtcv:
description: 'Change in monthly recurring revenue.
'
type: string
mrr:
description: 'Monthly recurring revenue.
'
type: string
number:
description: 'The charge number of the subscription. Only available for update subscription.
'
type: string
originRatePlanId:
description: 'The origin rate plan ID. Only available for update subscription.
'
type: string
originalId:
description: 'The original rate plan charge ID. Only available for update subscription.
'
type: string
productRatePlanChargeId:
description: ''
type: string
productRatePlanId:
description: ''
type: string
tcv:
description: 'Total contract value.
'
type: string
type: object
creditMemo:
description: "Container for credit memos.\n\n**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. \n"
properties:
amount:
description: Credit memo amount.
format: double
type: number
amountWithoutTax:
description: Credit memo amount minus tax.
format: double
type: number
creditMemoItems:
description: ''
items:
$ref: '#/definitions/POSTSubscriptionPreviewCreditMemoItemsType'
type: array
taxAmount:
description: Tax amount on the credit memo.
format: double
type: number
type: object
creditMemoId:
description: 'The credit memo ID, if a credit memo is generated during the subscription process.
**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: string
invoice:
description: "Container for invoices.\n\n\n **Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header. Also, the response structure is changed and the following invoice related response fields are moved to this **invoice** container:\n \n * amount\n * amountWithoutTax\n * taxAmount\n * invoiceItems\n * targetDate\n"
properties:
amount:
description: Invoice amount.
format: double
type: number
amountWithoutTax:
description: 'Invoice amount minus tax.
'
format: double
type: number
invoiceItems:
description: 'Container for invoice items.
'
items:
$ref: '#/definitions/PUTSubscriptionPreviewInvoiceItemsType'
type: array
targetDate:
description: 'Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.
**Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header.
'
format: date
type: string
taxAmount:
description: 'The tax amount of the invoice.
'
format: double
type: number
type: object
invoiceId:
description: 'Invoice ID, if an invoice is generated during the update.
'
type: string
invoiceItems:
description: 'Container for invoice items.
'
items:
$ref: '#/definitions/PUTSubscriptionPreviewInvoiceItemsType'
type: array
invoiceTargetDate:
description: 'Date through which charges are calculated on the invoice, as yyyy-mm-dd. Preview mode only.
**Note:** This field is only available if you do not specify the Zuora REST API minor version or specify the minor version to 186.0, 187.0, 188.0, 189.0, and 196.0. .
'
format: date
type: string
paidAmount:
description: 'Payment amount, if a payment is collected
'
type: number
paymentId:
description: 'Payment ID, if a payment is collected.
'
type: string
subscriptionId:
description: 'The ID of the resulting new subscription.
'
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
targetDate:
description: 'Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.
**Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header.
'
format: date
type: string
taxAmount:
description: 'Tax amount on the invoice.
'
type: number
totalDeltaMrr:
description: 'Change in the subscription monthly recurring revenue as a result of the update.
'
type: number
totalDeltaTcv:
description: 'Change in the total contracted value of the subscription as a result of the update.
'
type: number
type: object
PUTSubscriptionType:
allOf:
- properties:
add:
description: 'Container for adding one or more rate plans.
'
items:
$ref: '#/definitions/PUTSrpAddType'
type: array
applicationOrder:
description: "The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.\n\n**Note:**\n - This field is valid only if the `applyCredit` field is set to `true`.\n - If no value is specified for this field, the default priority order is used, [\"CreditMemo\", \"UnappliedPayment\"], to apply credit memos first and then apply unapplied payments.\n - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `[\"CreditMemo\"]`, only credit memos are used to apply to invoices.\n"
items:
type: string
type: array
applyCredit:
description: 'Whether to automatically apply credit memos or unapplied payments, or both to an invoice.
If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.
**Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: boolean
applyCreditBalance:
description: "Whether to automatically apply a credit balance to an invoice.\n\nIf the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.\n\n\nTo view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.\n\nPrerequisite: `invoice` must be `true`. \n\n**Note:** \n - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.\n - This field is deprecated if you have the Invoice Settlement feature enabled.\n"
type: boolean
autoRenew:
description: 'If `true`, this subscription automatically renews at the end of the subscription term. Default is `false`.
'
type: boolean
bookingDate:
description: "The booking date that you want to set for the contract when you change the `termType` field of the subscription and as a result get a new version of subscription created. The booking date of an amendment is the equivalent of the order date of an order. This field must be in the `yyyy-mm-dd` format. The default value is the current date when you make the API call. \n"
format: date
type: string
change:
description: 'Use this field to change one or more rate plans - to replace the existing rate plans in a subscription with other rate plans.
**Note**: Changing rate plans is currently not supported for Billing - Revenue Integration. When Billing - Revenue Integration is enabled, changing rate plans will no longer be applicable in Zuora Billing.
'
items:
$ref: '#/definitions/PUTSrpChangeType'
type: array
collect:
default: false
description: "Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.\n\nIf the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.\n\nPrerequisite: The `invoice` or `runBilling` field must be `true`. \n\n**Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).\n"
type: boolean
creditMemoReasonCode:
description: A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code.
type: string
currentTerm:
description: 'The length of the period for the current subscription term. If `termType` is `TERMED`, this field is required and must be greater than `0`. If `termType` is `EVERGREEN`, this value is ignored.
'
format: int64
type: integer
currentTermPeriodType:
description: 'The period type for the current subscription term.
This field is used with the `CurrentTerm` field to specify the current subscription term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
externallyManagedBy:
description: '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.
'
enum:
- Amazon
- Apple
- Google
- Roku
type: string
includeExistingDraftDocItems:
description: 'Specifies whether to include draft invoice items in subscription previews.
Values are:
* `true` (default). Includes draft invoice items in the preview result.
* `false`. Excludes draft invoice items in the preview result.
**Note:** This field is in Zuora REST API version control. Supported minor versions are 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method, you must set the **zuora-version** parameter to the minor version number in the request header.
'
type: boolean
includeExistingDraftInvoiceItems:
description: 'Specifies whether to include draft invoice items in subscription previews.
Values are:
* `true` (default). Includes draft invoice items in the preview result.
* `false`. Excludes draft invoice items in the preview result.
**Note:** This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, 196.0, and 206.0. .
'
type: boolean
invoice:
description: "**Note:** This field has been replaced by the `runBilling` field. The\n`invoice` field is only available for backward compatibility.\n\n\nCreates an invoice for a subscription. The invoice generated in this\noperation is only for this subscription, not for the entire customer\naccount.\n\n\nIf the value is `true`, an invoice is created. If the value is\n`false`, no action is taken. The default value is `false`. \n\n\nThis field is in Zuora REST API version control. Supported minor\nversions are `196.0` and `207.0`. To use this field in the method, you\nmust set the zuora-version parameter to the minor version number in\nthe request header.\n"
type: boolean
invoiceCollect:
default: false
description: '**Note:** This field has been replaced by the `invoice` field
and the `collect` field. `invoiceCollect` is available only for backward
compatibility.
If `true`, an invoice is generated and payment collected automatically during
the subscription process. If `false`, no invoicing or payment
takes place. The invoice generated in this operation is only for this subscription,
not for the entire customer account.
**Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
'
type: boolean
invoiceSeparately:
description: "Separates a single subscription from other subscriptions and invoices the charge independently. \n\nIf 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.\n\nThe default value is `false`.\nPrerequisite: The default subscription setting Enable Subscriptions to be Invoiced Separately must be set to Yes.\n"
type: boolean
invoiceTargetDate:
description: '**Note:** This field has been replaced by the `targetDate` field. The
`invoiceTargetDate` field is only available for backward
compatibility.
Date through which to calculate charges if an invoice is generated, as
yyyy-mm-dd. Default is current date.
This field is in Zuora REST API version control. Supported minor
versions are `207.0` and earlier [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
format: date
type: string
notes:
description: 'String of up to 500 characters.
'
type: string
preview:
description: 'If `true` the update is made in preview mode. The default setting is `false`.
'
type: boolean
previewType:
description: "The type of preview you will receive. \n\nThis field is in Zuora REST API version control. The supported values of this field depend on the REST API minor version you specified in the request header.\n\n\n* If you do not specify the REST API minor version or specify the minor version number to one of following values in the request header:\n\n * 186.0\n * 187.0\n * 188.0\n * 189.0\n * 196.0\n * 206.0\n\n The following values are supported in the **previewType** field:\n\n * InvoiceItem\n * ChargeMetrics\n * InvoiceItemChargeMetrics\n\n The default value is InvoiceItem.\n\n* If you specify the REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, the following values are supported in the **previewType** field:\n\n - LegalDoc\n - ChargeMetrics\n - LegalDocChargeMetrics\n\n The default value is LegalDoc.\n\n.\n"
type: string
remove:
description: 'Container for removing one or more rate plans.
'
items:
$ref: '#/definitions/PUTSrpRemoveType'
type: array
renewalSetting:
description: "Specifies whether a termed subscription will remain `TERMED` or change to `EVERGREEN` when it is renewed. \n\nValues are:\n\n* `RENEW_WITH_SPECIFIC_TERM` (default)\n* `RENEW_TO_EVERGREEN`\n"
type: string
renewalTerm:
description: 'The length of the period for the subscription renewal term. Default is `0`.
'
format: int64
type: integer
renewalTermPeriodType:
description: '
The period type for the subscription renewal term.
This field is used with the `renewalTerm` field to specify the subscription renewal term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
runBilling:
default: false
description: "Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). \n\n\nThe billing documents generated\nin this operation is only for this subscription, not for the entire\ncustomer account.\n\n\nPossible values:\n\n- `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.\n\n\n- `false`: No invoice is created.\n\n\n**Note:** This field is in Zuora REST API version control. Supported\nminor versions are `211.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method,\nyou must set the `zuora-version` parameter to the minor version number\nin the request header.\n"
enum:
- true
- false
type: boolean
targetDate:
description: 'Date through which to calculate charges if an invoice or a credit memo is generated, as
yyyy-mm-dd. Default is current date.
**Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.
This field is in Zuora REST API version control. Supported minor
versions are `211.0` and later. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
format: date
type: string
termStartDate:
description: "Date the subscription term begins, as yyyy-mm-dd. If this is a renewal subscription, this date is different from the subscription start date. \n"
format: date
type: string
termType:
description: 'Possible values are: `TERMED`, `EVERGREEN`.
'
type: string
update:
description: 'Container for updating one or more rate plans.
'
items:
$ref: '#/definitions/PUTSrpUpdateType'
type: array
type: object
- $ref: '#/definitions/SubscriptionObjectQTFields'
- $ref: '#/definitions/SubscriptionObjectNSFields'
- $ref: '#/definitions/SubscriptionObjectCustomFields'
example:
autoRenew: false
bookingDate: '2022-01-01'
collect: false
creditMemoReasonCode: Unsatisfactory service
currentTerm: '10'
currentTermPeriodType: Month
notes: Test UPDATE subscription from z-ruby-sdk
renewalSetting: RENEW_WITH_SPECIFIC_TERM
renewalTerm: '4'
renewalTermPeriodType: Month
runBilling: true
termType: TERMED
update:
- bookingDate: '2022-01-02'
chargeUpdateDetails:
- quantity: 12
ratePlanChargeId: 2c92c8f83dcbd8b1013dcce0eb510075
contractEffectiveDate: '2013-04-28'
ratePlanId: 2c92c8f83dcbd8b1013dcce0ea7e006f
GETSubscriptionType:
allOf:
- properties:
accountId:
description: ''
type: string
accountName:
description: ''
type: string
accountNumber:
description: ''
type: string
autoRenew:
description: 'If `true`, the subscription automatically renews at the end of the term. Default is `false`.
'
type: boolean
billToContact:
$ref: '#/definitions/GETAccountSummaryTypeBillToContact'
cancelReason:
description: "The reason for a subscription cancellation copied from the `changeReason` field of a Cancel Subscription order action. \n\nThis 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`.\n"
type: string
contractEffectiveDate:
description: 'Effective contract date for this subscription, as yyyy-mm-dd.
'
format: date
type: string
contractedMrr:
description: 'Monthly recurring revenue of the subscription.
'
type: number
currency:
description: 'The currency of the subscription.
**Note**: This field is available only if you have the Multiple Currencies feature in the **Early Adopter** phase enabled.
'
type: string
currentTerm:
description: 'The length of the period for the current subscription term.
'
format: int64
type: integer
currentTermPeriodType:
description: 'The period type for the current subscription term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
customerAcceptanceDate:
description: 'The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
'
format: date
type: string
externallyManagedBy:
description: '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.
'
enum:
- Amazon
- Apple
- Google
- Roku
type: string
id:
description: 'Subscription ID.
'
type: string
initialTerm:
description: 'The length of the period for the first subscription term.
'
format: int64
type: integer
initialTermPeriodType:
description: 'The period type for the first subscription term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
invoiceOwnerAccountId:
description: ''
type: string
invoiceOwnerAccountName:
description: ''
type: string
invoiceOwnerAccountNumber:
description: ''
type: string
invoiceScheduleId:
description: '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 in the **Early Adopter** phase enabled.
'
type: integer
invoiceSeparately:
description: "Separates a single subscription from other subscriptions and creates an invoice for the subscription. \n\nIf 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.\n"
type: string
invoiceTemplateId:
description: "The ID of the invoice template associated with the subscription.\n\n**Note**: \n - 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. \n - 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.\n"
type: string
invoiceTemplateName:
description: "The name of the invoice template associated with the subscription.\n\n**Note**: \n - If you have the Flexible Billing Attributes feature disabled, the value of this field is `null` in the response body. \n - 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.\n \n"
type: string
isLatestVersion:
description: If `true`, the current subscription object is the latest version.
type: boolean
lastBookingDate:
description: '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](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Migration_Guidance#Subscribe_and_Amend_APIs_to_Migrate), 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. '
format: date
type: string
notes:
description: 'A string of up to 65,535 characters.
'
type: string
offers:
description: "Container for offers. \n\n**Note**:The Offers feature is only available in tenants with Orders enabled. To enable the Offers feature, submit a request at Zuora Global Support. \n"
items:
$ref: '#/definitions/GETSubscriptionOfferType'
type: array
orderNumber:
description: "The order number of the order in which the changes on the subscription are made. \n\n**Note:** This field is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). We will investigate your use cases and data before enabling this feature for you.\n"
type: string
organizationLabel:
description: 'The organization that this object belongs to.
Note: This field is available only when the Multi-Org feature is enabled.
'
type: string
paymentTerm:
description: "The name of the payment term associated with the subscription. For example, `Net 30`. The payment term determines the due dates of invoices.\n\n**Note**: \n - 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. \n - 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.\n"
type: string
ratePlans:
description: 'Container for rate plans.
'
items:
$ref: '#/definitions/GETSubscriptionRatePlanType'
type: array
renewalSetting:
description: "Specifies whether a termed subscription will remain `TERMED` or change to `EVERGREEN` when it is renewed. \n\nValues are:\n\n* `RENEW_WITH_SPECIFIC_TERM` (default)\n* `RENEW_TO_EVERGREEN`\n"
type: string
renewalTerm:
description: 'The length of the period for the subscription renewal term.
'
format: int64
type: integer
renewalTermPeriodType:
description: 'The period type for the subscription renewal term.
Values are:
* `Month` (default)
* `Year`
* `Day`
* `Week`
'
type: string
revision:
description: '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.
'
type: string
sequenceSetId:
description: "The ID of the sequence set associated with the subscription.\n\n**Note**: \n - 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. \n - 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.\n"
type: string
sequenceSetName:
description: "The name of the sequence set associated with the subscription.\n\n**Note**: \n - If you have the Flexible Billing Attributes feature disabled, the value of this field is `null` in the response body. \n - 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.\n"
type: string
serviceActivationDate:
description: '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
'
format: date
type: string
soldToContact:
$ref: '#/definitions/GETAccountSummaryTypeSoldToContact'
status:
description: 'Subscription status; possible values are:
* `Draft`
* `Pending Activation`
* `Pending Acceptance`
* `Active`
* `Cancelled`
* `Suspended`
'
type: string
statusHistory:
description: 'Container for status history.
'
items:
$ref: '#/definitions/GETSubscriptionStatusHistoryType'
type: array
subscriptionEndDate:
description: '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.
'
format: date
type: string
subscriptionNumber:
description: ''
type: string
subscriptionStartDate:
description: 'Date the subscription becomes effective.
'
format: date
type: string
termEndDate:
description: 'Date the subscription term ends. If the subscription is evergreen, this is null or is the cancellation date (if one has been set).
'
format: date
type: string
termStartDate:
description: 'Date the subscription term begins. If this is a renewal subscription, this date is different from the subscription start date.
'
format: date
type: string
termType:
description: 'Possible values are: `TERMED`, `EVERGREEN`.
'
type: string
totalContractedValue:
description: 'Total contracted value of the subscription.
'
type: number
version:
description: 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.
format: int64
type: integer
type: object
- $ref: '#/definitions/SubscriptionObjectQTFields'
- $ref: '#/definitions/SubscriptionObjectNSFields'
- $ref: '#/definitions/SubscriptionObjectCustomFields'
title: subscriptions
POSTSubscriptionCancellationResponseType:
properties:
cancelledDate:
description: "The date that the subscription was canceled. \n\nThis field is available in the Orders Harmonization tenants and the Subscribe and Amend tenants. This field is not available in the Orders tenants. For more information, see Identify your tenant type for managing subscriptions.\n"
format: date
type: string
creditMemoId:
description: 'The credit memo ID, if a credit memo is generated during the subscription process.
**Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version) in the request header, and you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: string
invoiceId:
description: 'ID of the invoice, if one is generated.
'
type: string
paidAmount:
description: 'Amount paid.
'
type: number
paymentId:
description: 'ID of the payment, if a payment is collected.
'
type: string
subscriptionId:
description: 'The subscription ID.
'
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
totalDeltaMrr:
description: 'Change in the subscription monthly recurring revenue as a result of the update.
'
type: number
totalDeltaTcv:
description: 'Change in the total contracted value of the subscription as a result of the update.
'
type: number
type: object
RatePlanChargeObjectCustomFields:
additionalProperties:
description: 'Custom fields of the Rate Plan Charge object. The name of each custom field has the form *customField*__c. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
'
description: 'Container for custom fields of a Rate Plan Charge object.
'
title: ratePlanChargeFieldsCustom
type: object
PUTRenewSubscriptionType:
example:
collect: false
creditMemoReasonCode: Unsatisfactory service
runBilling: true
properties:
applicationOrder:
description: "The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.\n\n**Note:**\n - This field is valid only if the `applyCredit` field is set to `true`.\n - If no value is specified for this field, the default priority order is used, [\"CreditMemo\", \"UnappliedPayment\"], to apply credit memos first and then apply unapplied payments.\n - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `[\"CreditMemo\"]`, only credit memos are used to apply to invoices.\n"
items:
type: string
type: array
applyCredit:
description: 'If the value is true, the credit memo or unapplied payment on the order account will be automatically applied to the invoices generated by this order. The credit memo generated by this order will not be automatically applied to any invoices.
**Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: boolean
applyCreditBalance:
description: "Whether to automatically apply a credit balance to an invoice.\n\nIf the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.\n\n\nTo view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.\n\nPrerequisite: `invoice` must be `true`. \n\n**Note:** \n - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.\n - This field is deprecated if you have the Invoice Settlement feature enabled.\n"
type: boolean
collect:
default: false
description: "Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.\n\nIf the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.\n\nPrerequisite: The `invoice` or `runBilling` field must be `true`. \n\n**Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).\n"
type: boolean
creditMemoReasonCode:
description: A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code.
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
invoice:
description: "**Note:** This field has been replaced by the `runBilling` field. The\n`invoice` field is only available for backward compatibility.\n\n\nCreates an invoice for a subscription. The invoice generated in this\noperation is only for this subscription, not for the entire customer\naccount.\n\n\nIf the value is `true`, an invoice is created. If the value is\n`false`, no action is taken. The default value is `false`. \n\n\nThis field is in Zuora REST API version control. Supported minor\nversions are `196.0` and `207.0`. To use this field in the method, you\nmust set the zuora-version parameter to the minor version number in\nthe request header.\n"
type: boolean
invoiceCollect:
default: true
description: '**Note:** This field has been replaced by the `invoice` field
and the `collect` field. `invoiceCollect` is available only for backward compatibility.
If this field is set to `true`, an invoice is generated and payment collected automatically during the subscription process. If `false`, no invoicing or payment takes place. The invoice generated in this operation is only for this subscription, not for the entire customer account.
**Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
'
type: boolean
invoiceTargetDate:
description: '**Note:** This field has been replaced by the `targetDate` field. The
`invoiceTargetDate` field is only available for backward
compatibility.
Date through which to calculate charges if an invoice is generated, as
yyyy-mm-dd. Default is current date.
This field is in Zuora REST API version control. Supported minor
versions are `207.0` and earlier [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
format: date
type: string
orderDate:
description: 'The date when the order is signed. If no additinal contractEffectiveDate is provided, this order will use this order date as the contract effective date.
This field must be in the `yyyy-mm-dd` format.
This field is required for Orders customers only, not applicable to Orders Harmonization customers.
'
format: date
type: string
runBilling:
default: false
description: "Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). \n\n\nThe billing documents generated\nin this operation is only for this subscription, not for the entire\ncustomer account.\n\n\nPossible values:\n\n- `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.\n\n\n- `false`: No invoice is created.\n\n\n**Note:** This field is in Zuora REST API version control. Supported\nminor versions are `211.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method,\nyou must set the `zuora-version` parameter to the minor version number\nin the request header.\n"
enum:
- true
- false
type: boolean
targetDate:
description: 'Date through which to calculate charges if an invoice or a credit memo is generated, as
yyyy-mm-dd. Default is current date.
**Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.
This field is in Zuora REST API version control. Supported minor
versions are `211.0` and later. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
format: date
type: string
type: object
RatePlanObjectCustomFields:
additionalProperties:
description: 'Custom fields of the Rate Plan object. The name of each custom field has the form *customField*__c. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
'
description: 'Container for custom fields of a Rate Plan object.
'
title: ratePlanFieldsCustom
type: object
POSTSubscriptionPreviewTaxationItemsType:
properties:
exemptAmount:
description: 'The calculated tax amount excluded due to the exemption.
'
type: number
jurisdiction:
description: 'The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
'
type: string
locationCode:
description: 'The identifier for the location based on the value of the taxCode field.
'
type: string
name:
description: 'The name of the taxation item.
'
type: string
taxAmount:
description: 'The tax amount of the invoice item.
'
format: double
type: number
taxCode:
description: 'The tax code identifies which tax rules and tax rates to apply to a specific invoice.
'
type: string
taxCodeDescription:
description: 'The description of the tax code.
'
type: string
taxDate:
description: 'The date when the tax is applied to the invoice.
'
type: string
taxRate:
description: 'The tax rate applied to the invoice. '
type: number
taxRateDescription:
description: 'The description of the tax rate.
'
type: string
taxRateType:
description: 'Enum:"Percentage" "FlatFee". The type of the tax rate applied to the invoice.
'
enum:
- Percentage
- FlatFee
type: string
title: taxationItems
type: object
POSTSrpCreateType:
allOf:
- properties:
chargeOverrides:
description: 'This optional container is used to override the quantity of one or more product rate plan charges for this subscription.
'
items:
$ref: '#/definitions/POSTScCreateType'
type: array
externalCatalogPlanId:
description: 'An external ID of the product rate plan to be added. You can use this field to specify a product rate plan that is imported from an external system. The value of the `externalCatalogPlanId` field must match one of the values that are predefined in the `externallyManagedPlanIds` field on a product rate plan.
**Note:** If both `externalCatalogPlanId` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externalIdSourceSystem:
description: 'The ID of the external source system. You can use this field and `externalCatalogPlanId` to specify a product rate plan that is imported from an external system.
**Note:** If both `externalCatalogPlanId`, `externalIdSourceSystem` and `productRatePlanId` are provided. They must point to the same product rate plan. Otherwise, the request would fail.
'
type: string
externallyManagedPlanId:
description: 'Indicates the unique identifier for the rate plan purchased on a third-party store. This field is used to represent a subscription rate plan created through third-party stores.
'
type: string
productRatePlanId:
description: 'ID of a product rate plan for this subscription.
'
type: string
productRatePlanNumber:
description: 'Number of a product rate plan for this subscription.
'
type: string
type: object
- $ref: '#/definitions/RatePlanObjectCustomFields'
title: subscribeToRatePlans
POSTSubscriptionCancellationType:
example:
cancellationEffectiveDate: '2019-05-31'
cancellationPolicy: SpecificDate
collect: false
creditMemoReasonCode: Unsatisfactory service
runBilling: true
properties:
applicationOrder:
description: "The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.\n\n**Note:**\n - This field is valid only if the `applyCredit` field is set to `true`.\n - If no value is specified for this field, the default priority order is used, [\"CreditMemo\", \"UnappliedPayment\"], to apply credit memos first and then apply unapplied payments.\n - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `[\"CreditMemo\"]`, only credit memos are used to apply to invoices.\n"
items:
type: string
type: array
applyCredit:
description: 'If the value is true, the credit memo or unapplied payment on the order account will be automatically applied to the invoices generated by this order. The credit memo generated by this order will not be automatically applied to any invoices.
**Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
'
type: boolean
applyCreditBalance:
description: "Whether to automatically apply a credit balance to an invoice.\n\nIf the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.\n\n\nTo view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.\n\nPrerequisite: `invoice` must be `true`. \n\n**Note:** \n - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.\n - This field is deprecated if you have the Invoice Settlement feature enabled.\n"
type: boolean
bookingDate:
description: 'The booking date that you want to set for the amendment contract when you cancel the subscription. The default value is the current date when you make the API call.
'
format: date
type: string
cancellationEffectiveDate:
description: 'Date the cancellation takes effect, in the format yyyy-mm-dd. Use only if `cancellationPolicy` is `SpecificDate`. Should not be earlier than the subscription contract-effective date, later than the subscription term-end date, or within a period for which the customer has been invoiced.
'
format: date
type: string
cancellationPolicy:
description: 'Cancellation method. Possible values are: `EndOfCurrentTerm`, `EndOfLastInvoicePeriod`, `SpecificDate`. If using `SpecificDate`, the `cancellationEffectiveDate` field is required.
'
type: string
collect:
default: false
description: "Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.\n\nIf the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.\n\nPrerequisite: The `invoice` or `runBilling` field must be `true`. \n\n**Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).\n"
type: boolean
contractEffectiveDate:
description: 'The date when the customer notifies you that they want to cancel their subscription.
'
format: date
type: string
creditMemoReasonCode:
description: A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code.
type: string
documentDate:
description: "The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.\n\n- If this field is specified, the specified date is used as the billing document date. \n- If this field is not specified, the date specified in the `targetDate` is used as the billing document date.\n"
format: date
type: string
invoice:
description: "**Note:** This field has been replaced by the `runBilling` field. The\n`invoice` field is only available for backward compatibility.\n\n\nCreates an invoice for a subscription. The invoice generated in this\noperation is only for this subscription, not for the entire customer\naccount.\n\n\nIf the value is `true`, an invoice is created. If the value is\n`false`, no action is taken. The default value is `false`. \n\n\nThis field is in Zuora REST API version control. Supported minor\nversions are `196.0` and `207.0`. To use this field in the method, you\nmust set the zuora-version parameter to the minor version number in\nthe request header.\n"
type: boolean
invoiceCollect:
default: false
description: 'This field has been replaced by the `invoice` field and the
`collect` field. `invoiceCollect` is available only for backward compatibility.
If this field is set to `true`, an invoice is generated and payment automatically collected.
**Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
'
type: boolean
invoiceTargetDate:
description: '**Note:** This field has been replaced by the `targetDate` field. The
`invoiceTargetDate` field is only available for backward
compatibility.
Date through which to calculate charges if an invoice is generated, as
yyyy-mm-dd. Default is current date.
This field is in Zuora REST API version control. Supported minor
versions are `207.0` and earlier [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version).
'
format: date
type: string
orderDate:
description: "The date when the order is signed. If no additinal contractEffectiveDate is provided, this order will use this order date as the contract effective date.\nThis field must be in the `yyyy-mm-dd` format.\nThis field is required for Orders customers only, not applicable to Orders Harmonization customers. \n"
format: date
type: string
runBilling:
default: false
description: "Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). \n\n\nThe billing documents generated\nin this operation is only for this subscription, not for the entire\ncustomer account.\n\n\nPossible values:\n\n- `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.\n\n\n- `false`: No invoice is created.\n\n\n**Note:** This field is in Zuora REST API version control. Supported\nminor versions are `211.0` or later [available versions](/api-references/api/overview/#section/API-Versions/Minor-Version). To use this field in the method,\nyou must set the `zuora-version` parameter to the minor version number\nin the request header.\n"
enum:
- true
- false
type: boolean
targetDate:
description: 'Date through which to calculate charges if an invoice or a credit memo is generated, as
yyyy-mm-dd. Default is current date.
**Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.
This field is in Zuora REST API version control. Supported minor
versions are `211.0` and later. To use this field in the method, you
must set the `zuora-version` parameter to the minor version number in
the request header.
'
format: date
type: string
required:
- cancellationPolicy
type: object
parameters:
GLOBAL_HEADER_Accept_Encoding:
name: Accept-Encoding
in: header
required: false
type: string
description: "Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. \n\nIf 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.\n"
GLOBAL_HEADER_Zuora_Org_Ids:
name: Zuora-Org-Ids
in: header
required: false
type: string
description: "Comma separated IDs. If you have Zuora Multi-Org enabled, \nyou 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.\n\nThe 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.\n\nIf the header is not set, the operation is performed in scope of the user's accessible orgs.\n"
GLOBAL_HEADER_Idempotency_Key:
name: Idempotency-Key
in: header
required: false
type: string
maxLength: 255
description: "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. \n\nWith 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. \n"
GLOBAL_HEADER_Content_Encoding:
name: Content-Encoding
in: header
required: false
type: string
description: '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.
'
GLOBAL_HEADER_Zuora_Entity_Ids_Single:
name: Zuora-Entity-Ids
in: header
required: false
type: string
description: 'An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/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 do not need to set this header.
'
GLOBAL_HEADER_Zuora_Track_Id:
name: Zuora-Track-Id
in: header
required: false
type: string
maxLength: 64
description: '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 (`''`).
'
GLOBAL_REQUEST_pageSize:
name: pageSize
in: query
required: false
type: integer
maximum: 40
default: 20
description: 'The number of records returned per page in the response.
'
GLOBAL_HEADER_Authorization_OAuth_optional:
name: Authorization
in: header
required: false
type: string
description: 'The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](/api-references/api/operation/createToken).
'
GLOBAL_REQUEST_page:
name: page
in: query
required: false
type: integer
minimum: 1
default: 1
description: 'The index number of the page that you want to retrieve. This parameter is dependent on `pageSize`. You must set `pageSize` before specifying `page`. For example, if you set `pageSize` to `20` and `page` to `2`, the 21st to 40th records are returned in the response.
'
x-tagGroups:
- name: Authentication
tags:
- OAuth
- name: Products
tags:
- Products
- Catalog
- Catalog Groups
- Offers
- Price Book Items
- Product Rate Plans
- Product Rate Plan Definitions
- Product Rate Plan Charges
- Product Charge Definitions
- Product Rate Plan Charge Tiers
- Zuora Revenue Integration
- name: Customer Accounts
tags:
- Accounts
- Contacts
- Contact Snapshots
- name: Orders and Subscriptions
tags:
- Sign Up
- Orders
- Order Actions
- Order Line Items
- Fulfillments
- Ramps
- Subscriptions
- Rate Plans
- name: Advanced Consumption Billing
tags:
- Prepaid with Drawdown
- name: Usage
tags:
- Usage
- name: Billing Documents
tags:
- Delivery Adjustments
- Billing Documents
- Invoices
- Credit Memos
- Debit Memos
- E-Invoicing
- Invoice Schedules
- Taxation Items
- Sequence Sets
- Operations
- name: Bill Runs
tags:
- Bill Run
- Billing Preview Run
- name: Payment Methods
tags:
- Payment Methods
- Custom Payment Method Types
- Payment Method Updater
- Payment Method Snapshots
- Payment Method Transaction Logs
- Hosted Pages
- RSA Signatures
- name: Payments
tags:
- Payment Authorization
- Payment Gateways
- Payment Gateway Reconciliation
- Payments
- Payment Transaction Logs
- Payment Runs
- Payment Schedules
- Refunds
- name: Finance
tags:
- Accounting Codes
- Accounting Periods
- Summary Journal Entries
- Journal Runs
- Mass Updater
- name: Events and Notifications
tags:
- Notifications
- Custom Event Triggers
- Custom Scheduled Events
- name: Custom Objects
tags:
- Custom Object Definitions
- Custom Object Records
- Custom Object Jobs
- name: System Health
tags:
- API Health
- Bill Run Health
- Electronic Payments Health
- name: Workflow
tags:
- Workflows
- name: Data Query
tags:
- Data Queries
- name: AQuA
tags:
- Aggregate Queries
- name: Deployment Manager
tags:
- Configuration Templates
- name: Multiple Organizations
tags:
- Data Labeling
- name: Order to Revenue
tags:
- Regenerate
- name: General-Purpose Operations
tags:
- Actions
- Settings
- Files
- Imports
- Custom Exchange Rates
- Attachments
- Describe