UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 3.74 MB
{"openapi":"3.0.0","info":{"contact":{"email":"docs@zuora.com","x-twitter":"Zuora"},"description":"\n\n# Introduction\nWelcome to the reference for the Zuora REST API!\n\n<a href=\"http://en.wikipedia.org/wiki/REST_API\" target=\"_blank\">REST</a> is a web-service protocol that lends itself to rapid development by using everyday HTTP and JSON technology.\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 Object Model.\n\nWant to share your opinion on how our API works for you? <a href=\"https://community.zuora.com/t5/Developers/API-Feedback-Form/gpm-p/21399\" target=\"_blank\">Tell us how you feel </a>about using our API and what we can do to make it better.\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 Production | https://rest.zuora.com |\n|US API Sandbox | https://rest.apisandbox.zuora.com|\n|US Performance Test | https://rest.pt1.zuora.com |\n|EU Production | https://rest.eu.zuora.com |\n|EU Sandbox | https://rest.sandbox.eu.zuora.com |\n\nThe Production endpoint provides access to your live user data. API Sandbox tenants are a good place to test code without affecting real-world data. If you would like Zuora to provision an API Sandbox tenant for you, contact your Zuora representative for assistance.\n\n**Note:** If you have a tenant in the Production Copy Environment, submit a request at <a href=\"http://support.zuora.com/\" target=\"_blank\">Zuora Global Support</a> to enable the Zuora REST API in your tenant and obtain the base URL for REST endpoints.\n\nIf you do not have a Zuora tenant, go to <a href=\"https://www.zuora.com/resource/zuora-test-drive\" target=\"_blank\">https://www.zuora.com/resource/zuora-test-drive</a> and sign up for a Production Test Drive tenant. The tenant comes with seed data, including a sample product catalog.\n\n# API Changelog\nYou can find the <a href=\"https://community.zuora.com/t5/Developers/API-Changelog/gpm-p/18092\" target=\"_blank\">Changelog</a> of the API Reference in the Zuora Community.\n\n# Authentication\n\n## OAuth v2.0\n\nZuora recommends that you use OAuth v2.0 to authenticate to the Zuora REST API. Currently, OAuth is not available in every environment. See [Zuora Testing Environments](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Zuora_Environments) for more information.\n\nZuora recommends you to create a dedicated API user with API write access on a tenant when authenticating via OAuth, and then create an OAuth client for this user. See <a href=\"https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users/Create_an_API_User\" target=\"_blank\">Create an API User</a> for how to do this. By creating a dedicated API user, you can control permissions of the API user without affecting other non-API users.\n\nIf a user is deactivated, all of the user's OAuth clients will be automatically deactivated.\n\nAuthenticating via OAuth requires the following steps:\n1. Create a Client\n2. Generate a Token\n3. Make Authenticated Requests\n\n### Create a Client\n\nYou must first [create an OAuth client](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users#Create_an_OAuth_Client_for_a_User) in the Zuora UI. To do this, you must be an administrator of your Zuora tenant. This is a one-time operation. You will be provided with a Client ID and a Client Secret. Please note this information down, as it will be required for the next step.\n\n**Note:** The OAuth client will be owned by a Zuora user account. If you want to perform PUT, POST, or DELETE operations using the OAuth client, the owner of the OAuth client must have a Platform role that includes the \"API Write Access\" permission.\n\n### Generate a Token\n\nAfter creating a client, you must make a call to obtain a bearer token using the [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) operation. This operation requires the following parameters:\n- `client_id` - the Client ID displayed when you created the OAuth client in the previous step\n- `client_secret` - the Client Secret displayed when you created the OAuth client in the previous step\n- `grant_type` - must be set to `client_credentials`\n\n**Note**: The Client ID and Client Secret mentioned above were displayed when you created the OAuth Client in the prior step. The [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) response specifies how long the bearer token is valid for. Call [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) again to generate a new bearer token.\n\n### Make Authenticated Requests\n\nTo authenticate subsequent API requests, you must provide a valid bearer token in an HTTP header:\n\n`Authorization: Bearer {bearer_token}`\n\nIf you have [Zuora Multi-entity](https://www.zuora.com/developer/api-reference/#tag/Entities) enabled, you need to set an additional header to specify the ID of the entity that you want to access. You can use the `scope` field in the [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) response to determine whether you need to specify an entity ID.\n\nIf the `scope` field contains more than one entity ID, you must specify the ID of the entity that you want to access. For example, if the `scope` field contains `entity.1a2b7a37-3e7d-4cb3-b0e2-883de9e766cc` and `entity.c92ed977-510c-4c48-9b51-8d5e848671e9`, specify one of the following headers:\n- `Zuora-Entity-Ids: 1a2b7a37-3e7d-4cb3-b0e2-883de9e766cc`\n- `Zuora-Entity-Ids: c92ed977-510c-4c48-9b51-8d5e848671e9`\n\n**Note**: For a limited period of time, Zuora will accept the `entityId` header as an alternative to the `Zuora-Entity-Ids` header. If you choose to set the `entityId` header, you must remove all \"-\" characters from the entity ID in the `scope` field.\n\nIf the `scope` field contains a single entity ID, you do not need to specify an entity ID.\n\n## Other Supported Authentication Schemes\n\nZuora continues to support the following additional legacy means of authentication:\n\n * Use username and password. Include authentication with each request in the header: \n \n * `apiAccessKeyId` \n * `apiSecretAccessKey`\n \n Zuora recommends that you create an API user specifically for making API calls. See <a href=\"https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users/Create_an_API_User\" target=\"_blank\">Create an API User</a> for more information.\n \n * Use an authorization cookie. The cookie authorizes the user to make calls to the REST API for the duration specified in **Administration > Security Policies > Session timeout**. The cookie expiration time is reset with this duration after every call to the REST API. To obtain a cookie, call the [Connections](https://www.zuora.com/developer/api-reference/#tag/Connections) resource with the following API user information: \n \n * ID \n * Password\n \n * For CORS-enabled APIs only: Include a 'single-use' token in the request header, which re-authenticates the user with each request. See below for more details.\n\n### Entity Id and Entity Name\n\nThe `entityId` and `entityName` parameters are only used for [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity \"Zuora Multi-entity\"). These are the legacy parameters that Zuora will only continue to support for a period of time. Zuora recommends you to use the `Zuora-Entity-Ids` parameter instead.\n\n\nThe `entityId` and `entityName` parameters specify the Id and the [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name \"Introduction to Entity and Entity Hierarchy\") that you want to access, respectively. Note that you must have permission to access the entity. \n\nYou can specify either the `entityId` or `entityName` parameter in the authentication to access and view an entity.\n\n * If both `entityId` and `entityName` are specified in the authentication, an error occurs. \n * If neither `entityId` nor `entityName` is specified in the authentication, you will log in to the entity in which your user account is created. \n \n\nTo get the entity Id and entity name, you can use the GET Entities REST call. For more information, see [API User Authentication](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/A_Overview_of_Multi-entity#API_User_Authentication \"API User Authentication\").\n \n ### Token Authentication for CORS-Enabled APIs\n \n The CORS mechanism enables REST API calls to Zuora to be made directly from your customer's browser, with all credit card and security information transmitted directly to Zuora. This minimizes your PCI compliance burden, allows you to implement advanced validation on your payment forms, and makes your payment forms look just like any other part of your website.\n \nFor security reasons, instead of using cookies, an API request via CORS uses **tokens** for authentication.\n\nThe token method of authentication is only designed for use with requests that must originate from your customer's browser; **it should not be considered a replacement to the existing cookie authentication** mechanism.\n\nSee [Zuora CORS REST](https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/Zuora_CORS_REST \"Zuora CORS REST\") for details on how CORS works and how you can begin to implement customer calls to the Zuora REST APIs. See [HMAC Signatures](https://www.zuora.com/developer/api-reference/#operation/POSTHMACSignature \"HMAC Signatures\") for details on the HMAC method that returns the authentication token.\n\n# Requests and Responses\n\n## Request IDs \nAs a general rule, when asked to supply a \"key\" for an account or subscription (accountKey, account-key, subscriptionKey, subscription-key), you can provide either the actual ID or the number of the entity.\n\n## HTTP Request Body\n\nMost of the parameters and data accompanying your requests will be contained in the body of the HTTP request. \n\nThe Zuora REST API accepts JSON in the HTTP request body. No other data format (e.g., XML) is supported.\n\n### Data Type\n\n([Actions](https://www.zuora.com/developer/api-reference/#tag/Actions) and CRUD operations only) We recommend that you do not specify the decimal values with quotation marks, commas, and spaces. Use characters of `+-0-9.eE`, for example, `5`, `1.9`, `-8.469`, and `7.7e2`. Also, Zuora does not convert currencies for decimal values.\n\n## Testing a Request\n\nUse a third party client, such as [curl](https://curl.haxx.se \"curl\"), [Postman](https://www.getpostman.com \"Postman\"), or [Advanced REST Client](https://advancedrestclient.com \"Advanced REST Client\"), to test the Zuora REST API.\n\nYou can test the Zuora REST API from the Zuora API Sandbox or Production tenants. If connecting to Production, bear in mind that you are working with your live production data, not sample data or test data.\n\n## Testing with Credit Cards\n\nSooner or later it will probably be necessary to test some transactions that involve credit cards. For suggestions on how to handle this, see [Going Live With Your Payment Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/C_Managing_Payment_Gateways/B_Going_Live_Payment_Gateways#Testing_with_Credit_Cards \"C_Zuora_User_Guides/A_Billing_and_Payments/M_Payment_Gateways/C_Managing_Payment_Gateways/B_Going_Live_Payment_Gateways#Testing_with_Credit_Cards\"\n).\n\n## Concurrent Request Limits\n\nZuora enforces tenant-level concurrent request limits. See <a href=\"https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits\" target=\"_blank\">Concurrent Request Limits</a> for more information.\n\n## Timeout Limit\n\nIf a request does not complete within 120 seconds, the request times out and Zuora returns a Gateway Timeout error.\n\n## Error Handling\n\nResponses and error codes are detailed in [Responses and errors](https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/Responses_and_Errors \"Responses and errors\").\n\n# Pagination\n\nWhen retrieving information (using GET methods), the optional `pageSize` query parameter sets the maximum number of rows to return in a response. The maximum is `40`; larger values are treated as `40`. If this value is empty or invalid, `pageSize` typically defaults to `10`.\n\nThe default value for the maximum number of rows retrieved can be overridden at the method level.\n\nIf more rows are available, the response will include a `nextPage` element, which contains a URL for requesting the next page. If this value is not provided, no more rows are available. No \"previous page\" element is explicitly provided; to support backward paging, use the previous call.\n\n## Array Size\n\nFor data items that are not paginated, the REST API supports arrays of up to 300 rows. Thus, for instance, repeated pagination can retrieve thousands of customer accounts, but within any account an array of no more than 300 rate plans is returned.\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. Currently, Zuora only supports the **v1** major version. 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 serial. This section documents the changes made to each Zuora REST API minor version.\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](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription \"Create Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription \"Update Subscription\"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription \"Renew Subscription\"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription \"Cancel Subscription\"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription \"Suspend Subscription\"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription \"Resume Subscription\"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account \"Create Account\")|Generates an invoice and collects a payment for a subscription. |\n| collect | 196.0 and later | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription \"Create Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription \"Update Subscription\"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription \"Renew Subscription\"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription \"Cancel Subscription\"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription \"Suspend Subscription\"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription \"Resume Subscription\"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account \"Create Account\")|Collects an automatic payment for a subscription. |\n| invoice | 196.0 and 207.0| [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription \"Create Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription \"Update Subscription\"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription \"Renew Subscription\"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription \"Cancel Subscription\"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription \"Suspend Subscription\"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription \"Resume Subscription\"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account \"Create Account\")|Generates an invoice for a subscription. |\n| invoiceTargetDate | 196.0 and earlier | [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\") |Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| invoiceTargetDate | 207.0 and earlier | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription \"Create Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription \"Update Subscription\"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription \"Renew Subscription\"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription \"Cancel Subscription\"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription \"Suspend Subscription\"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription \"Resume Subscription\"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/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](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\") |Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| targetDate | 211.0 and later | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription \"Create Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription \"Update Subscription\"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription \"Renew Subscription\"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription \"Cancel Subscription\"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription \"Suspend Subscription\"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription \"Resume Subscription\"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account \"Create Account\")|Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |\n| includeExisting DraftInvoiceItems | 196.0 and earlier| [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/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](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/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 | 196.0 and earlier| [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/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](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/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](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription \"Create Subscription\"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription \"Update Subscription\"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription \"Renew Subscription\"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription \"Cancel Subscription\"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription \"Suspend Subscription\"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription \"Resume Subscription\"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/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](https://www.zuora.com/developer/api-reference/#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](https://www.zuora.com/developer/api-reference/#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](https://www.zuora.com/developer/api-reference/#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](https://www.zuora.com/developer/api-reference/#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](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\") | Amount of the memo item. |\n| amount | 224.0 and later | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc \"Create credit memo from charge\"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc \"Create debit memo from charge\") | Amount of the memo item. |\n| subscriptionNumbers | 222.4 and earlier | [Create order](https://www.zuora.com/developer/api-reference/#operation/POST_Order \"Create order\") | Container for the subscription numbers of the subscriptions in an order. |\n| subscriptions | 223.0 and later | [Create order](https://www.zuora.com/developer/api-reference/#operation/POST_Order \"Create order\") | Container for the subscription numbers and statuses in an order. |\n\n\n#### Version 207.0 and Later\n\nThe response structure of the [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview \"Preview Subscription\") and [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/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# Zuora Object Model\n\nThe following diagram presents a high-level view of the key Zuora objects. Click the image to open it in a new tab to resize it.\n\n<a href=\"https://www.zuora.com/wp-content/uploads/2017/01/ZuoraERD.jpeg\" target=\"_blank\"><img src=\"https://www.zuora.com/wp-content/uploads/2017/01/ZuoraERD.jpeg\" alt=\"Zuora Object Model Diagram\"></a>\n\nSee the following articles for information about other parts of the Zuora business object model:\n\n * <a href=\"https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/D_Invoice_Settlement_Object_Model\" target=\"_blank\">Invoice Settlement Object Model</a>\n * <a href=\"https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/BA_Orders_Object_Model\" target=\"_blank\">Orders Object Model</a>\n\nYou can use the [Describe object](https://www.zuora.com/developer/api-reference/#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 | <p>`BillingRun`</p><p>**Note:** The API name of this object is `BillingRun` in the [Describe object](https://www.zuora.com/developer/api-reference/#operation/GET_Describe) operation and Export ZOQL queries only. Otherwise, the API name of this object is `BillRun`.</p> |\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| 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| Journal Entry | `JournalEntry` |\n| Journal Entry Item | `JournalEntryItem` |\n| Journal Run | `JournalRun` |\n| Order | `Order` |\n| Order Action | `OrderAction` |\n| Order ELP | `OrderElp` |\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| Processed Usage | `ProcessedUsage` |\n| Product | `Product` |\n| Product Feature | `ProductFeature` |\n| Product Rate Plan | `ProductRatePlan` |\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","title":"Zuora API Reference","version":"2019-01-22","x-apisguru-categories":["financial"],"x-logo":{"url":"https://www.zuora.com/wp-content/uploads/2016/10/zuora-dev-logo-api-ref.svg"},"x-origin":[{"format":"swagger","url":"https://www.zuora.com/wp-content/themes/zuora/yaml/swagger.yaml?v-7.0","version":"2.0"}],"x-providerName":"zuora.com"},"tags":[{"description":"Actions are operations that are batch in nature. For example, the \"create\", \"update\", \"delete\", and other operations allow changes to up-to 50 objects at a time. The \"query\" operation will return up-to 2000 result records back at a time, before requiring additional pages of data to be returned via a subsequent \"queryMore\" operation.\n\nThe default WSDL version for Actions is 79. If you want to change the WSDL version, set the `X-Zuora-WSDL-Version` field in the request header for the request call.\n\n**Note**: Actions do not support the Invoice Settlement feature. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement.\n","name":"Actions"},{"description":"","name":"Accounting Codes"},{"description":"","name":"Accounting Periods"},{"description":"Some operations in this section are similar to each other, but are provided for different use scenarios. You should choose the one that best suits your needs.\n\nFor example, the [Create account](https://www.zuora.com/developer/api-reference/#operation/POST_Account) operation is used to create an account with a credit card payment method, a bill-to contact, and optionally an sold-to contact or an associated subscription. If you want to create an account without creating any associated objects such as subscriptions, use [CRUD: Create Account](https://www.zuora.com/developer/api-reference/#operation/Object_POSTAccount) instead.\n\nIf you want to create an account and the associated subscription at the same time without providing credit card information, use the [Subscribe](https://www.zuora.com/developer/api-reference/#operation/Action_POSTsubscribe) action.\n","name":"Accounts"},{"description":"If you do not have the Orders feature enabled, you can use amendments to modify subscriptions. To make changes to a subscription, use [Update subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription) (recommended) or [Amend](https://www.zuora.com/developer/api-reference/#operation/Action_POSTamend).\n\nIf you have the Orders feature enabled, you cannot use amendments to modify subscriptions. To make changes to subscriptions, use [Create order](https://www.zuora.com/developer/api-reference/#operation/POST_Order).\n","name":"Amendments"},{"description":"","name":"Attachments"},{"description":"Use the Bill Run call to create ad hoc bill runs and Post, Cancel, Query, and Delete bill runs.\n","name":"Bill Run"},{"description":"","name":"Billing Documents"},{"description":"","name":"Billing Preview Run"},{"description":"","name":"Catalog"},{"description":"","name":"Charge Revenue Summaries"},{"description":"","name":"Communication Profiles"},{"description":"","name":"Connections"},{"description":"","name":"Contacts"},{"description":"","name":"Credit Balance Adjustments"},{"description":"","name":"Credit Memos"},{"description":"","name":"Custom Exchange Rates"},{"description":"","name":"Debit Memos"},{"description":"","name":"Describe"},{"description":"","name":"Document Properties"},{"description":"","name":"Entities"},{"description":"","name":"Entity Connections"},{"description":"","name":"Event Triggers"},{"description":"","name":"Exports"},{"description":"","name":"Features"},{"description":"","name":"Get Files"},{"description":"","name":"HMAC Signatures"},{"description":"","name":"Hosted Pages"},{"description":"","name":"Imports"},{"description":"","name":"Invoice Adjustments"},{"description":"","name":"Invoice Item Adjustments"},{"description":"","name":"Invoice Items"},{"description":"","name":"Invoice Payments"},{"description":"","name":"Invoice Split Items"},{"description":"","name":"Invoice Splits"},{"description":"","name":"Invoices"},{"description":"","name":"Journal Runs"},{"description":"","name":"Mass Updater"},{"description":"","name":"Notifications"},{"description":"","name":"OAuth"},{"description":"","name":"Operations"},{"description":"","name":"Orders"},{"description":"","name":"Payment Gateways"},{"description":"","name":"Payment Method Snapshots"},{"description":"","name":"Payment Method Transaction Logs"},{"description":"","name":"Payment Methods"},{"description":"","name":"Payment Runs"},{"description":"","name":"Payment Transaction Logs"},{"description":"","name":"Payments"},{"description":"","name":"Product Features"},{"description":"To manage product rate plan charge tiers, use the [Product Rate Plan Charges](https://www.zuora.com/developer/api-reference/#tag/Product-Rate-Plan-Charges) operations instead to update the corresponding product rate plan charge with all the tiers.\n","name":"Product Rate Plan Charge Tiers"},{"description":"","name":"Product Rate Plan Charges"},{"description":"","name":"Product Rate Plans"},{"description":"","name":"Products"},{"description":"","name":"Quotes Document"},{"description":"","name":"Rate Plan Charge Tiers"},{"description":"","name":"Rate Plan Charges"},{"description":"","name":"Rate Plans"},{"description":"","name":"Refund Invoice Payments"},{"description":"","name":"Refund Transaction Logs"},{"description":"","name":"Refunds"},{"description":"","name":"Revenue Events"},{"description":"","name":"Revenue Items"},{"description":"","name":"Revenue Rules"},{"description":"","name":"Revenue Schedules"},{"description":"","name":"RSA Signatures"},{"description":"","name":"Settings"},{"description":"**Note:** The Entitlements settings must be enabled to use this operation. Access to the Entitlements feature requires a specific edition of Zuora. See [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for details. \n","name":"Subscription Product Features"},{"description":"","name":"Subscriptions"},{"description":"","name":"Summary Journal Entries"},{"description":"","name":"Taxation Items"},{"description":"","name":"Transactions"},{"description":"","name":"Unit Of Measure"},{"description":"**Note:** You cannot use the Usage operations with the [Usage (with Active Rating)](https://www.zuora.com/developer/active-rating-api/#tag/Usage-(with-Active-Rating)) operations. \n","name":"Usage"},{"description":"","name":"Users"}],"paths":{"/async-jobs/{jobId}":{"get":{"description":"**Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. This operation is in **Limited Availability**.\n\n\nGet the status and response of an asynchronous job. Currently, an asynchronous job created by \"Create order asynchronously\" or \"Preview order asynchronously\" is supported.\n","operationId":"GET_JobStatusAndResponse","parameters":[{"description":"UUID of the asynchronous job created by an asynchronous API operation.","in":"path","name":"jobId","required":true,"schema":{"type":"string","format":"UUID"}}],"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"properties":{"errors":{"description":"Error messages returned if the job failed.","type":"string"},"result":{"$ref":"#/components/schemas/JobResult"},"status":{"description":"Type of job status.","enum":["Processing","Failed","Completed"],"type":"string"},"success":{"description":"Indicates whether the operation call succeeded.","type":"boolean"}},"type":"object"}},"application/json":{"examples":{"response":{"value":{"result":{"accountNumber":"A00000001","invoiceNumbers":["INV00000001"],"orderNumber":"OM-00002","paidAmount":300,"paymentNumber":"P-00000002","status":"Pending","subscriptions":[{"status":"Pending Activation","subscriptionNumber":"SM-00001"},{"status":"Pending Acceptance","subscriptionNumber":"SM-00002"},{"status":"Active","subscriptionNumber":"SM-00003"},{"status":"Pending Acceptance","subscriptionNumber":"SM-00004"}],"success":true},"status":"Completed","success":true}}}}}}},"summary":"Get job status and response","tags":["Orders"],"x-code-samples":[{"lang":"Curl","source":"curl -X GET -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" \"https://rest.zuora.com/async-jobs/{jobId}\""},{"lang":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://rest.zuora.com/async-jobs/{jobId}');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders(array(\n 'content-type' => 'application/json',\n 'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'\n));\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"},{"lang":"Java","source":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequest request = new Request.Builder()\n .url(\"https://rest.zuora.com/async-jobs/{jobId}\")\n .get()\n .addHeader(\"Authorization\", \"Bearer 6d151216ef504f65b8ff6e9e9e8356d3\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"cache-control\", \"no-cache\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"lang":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"https://rest.zuora.com/\")\n\nheaders = {\n 'Authorization': \"Bearer 6d151216ef504f65b8ff6e9e9e8356d3\"\n }\n\nconn.request(\"GET\", \"/async-jobs/{jobId}\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Ruby","source":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://rest.zuora.com/async-jobs/{jobId}\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"C#","source":"var client = new RestClient(\"https://rest.zuora.com/async-jobs/{jobId}\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"Authorization\", \"Bearer 6d151216ef504f65b8ff6e9e9e8356d3\");\nIRestResponse response = client.Execute(request);"}]}},"/async/orders":{"post":{"description":"**Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. This operation is in **Limited Availability**.\n\n\nIn the case where a normal \"Create order\" operation call will time out, use this operation instead to create an order asynchronously. A job will be creating the order in the back end; the job ID will be returned for tracking the job status and result. \n","operationId":"POST_CreateOrderAsynchronously","parameters":[{"$ref":"#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"},{"description":"\nThe minor version of the Zuora REST API. \n\nYou need to set this parameter if you use the following fields:\n* subscriptions\n* subscriptionNumbers\n","in":"header","name":"zuora-version","required":false,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/POSTOrderReq