POST /v1/invoices/batch
Creates multiple standalone invoices for selling physical goods, services or other items on a non-recurring basis to your subscription customers.
To use this operation, you must have the "Create Standalone Invoice" and "Modify Invoice" user permissions. See Billing Roles for more information. As of Zuora Release 2022.03.R5, newly created standard Billing users have the “Create Standalone Invoice” permission enabled by default.
Limitations
This operation has the following limitations:
- You can create a maximum of 50 invoices in one request.
- You can create a maximum of 1,000 invoice items in one request.
Servers
- https://rest.test.zuora.com
- https://rest.sandbox.na.zuora.com
- https://rest.apisandbox.zuora.com
- https://rest.na.zuora.com
- https://rest.zuora.com
- https://rest.test.eu.zuora.com
- https://rest.sandbox.eu.zuora.com
- https://rest.eu.zuora.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Content-Encoding |
String | No |
Include the |
Zuora-Track-Id |
String | No |
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 ( |
Authorization |
String | No |
The value is in the |
Idempotency-Key |
String | No |
Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. |
Zuora-Entity-Ids |
String | No |
An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Org-Ids |
String | No |
Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. |
Accept-Encoding |
String | No |
Include the If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
useSingleTransaction |
Boolean | No |
Whether a batch request is handled with a single transaction.
If the field is set to |
invoices[] |
Array | No |
Container for standalone invoices. |
invoices[].IntegrationStatus__NS |
String | No |
Status of the invoice's synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].soldToSameAsBillTo |
Boolean | No |
Whether the sold-to contact and bill-to contact are the same entity. This field is mutually exclusive with the The created invoice has the same bill-to contact and sold-to contact entity only when all the following conditions are met in the request body:
Note: If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body. Default value: false |
invoices[].accountId |
String | No |
The ID of the account associated with the invoice. You must specify either |
invoices[].IntegrationId__NS |
String | No |
ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceNumber |
String | No |
A customized invoice number with the following format requirements:
Purely numerical prefixes or prefixes ending with a number are supported for standalone invoices. For example, you can use The value must be unique in the system, otherwise it may cause issues with bill runs and subscribe/amend. Check out things to note and troubleshooting steps. |
invoices[].invoiceDate |
String | Yes |
The date that appears on the invoice being created, in |
invoices[].invoiceItems[] |
Array | No |
Container for invoice items. The maximum number of invoice items is 1,000. Note: For the "Create a standalone invoice" and "Create standalone invoices" operations, note the following:
|
invoices[].invoiceItems[].recognizedRevenueAccountingCode |
String | No |
The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges. Note: This field is only available if you have Zuora Finance enabled. |
invoices[].invoiceItems[].serviceEndDate |
String | No |
The service end date of the invoice item. |
invoices[].invoiceItems[].bookingReference |
String | No |
The booking reference of the invoice item. |
invoices[].invoiceItems[].description |
String | No |
The description of the invoice item. |
invoices[].invoiceItems[].revRecCode |
String | No |
The revenue recognition code. |
invoices[].invoiceItems[].adjustmentRevenueAccountingCode |
String | No |
The accounting code for adjustment revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].chargeDate |
String | No |
The date when the invoice item is charged, in |
invoices[].invoiceItems[].uom |
String | No |
The unit of measure. |
invoices[].invoiceItems[].itemType |
String | No |
The type of the invoice item. |
invoices[].invoiceItems[].taxItems[] |
Array | No |
Container for taxation items. The maximum number of taxation items is 5. Note: This field is only available only if you have Taxation enabled. |
invoices[].invoiceItems[].taxItems[].exemptAmount |
String | No |
The calculated tax amount excluded due to the exemption. |
invoices[].invoiceItems[].taxItems[].jurisdiction |
String | No |
The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city. |
invoices[].invoiceItems[].taxItems[].name |
String | Yes |
The name of taxation. |
invoices[].invoiceItems[].taxItems[].taxRateType |
String | Yes |
The type of the tax rate applied to the invoice item. Possible values:
|
invoices[].invoiceItems[].taxItems[].taxAmount |
String | Yes |
The amount of the taxation item in the invoice item. |
invoices[].invoiceItems[].taxItems[].locationCode |
String | No |
The identifier for the location based on the value of the |
invoices[].invoiceItems[].taxItems[].taxCode |
String | Yes |
The tax code identifies which tax rules and tax rates to apply to a specific invoice item. |
invoices[].invoiceItems[].taxItems[].taxDate |
String | Yes |
The date that the tax is applied to the invoice item, in |
invoices[].invoiceItems[].taxItems[].taxRate |
String | Yes |
The tax rate applied to the invoice item. |
invoices[].invoiceItems[].taxItems[].taxCodeDescription |
String | No |
The description of the tax code. |
invoices[].invoiceItems[].taxItems[].taxMode |
String | Yes |
The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax. Possible values:
|
invoices[].invoiceItems[].taxItems[].taxRateDescription |
String | No |
The description of the tax rate. |
invoices[].invoiceItems[].excludeItemBillingFromRevenueAccounting |
Boolean | No |
The flag to exclude the invoice item from revenue accounting. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].SyncDate__NS |
String | No |
Date when the invoice item was synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceItems[].revRecTriggerCondition |
String | No |
The date when revenue recognition is triggered. Possible values:
|
invoices[].invoiceItems[].sku |
String | No |
The SKU of the invoice item. The SKU of the invoice item must be different from the SKU of any existing product. |
invoices[].invoiceItems[].accountingCode |
String | No |
The accounting code associated with the invoice item. |
invoices[].invoiceItems[].contractAssetAccountingCode |
String | No |
The accounting code for contract asset. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].unbilledReceivablesAccountingCode |
String | No |
The accounting code for unbilled receivables. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].chargeName |
String | No |
The name of the charge associated with the invoice item. This field is required if the |
invoices[].invoiceItems[].deferredRevenueAccountingCode |
String | No |
The accounting code for the deferred revenue, such as Monthly Recurring Liability. Note: This field is only available if you have Zuora Finance enabled. |
invoices[].invoiceItems[].unitPrice |
String | No |
The per-unit price of the invoice item. To pass Level 3 data to the gateway, this field is required and must be greater than zero. |
invoices[].invoiceItems[].IntegrationStatus__NS |
String | No |
Status of the invoice item's synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceItems[].IntegrationId__NS |
String | No |
ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceItems[].quantity |
String | No |
The number of units for the invoice item. Default value: "1" |
invoices[].invoiceItems[].revenueRecognitionRuleName |
String | No |
The name of the revenue recognition rule governing the revenue schedule. Note: This field is only available if you have Zuora Finance enabled. |
invoices[].invoiceItems[].discountItems[] |
Array | No |
Container for discount items. The maximum number of discount items is 10. |
invoices[].invoiceItems[].discountItems[].recognizedRevenueAccountingCode |
String | No |
The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges. Note: This field is only available if you have Zuora Finance enabled. |
invoices[].invoiceItems[].discountItems[].bookingReference |
String | No |
The booking reference of the discount item. |
invoices[].invoiceItems[].discountItems[].description |
String | No |
The description of the discount item. |
invoices[].invoiceItems[].discountItems[].revRecCode |
String | No |
The revenue recognition code. |
invoices[].invoiceItems[].discountItems[].adjustmentRevenueAccountingCode |
String | No |
The accounting code for adjustment revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].discountItems[].chargeDate |
String | No |
The date when the discount item is charged, in |
invoices[].invoiceItems[].discountItems[].itemType |
String | No |
The type of the discount item. |
invoices[].invoiceItems[].discountItems[].taxItems[] |
Array | No |
Container for taxation items. The maximum number of taxation items is 5. Note: This field is only available only if you have Taxation enabled. |
invoices[].invoiceItems[].discountItems[].taxItems[].exemptAmount |
String | No |
The calculated tax amount excluded due to the exemption. |
invoices[].invoiceItems[].discountItems[].taxItems[].jurisdiction |
String | No |
The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city. |
invoices[].invoiceItems[].discountItems[].taxItems[].name |
String | Yes |
The name of taxation. |
invoices[].invoiceItems[].discountItems[].taxItems[].taxRateType |
String | Yes |
The type of the tax rate applied to the invoice item. Possible values:
|
invoices[].invoiceItems[].discountItems[].taxItems[].taxAmount |
String | Yes |
The amount of the taxation item in the invoice item. |
invoices[].invoiceItems[].discountItems[].taxItems[].locationCode |
String | No |
The identifier for the location based on the value of the |
invoices[].invoiceItems[].discountItems[].taxItems[].taxCode |
String | Yes |
The tax code identifies which tax rules and tax rates to apply to a specific invoice item. |
invoices[].invoiceItems[].discountItems[].taxItems[].taxDate |
String | Yes |
The date that the tax is applied to the invoice item, in |
invoices[].invoiceItems[].discountItems[].taxItems[].taxRate |
String | Yes |
The tax rate applied to the invoice item. |
invoices[].invoiceItems[].discountItems[].taxItems[].taxCodeDescription |
String | No |
The description of the tax code. |
invoices[].invoiceItems[].discountItems[].taxItems[].taxMode |
String | Yes |
The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax. Possible values:
|
invoices[].invoiceItems[].discountItems[].taxItems[].taxRateDescription |
String | No |
The description of the tax rate. |
invoices[].invoiceItems[].discountItems[].SyncDate__NS |
String | No |
Date when the invoice item was synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceItems[].discountItems[].revRecTriggerCondition |
String | No |
The date when revenue recognition is triggered. Possible values:
|
invoices[].invoiceItems[].discountItems[].sku |
String | No |
The SKU of the invoice item. The SKU of the discount item must be different from the SKU of any existing product. |
invoices[].invoiceItems[].discountItems[].accountingCode |
String | No |
The accounting code associated with the discount item. |
invoices[].invoiceItems[].discountItems[].contractAssetAccountingCode |
String | No |
The accounting code for contract asset. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].discountItems[].unbilledReceivablesAccountingCode |
String | No |
The accounting code for unbilled receivables. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].discountItems[].chargeName |
String | No |
The name of the charge associated with the discount item.
This field is required if the |
invoices[].invoiceItems[].discountItems[].deferredRevenueAccountingCode |
String | No |
The accounting code for the deferred revenue, such as Monthly Recurring Liability. Note: This field is only available if you have Zuora Finance enabled. |
invoices[].invoiceItems[].discountItems[].unitPrice |
String | No |
The per-unit price of the discount item. If the discount charge associated with the discount item uses the percentage model, the unit price will display as a percentage amount in PDF. For example: if unit price is 5.00, it will display as 5.00% in PDF. |
invoices[].invoiceItems[].discountItems[].IntegrationStatus__NS |
String | No |
Status of the invoice item's synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceItems[].discountItems[].accountsReceivableAccountingCode |
String | No |
The accounting code for accounts receivable. |
invoices[].invoiceItems[].discountItems[].IntegrationId__NS |
String | No |
ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].invoiceItems[].discountItems[].revenueRecognitionRuleName |
String | No |
The name of the revenue recognition rule governing the revenue schedule. Note: This field is only available if you have Zuora Finance enabled. |
invoices[].invoiceItems[].discountItems[].purchaseOrderNumber |
String | No |
The purchase order number associated with the discount item. |
invoices[].invoiceItems[].discountItems[].adjustmentLiabilityAccountingCode |
String | No |
The accounting code for adjustment liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].discountItems[].amount |
String | Yes |
The amount of the discount item.
|
invoices[].invoiceItems[].discountItems[].contractRecognizedRevenueAccountingCode |
String | No |
The accounting code for contract recognized revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].discountItems[].productRatePlanChargeId |
String | No |
The ID of the product rate plan charge that the discount item is created from. If you specify a value for the
If you specify a value for the
If you specify a value for the
|
invoices[].invoiceItems[].discountItems[].contractLiabilityAccountingCode |
String | No |
The accounting code for contract liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].purchaseOrderNumber |
String | No |
The purchase order number associated with the invoice item. |
invoices[].invoiceItems[].adjustmentLiabilityAccountingCode |
String | No |
The accounting code for adjustment liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].amount |
String | Yes |
The amount of the invoice item.
|
invoices[].invoiceItems[].serviceStartDate |
String | Yes |
The service start date of the invoice item. |
invoices[].invoiceItems[].taxCode |
String | No |
The tax code identifies which tax rules and tax rates to apply to the invoice item. Note: This field is only available only if you have Taxation enabled. |
invoices[].invoiceItems[].contractRecognizedRevenueAccountingCode |
String | No |
The accounting code for contract recognized revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].invoiceItems[].productRatePlanChargeId |
String | No |
The ID of the product rate plan charge that the invoice item is created from. If you specify a value for the
|
invoices[].invoiceItems[].taxMode |
String | No |
The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax. Note: This field is only available only if you have Taxation enabled. Possible values:
|
invoices[].invoiceItems[].contractLiabilityAccountingCode |
String | No |
The accounting code for contract liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. |
invoices[].paymentTerm |
String | No |
The ID or name of the payment term associated with the invoice. For example, Note: If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body. |
invoices[].status |
String | No |
The status of invoice. By default, the invoice status is Draft. When creating an invoice, if you set this field to Possible values:
Default value: "Draft" |
invoices[].billToContactId |
String | No |
The ID of the bill-to contact associated with the invoice. This field is mutually exclusive with the Note: If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body. |
invoices[].currency |
String | No |
The code of a currency as defined in Billing Settings through the Zuora UI. If you do not specify a currency during standalone invoice creation, the default account currency is applied. The currency that you specify in the request must be configured and activated in Billing Settings. Note: This field is available only if you have the Multiple Currencies feature enabled. |
invoices[].accountNumber |
String | No |
The Number of the account associated with the invoice.
You must specify either |
invoices[].dueDate |
String | No |
The date by which the payment for this invoice is due, in |
invoices[].SyncDate__NS |
String | No |
Date when the invoice was synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoices[].templateId |
String | No |
The ID of the invoice template associated with the invoice. Note: If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body. |
invoices[].autoPay |
Boolean | No |
Whether invoices are automatically picked up for processing in the corresponding payment run. Default value: false |
invoices[].sequenceSet |
String | No |
The ID or name of the sequence set associated with the invoice. Note: If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body. |
invoices[].soldToContactId |
String | No |
The ID of the sold-to contact associated with the invoice. This field is mutually exclusive with the Note: If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body. |
invoices[].customRates[] |
Array | No |
It contains Home currency and Reporting currency custom rates currencies. The maximum number of items is 2 (you can pass the Home currency item or Reporting currency item or both). Note: The API custom rate feature is permission controlled. |
invoices[].customRates[].rateDate |
String | No |
The date on which a particular currency rate is fixed or obtained on. Note: This field is only available if you set the |
invoices[].customRates[].currency |
String | Yes |
The currency code for either Reporting or Home currency. Note: This field is only available if you set the |
invoices[].customRates[].customFxRate |
Number | Yes |
The Custom FX conversion rate between Home/Reporting and Transactional currency items. Note: This field is only available if you set the |
invoices[].transferredToAccounting |
String | No |
Possible values:
|
invoices[].comments |
String | No |
Comments about the invoice. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.