swagger: '2.0'
info:
version: '2023-12-15'
title: API Reference Accounting Codes Usage 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: Usage description: "Consumption of a billable service or resource (such as database storage space or bundles of emails sent) provides the basis for some charge models - simple usage, tiered pricing, or volume pricing. \nTo make this work, usage must be tracked in the system and usage charges must be calculated and invoiced. \nUsage is always billed in arrears - for example, you might bill customers in February for their January usage. Usage can be billed on a recurring monthly, quarterly, semi-annual, or annual basis.\n\nFor more information about working with usage data, see Usage.\n" paths: /v1/usage: post: summary: Upload a usage file operationId: POST_Usage description: "This REST API reference describes how to post or import usage data for one or more accounts in the CSV format. There are no path or query parameters. The data is uploaded using the HTTP multipart/form-data POST method and applied to the user's tenant. \n\n### How this REST API Call Works\nThe content of the uploaded usage file must follow the format used by the UI import tool. It must be a comma-separated (CSV) file with a corresponding .csv extension. The length of the file name must not exceed 50 characters. The file size must not exceed 4MB. See [Downloading the Usage Template](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/Usage/C_Import_Usage_Data#Downloading_the_Usage_Template) to learn about how to download the usage file template.\n\nAt the completion of the upload, before the file contents are actually being processed, the API returns a response containing the byte count of the received file and a URL for checking the status of the import process. Of the five possible results displayed at that URL (Pending, Processing, Completed, Canceled, and Failed) only a Completed status indicates that the import was successful. The operation is atomic; if any record fails, the file is rejected. In that case, the entire import is rolled back and all stored data is returned to its original state.\n\nTo view the actual import status, enter the resulting status URL from the checkImportStatus response using a tool such as POSTMAN. This additional step provides more information about why the import has failed.\n\nTo manage the information after a successful upload, use the web-based UI.\n\n### Usage File Format\nThe usage file uses the following headings: \n\n| Heading | Description | Required |\n|-----------------|--------|----------|\n| ACCOUNT_ID | Enter the account number, e.g., the default account number, such as A00000001, or your custom account number. Although this field is labeled as Account_Id, it is not the actual Account ID nor Account Name. | Yes |\n| UOM | Enter the unit of measure. This must match the UOM for the usage. | Yes |\n| QTY | Enter the quantity. | Yes |\n| STARTDATE | Enter the start date of the usage. This date determines the invoice item service period the associated usage is billed to. Date format is based on locale of the current user. Default date format: `MM/DD/YYYY`. | Yes |\n| ENDDATE | Enter the end date of the usage. This is not used in calculations for usage billing and is optional. Date format is based on locale of the current user. Default date format: `MM/DD/YYYY`.
**Note:** The value of this column is optional, but the column header is required.
| No |\n| SUBSCRIPTION_ID | Enter the subscription number or subscription name. If you created the subscription in the Zuora application, Zuora created a number automatically in a format similar to A-S00000001. If you do not provide a value for this field, the associated usage will be added to all subscriptions for the specified Account that use this Unit Of Measure. If your Accounts can have multiple subscriptions and you do not want double or triple counting of usage, you must specify the Subscription or Charge ID in each usage record.**Note:** The value of this column is optional, but the column header is required.
| No |\n| CHARGE_ID | Enter the charge number (not the charge name). You can see the charge ID, e.g., C-00000001, when you add your rate plan to your subscription and view your individual charges. If your Accounts can have multiple subscriptions and you do not want double or triple counting of usage, you must specify the specific Subscription or Charge ID in each usage record. This field is related to the Charge Number on the subscription rate plan.**Note:** The value of this column is optional, but the column header is required.
| No |\n| DESCRIPTION | Enter a description for the charge. | No |\n| UNIQUE_KEY | Enter a specific identifier for this usage record. **Note**: This Heading is supported by the following Advanced Consumption Billing features: Prepaid with Drawdown, and Unbilled Usage. See Upload usage record with unique key for more information. | No |\n" consumes: - multipart/form-data tags: - Usage 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: file in: formData required: true type: file description: 'The usage data to import. The supported formats are excel, csv, and zip. ' 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 size: 316 checkImportStatus: /v1/usage/2c92c8f83dcbd8b1013dcce1159900cc/status description: '' schema: $ref: '#/definitions/POSTUsageResponseType' x-code-samples: - lang: curl label: Curl source: 'curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@UsageData.csv" "https://rest.zuora.com/v1/usage" ' /v1/usage/accounts/{account-key}: get: summary: Retrieve a usage record operationId: GET_Usage description: 'This REST API reference describes how to retrieve usage details for an account. Usage data is returned in reverse chronological order. ' tags: - Usage 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: Account number or account ID. required: true type: string 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: usage: - id: 8ad098f08659582c01865cd2a40057a5 accountId: 8ad096ca865969c801865ccbfcb77adf accountNumber: A00000113 accountName: Song subscriptionNumber: A-S00000224 chargeNumber: null unitOfMeasure: Ads quantity: 100 submissionDateTime: '2023-02-16 16:42:32' startDateTime: '2023-01-15 00:00:00' status: Pending sourceName: Import state__c: null City__c: null ClockTiime__c: null CheckType__c: null Timeofday__c: null totalAmount__c: null timeOfUse__c: Off-Peak Size__c: null network__c: null Colour__c: null Meter__c: null rate__c: null fileName: UsageFileFormat-178.csv uniqueKey: '123' success: true description: '' schema: $ref: '#/definitions/GETUsageWrapper' /v1/invoices/invoice-item/{invoice-item-id}/usage-rate-detail: get: summary: Retrieve usage rate detail for an invoice item operationId: GET_Usage_Rate_Detail_By_Invoice_Item description: "Use this REST API operation to retrieve the usage rate detail for an invoice item to understand how the total amount is calculated. The information is the same as the Rate Detail presented on [PDF invoices](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/IA_Invoices/Create_a_custom_invoice_template/DD_Display_Usage_Charge_Breakdown#How_UsageSummary.RateDetail_is_displayed_on_invoices). \n\n**Notes and limitations:**\n- Do not support the Overage Charge Model, Tiered with Overage Charge Model, and Multi-attribute Pricing Charge Model.\n- Do not support invoices in `Cancelled` or `Reversed` status.\n- Do not support Active rating.\n- In terms of rating group options, only the [Usage rating by billing period](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Rating/Usage_Rating_by_Group#Usage_rating_by_billing_period) is supported.\n- Do not support [On-demand usage rating](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Rating/On-demand_Usage_Rating). \n- Tax calculation is not involved.\n" tags: - Usage 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: invoice-item-id in: path description: Invoice item ID. For example, `402880e57f725d85017f7267c4ad002b`. Available through Data Source export. required: true type: string 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 data: invoiceId: 402880e57f725d85017f7267c44c0028 invoiceItemId: 402880e57f725d85017f7267c4ad002b invoiceNumber: INV00000007 chargeNumber: C-00000001 servicePeriod: 03/01/2022-03/31/2022 uom: Each quantity: 45.0 amountWithoutTax: 58.0 listPrice: 'Tier / From / To / List Price / Price Format 1 / 0 / 9 / 0.00 / Per Unit 2 / 10 / 20 / 1.00 / Per Unit 3 / 21 / 30 / 2.00 / Flat Fee 4 / 31 / / 3.00 / Per Unit ' rateDetail: 'Tier 1: 0-9, 9 Each(s) x $0.00/Each = $0.00 Tier 2: 10-20, 11 Each(s) x $1.00/Each = $11.00 Tier 3: 21-30, $2.00 Flat Fee Tier 4: >=31, 15 Each(s) x $3.00/Each = $45.00 Total = $58.00' description: '' schema: $ref: '#/definitions/GETUsageRateDetailWrapper' /v1/object/usage: post: summary: 'CRUD: Create a usage record' operationId: Object_POSTUsage description: '' tags: - Usage 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_REQUEST_rejectUnknownFields' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id' - $ref: '#/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version' - name: CreateRequest in: body description: '' required: true schema: $ref: '#/definitions/ProxyCreateUsage' responses: '200': examples: application/json: Success: true Id: 2c93808457d787030157e02e0a301d0a description: '' 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. ' schema: $ref: '#/definitions/ProxyCreateOrModifyResponse' '400': examples: application/json: Errors: - Code: INVALID_VALUE Message: The account number 123xProxy is invalid. Success: false description: '' 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. ' schema: $ref: '#/definitions/ProxyBadRequestResponse' '401': examples: application/json: message: Authentication error description: '' 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. ' WWW-Authenticate: type: string enum: - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API description: 'The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ``` ' schema: $ref: '#/definitions/ProxyUnauthorizedResponse' /v1/object/usage/{id}: get: summary: 'CRUD: Retrieve a usage record' operationId: Object_GETUsage description: '' tags: - Usage 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_Entity_Ids_Single' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id' - name: fields in: query required: false type: string description: Object fields to return - name: id in: path description: Object id required: true type: string responses: '200': examples: application/json: AccountNumber: A00000030 Id: 2c92c0f86bf50ca0016c040309316ca4 ChargeNumber: C-00000229 StartDateTime: '2017-12-01T23:41:36.000+08:00' SubscriptionId: 2c92c0f956bc8fcb0156d5039e0a5aa0 ChargeId: 2c92c0f956bc8fcb0156d5039e275aa9 AccountId: 2c92c0f956bc8fb40156d502fc3718b1 Quantity: 9 Description: test SubscriptionNumber: A-S00000100 CreatedById: 2c92c0f958fffd7d015914aeefc71a5d CreatedDate: '2019-07-18T15:36:43.000+08:00' RbeStatus: Pending SubmissionDateTime: '2019-07-18T15:36:43.000+08:00' SourceType: API UOM: Each UpdatedDate: '2019-07-18T15:36:43.000+08:00' UpdatedById: 2c92c0f958fffd7d015914aeefc71a5d description: '' 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. ' schema: $ref: '#/definitions/ProxyGetUsage' '401': examples: application/json: message: Authentication error description: '' 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. ' WWW-Authenticate: type: string enum: - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API description: 'The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ``` ' schema: $ref: '#/definitions/ProxyUnauthorizedResponse' '404': examples: application/json: records: {} size: 0 done: true description: '' 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. ' schema: $ref: '#/definitions/ProxyNoDataResponse' put: summary: 'CRUD: Update a usage record' operationId: Object_PUTUsage description: '' tags: - Usage parameters: - $ref: '#/parameters/GLOBAL_HEADER_Accept_Encoding' - $ref: '#/parameters/GLOBAL_HEADER_Content_Encoding' - $ref: '#/parameters/GLOBAL_HEADER_Authorization_OAuth_optional' - $ref: '#/parameters/GLOBAL_REQUEST_rejectUnknownFields' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id' - name: id in: path description: Object id required: true type: string - name: ModifyRequest in: body description: '' required: true schema: $ref: '#/definitions/ProxyModifyUsage' responses: '200': description: '' 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. ' schema: $ref: '#/definitions/ProxyCreateOrModifyResponse' '401': examples: application/json: message: Authentication error description: '' 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. ' WWW-Authenticate: type: string enum: - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API description: 'The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ``` ' schema: $ref: '#/definitions/ProxyUnauthorizedResponse' delete: summary: 'CRUD: Delete a usage record' operationId: Object_DELETEUsage description: '' tags: - Usage 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_Entity_Ids_Single' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Org_Ids' - $ref: '#/parameters/GLOBAL_HEADER_Zuora_Track_Id' - name: id in: path description: Object id required: true type: string responses: '200': description: '' 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. ' schema: $ref: '#/definitions/ProxyDeleteResponse' '401': examples: application/json: message: Authentication error description: '' 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. ' WWW-Authenticate: type: string enum: - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API description: 'The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ``` ' schema: $ref: '#/definitions/ProxyUnauthorizedResponse' definitions: ProxyDeleteResponse: properties: id: description: '' type: string success: description: '' type: boolean type: object UsageObjectCustomFields: additionalProperties: description: 'Custom fields of the Usage 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 Usage object.
'
title: usageFieldsCustom
type: object
ProxyGetUsage:
allOf:
- properties:
AccountId:
description: ' The ID of the account associated with the usage data. This field is required if no value is specified for the `AccountNumber` field.
**Character limit**: 32 **Values**: a valid account ID '
type: string
AccountNumber:
description: ' The number of the account associated with the usage data. This field is required if no value is specified for the `AccountId` field.
**Character limit**: 50 **Values**: a valid account number '
type: string
ChargeId:
description: ' The OrginalId of the rate plan charge related to the usage record, e.g., `2c9081a03c63c94c013c6873357a0117` **Character limit**: 32 **Values**: a valid rate plan charge OriginalID '
type: string
CreatedById:
description: ' The user ID of the person who uploaded the usage records.
**Character limit**: 32 **Values**: automatically generated '
type: string
CreatedDate:
description: ' The date when the usage was generated.
**Character limit**: 29 **Values**: automatically generated '
format: date-time
type: string
Description:
description: 'A description of the usage record.
'
type: string
EndDateTime:
description: ' The end date and time of a range of time when usage is tracked. Use this field for reporting; this field doesn''t affect usage calculation.
**Character limit**: 29 **Values**: a valid date and time value '
format: date-time
type: string
Id:
description: Object identifier.
type: string
Quantity:
description: ' Indicates the number of units used.
**Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 '
format: double
type: number
RbeStatus:
description: ' Indicates if the rating and billing engine (RBE) processed usage data for an invoice.
**Character limit**: 9 **Values**: automatically generated to be one of the following values: `Importing`, `Pending`, `Processed` '
type: string
SourceType:
description: ' Indicates if the usage records were imported from the web-based UI or the API.
**Character limit**: 6 **Values**: automatically generated to be one of the following values: `API`, `Import` '
type: string
StartDateTime:
description: ' The start date and time of a range of time when usage is tracked. Zuora uses this field value to determine the usage date. Unlike the `EndDateTime`, the `StartDateTime` field does affect usage calculation.
**Character limit**: 29 **Values**: a valid date and time value '
format: date-time
type: string
SubscriptionId:
description: ' The original ID of the subscription that contains the fees related to the usage data.
**Character limit**: 32 **Values**: a valid subscription ID '
type: string
SubscriptionNumber:
description: 'The unique identifier number of the subscription that contains the fees related to the usage data.
'
type: string
UOM:
description: ' Specifies the units to measure usage. Units of measure are configured in the web-based UI. Your values depend on your configuration in **Billing Settings**.
**Character limit**: **Values**: a valid unit of measure '
type: string
UpdatedById:
description: ' The ID of the user who last updated the usage upload.
**Character limit**: 32 **Values**: automatically generated '
type: string
UpdatedDate:
description: ' The date when the usage upload was last updated.
**Character limit**: 29 **Values**: automatically generated '
format: date-time
type: string
type: object
- $ref: '#/definitions/UsageObjectCustomFields'
ProxyUnauthorizedResponse:
properties:
message:
description: 'Error message.
If the error message is "Authentication error", ensure that the `Authorization` request header contains valid authentication credentials, then retry the request. See [Authentication](/rest-api/general-concepts/authentication/) for more information.
If the error message is "Failed to get user info", retry the request.
'
type: string
type: object
GETUsageRateDetailWrapper:
properties:
data:
description: 'Contains usage rate details for the invoice item as specified in the request.
'
properties:
amountWithoutTax:
description: 'The amount of the invoice item without tax.
'
format: double
type: number
chargeNumber:
description: 'The unique number of the product rate plan charge associated with the invoice item.
'
type: string
invoiceId:
description: 'The unique ID of the invoice.
'
type: string
invoiceItemId:
description: 'The unique ID of the invoice item.
'
type: string
invoiceNumber:
description: 'The unique number of the invoice.
'
type: string
listPrice:
description: "The list price of the product rate plan charge associated with the invoice item. For example, if the product rate plan charge uses the tiered charge model, its list price could be: \n\nTier / From / To / List Price / Price Format\\n1 / 0 / 9 / 0.00 / Per Unit\\n2 / 10 / 20 / 1.00 / Per Unit\\n3 / 21 / 30 / 2.00 / Flat Fee\\n4 / 31 / / 3.00 / Per Unit\\n\n"
type: string
quantity:
description: 'The quantity of the invoice item.
'
type: string
rateDetail:
description: "The rate detail of the invoice item. It shows how the total amount is calculated. For example, if the product rate plan charge uses the tiered charge model, the rate detail for the associated invoice item could be: \n\nTier 1: 0-9, 9 Each(s) x $0.00/Each = $0.00\\nTier 2: 10-20, 11 Each(s) x $1.00/Each = $11.00\\nTier 3: 21-30, $2.00 Flat Fee\\nTier 4: >=31, 15 Each(s) x $3.00/Each = $45.00\\nTotal = $58.00. \n\nThe rate detail retrieved from this REST API operation is the same as the [Rate Detail presented on PDF invoices](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/IA_Invoices/Create_a_custom_invoice_template/DD_Display_Usage_Charge_Breakdown#How_UsageSummary.RateDetail_is_displayed_on_invoices). \n"
type: string
servicePeriod:
description: 'The service period of the invoice item.
'
type: string
uom:
description: 'The unit of measurement of the invoice item.
'
type: string
type: object
success:
description: "Returns `true` if the request was processed successfully. \n\n\nReturns `false` if the request was not processed successfully. \n"
type: boolean
type: object
GETUsageWrapper:
properties:
nextPage:
description: 'URL to retrieve the next page of the response if it exists; otherwise absent.
'
format: URL
type: string
success:
description: 'Returns `true` if the request was processed successfully.
'
type: boolean
usage:
description: 'Contains one or more usage items.
'
items:
$ref: '#/definitions/GETUsageType'
type: array
type: object
ProxyNoDataResponse:
properties:
done:
description: ''
type: boolean
records:
description: ''
items:
type: object
type: array
size:
description: ''
type: integer
type: object
GETUsageType:
allOf:
- properties:
accountId:
description: 'Customer account ID.
'
type: string
accountName:
description: 'Customer account name.
'
type: string
accountNumber:
description: 'Customer account number.
'
type: string
chargeNumber:
description: 'Number of the rate-plan charge that pays for this usage.
'
type: string
fileName:
description: 'The name of the import file when the usage record is imported from the file.
'
type: string
id:
description: 'Unique ID for the usage item.
'
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
quantity:
description: 'Number of units used.
'
format: decimal
type: string
sourceName:
description: 'Source of the usage data. Possible values are: `Import`, `API`.
'
type: string
startDateTime:
description: 'Start date of the time period in which usage is tracked. Zuora uses this field value to determine the usage date.
'
format: date-time
type: string
status:
description: 'Possible values are: `Importing`, `Pending`, `Processed`.
'
type: string
submissionDateTime:
description: 'Date when usage was submitted.
'
format: date-time
type: string
subscriptionNumber:
description: 'Number of the subscription covering this usage.
'
type: string
uniqueKey:
description: 'a customer-defined specific identifier of a usage record.
**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. See [Upload usage record with unique key](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Prepaid_balance_transactions#Upload_usage_record_with_unique_key) for more information.
'
type: string
unitOfMeasure:
description: 'Unit used to measure consumption.
'
type: string
type: object
- $ref: '#/definitions/UsageObjectCustomFields'
title: usage
ProxyModifyUsage:
allOf:
- properties:
EndDateTime:
description: ' The end date and time of a range of time when usage is tracked. Use this field for reporting; this field doesn''t affect usage calculation.
**Character limit**: 29 **Values**: a valid date and time value '
format: date-time
type: string
Quantity:
description: ' Indicates the number of units used.
**Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 '
format: double
type: number
RbeStatus:
description: ' Indicates if the rating and billing engine (RBE) processed usage data for an invoice.
**Character limit**: 9 **Values**: automatically generated to be one of the following values: `Importing`, `Pending`, `Processed` '
type: string
StartDateTime:
description: ' The start date and time of a range of time when usage is tracked. Zuora uses this field value to determine the usage date. Unlike the `EndDateTime`, the `StartDateTime` field does affect usage calculation.
**Character limit**: 29 **Values**: a valid date and time value '
format: date-time
type: string
UOM:
description: ' Specifies the units to measure usage. Units of measure are configured in the web-based UI. Your values depend on your configuration in **Billing Settings**.
**Character limit**: **Values**: a valid unit of measure '
type: string
type: object
- $ref: '#/definitions/UsageObjectCustomFields'
ProxyCreateUsage:
allOf:
- properties:
AccountId:
description: ' The ID of the account associated with the usage data. This field is only required if no value is specified for the `AccountNumber` field.
**Character limit**: 32 **Values**: a valid account ID. '
type: string
AccountNumber:
description: ' The number of the account associated with the usage data. This field is only required if no value is specified for the `AccountId` field.
**Character limit**: 50 **Values**: a valid account number. '
type: string
ChargeId:
description: ' The OrginalId of the rate plan charge related to the usage record, e.g., `2c9081a03c63c94c013c6873357a0117` **Character limit**: 32 **Values**: a valid rate plan charge OriginalID. '
type: string
ChargeNumber:
description: 'A unique number for the rate plan charge related to the usage record. For example, C-00000007.
'
maxLength: 50
type: string
Description:
description: 'A description of the usage record.
'
maxLength: 200
type: string
EndDateTime:
description: ' The end date and time of a range of time when usage is tracked. Use this field for reporting; this field doesn''t affect usage calculation.
**Character limit**: 29 **Values**: a valid date and time value. '
format: date-time
type: string
Quantity:
description: ' Indicates the number of units used.
**Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 '
format: double
type: number
StartDateTime:
description: ' The start date and time of a range of time when usage is tracked. Zuora uses this field value to determine the usage date. Unlike the `EndDateTime`, the `StartDateTime` field does affect usage calculation.
**Character limit**: 29 **Values**: a valid date and time value '
format: date-time
type: string
SubscriptionId:
description: "The original ID of the subscription that contains the fees related to the usage data. \n\nThe ID of a subscription might change when you create amendments to the subscription. It is good practice to use the unique subscription number that you can specify in the `SubscriptionNumber` field.\n"
maxLength: 32
type: string
SubscriptionNumber:
description: 'The unique identifier number of the subscription that contains the fees related to the usage data.
It is good practice to use this field when creating usage records.
'
maxLength: 100
type: string
UOM:
description: ' Specifies the units to measure usage. Units of measure are configured in the web-based UI. Your values depend on your configuration in **Billing Settings**.
**Character limit**: **Values**: a valid unit of measure '
type: string
UniqueKey:
description: 'The unique external reference of the usage record. See [Upload usage record with unique key](https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Bill_for_usage_or_prepaid_products/Advanced_Consumption_Billing/Unbilled_Usage#Upload_usage_record_with_unique_key) for information on how to use this field. **Note**: This field is only available if you set the `X-Zuora-WSDL-Version` request header to `114` or later.
'
type: string
required:
- Quantity
- StartDateTime
- UOM
type: object
- $ref: '#/definitions/UsageObjectCustomFields'
example:
AccountId: 2c92c0f956bc8fb40156d502fc3718b1
ChargeNumber: C-00000229
Description: test
Quantity: 9
StartDateTime: '2017-12-01T16:41:36.000+01:00'
SubscriptionNumber: A-S00000100
UOM: Each
UniqueKey: Test001
ProxyCreateOrModifyResponse:
properties:
Id:
description: ''
type: string
Success:
description: ''
type: boolean
type: object
POSTUsageResponseType:
properties:
checkImportStatus:
description: 'The path for checking the status of the import.
The possible status values at this path are `Pending`, `Processing`, `Completed`, `Canceled`, and `Failed`. Only `Completed` indicates that the file contents were imported successfully.
'
type: string
size:
description: 'The size of the uploaded file in bytes.
'
format: int64
type: integer
success:
description: 'Indicates whether the call succeeded.
'
type: boolean
type: object
ProxyBadRequestResponse:
properties:
Errors:
items:
properties:
Code:
description: ''
type: string
Message:
description: ''
type: string
type: object
type: array
Success:
description: ''
type: boolean
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_X_Zuora_WSDL_Version:
name: X-Zuora-WSDL-Version
in: header
required: false
type: string
default: 79
description: 'Zuora WSDL version number.
'
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_REQUEST_rejectUnknownFields:
name: rejectUnknownFields
in: query
required: false
type: boolean
default: false
description: "Specifies whether the call fails if the request body contains unknown fields.\nWith `rejectUnknownFields` set to `true`, Zuora returns a 400 response if\nthe request body contains unknown fields. The body of the 400 response is:\n\n```json\n{\n \"message\": \"Error - unrecognised fields\"\n}\n```\n\nBy default, Zuora ignores unknown fields in the request body.\n"
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