Invoices

Update an invoice

Updates a specific invoice. The following tutorials demonstrate how to use this operation:

  • <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/unified-invoicing/invoice-items-of-draft-standalone-invoices/manage-invoice-items-of-draft-standalone-invoices-through-the-rest-api" target="_blank">Add and delete invoice items of draft standalone invoices</a>
  • <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/unified-invoicing/due-dates-of-draft-standalone-invoices-editing/edit-the-due-date-on-draft-standalone-invoices-through-the-rest-api" target="_blank">Edit due dates of draft standalone invoices</a>
  • <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/leverage-advanced-capabilities/unified-invoicing/invoice-item-prices-and-custom-fields-of-draft-standalone-invoices-editing/edit-the-invoice-item-prices-and-custom-fields-of-standalone-invoices-through-the-rest-api" target="_blank">Edit invoice item prices and custom fields of draft standalone invoices</a>
put/v1/invoices/{invoiceKey}

Path parameters

invoiceKeystring required

The ID or number of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab or INV-0000001.

Headers

Accept-Encodingstring

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Content-Encodingstring

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Zuora-Track-Idstring

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

Zuora-Entity-Idsstring

An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.

Zuora-Org-Idsstring

Comma separated IDs. If you have <a href="https://docs.zuora.com/en/zuora-platform/organization-and-entity-management/multi-org/overview-of-multi-org" target="_blank">Zuora Multi-Org</a> enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header.

The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.

Zuora-Versionstring

The minor API version.

For a list of available minor versions, see API upgrades.

Request body

autoPayboolean

Whether invoices are automatically picked up for processing in the corresponding payment run. By default, invoices are automatically picked up for processing in the corresponding payment run.

commentsstring

Additional information related to the invoice that a Zuora user added to the invoice.

dueDatestring date

The date by which the payment for this invoice is due.

invoiceDatestring date

The new invoice date of the invoice. The new invoice date cannot fall in a closed accounting period. You can only specify invoiceDate or dueDate in one request. Otherwise, an error occurs.

transferredToAccounting'Processing' | 'Yes' | 'No' | 'Error' | 'Ignore'

Whether the invoice was transferred to an external accounting system.

templateIdstring

The ID of the invoice template associated with the invoice.

Note: This field is only available if you have the <a href="https://docs.zuora.com?resourceId=billing-attributes-for-flexible-billing" target="_blank">Flexible Billing Attributes</a> feature enabled.

IntegrationId__NSstring

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

IntegrationStatus__NSstring

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

SyncDate__NSstring

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

Example request

{
  "invoiceItems": [
    {
      "id": "8ad084db909fae930190a121c87f5800",
      "amount": 105
    }
  ]
}

Response

OK

accountIdstring

The ID of the customer account associated with the invoice.

amountnumber

The total amount of the invoice.

autoPayboolean

Whether invoices are automatically picked up for processing in the corresponding payment run.

balancenumber

The balance of the invoice.

cancelledByIdstring nullable

The ID of the Zuora user who cancelled the invoice.

cancelledOnstring nullable

The date and time when the invoice was cancelled, in yyyy-mm-dd hh:mm:ss format.

commentstring nullable

Comments about the invoice.

createdByIdstring

The ID of the Zuora user who created the invoice.

createdDatestring

The date and time when the invoice was created, in yyyy-mm-dd hh:mm:ss format. For example, 2017-03-01 15:31:10.

creditBalanceAdjustmentAmountnumber

Note: This filed is only available if you have the Credit Balance feature enabled and the Invoice Settlement feature disabled. The currency amount of the adjustment applied to the customer's credit balance.

currencystring

A currency defined in the web-based UI administrative settings.

discountnumber

The discount of the invoice.

dueDatestring date

The date by which the payment for this invoice is due.

idstring

The unique ID of the invoice.

invoiceDatestring date

The date on which to generate the invoice.

numberstring

The unique identification number of the invoice.

postedByIdstring nullable

The ID of the Zuora user who posted the invoice.

postedOnstring nullable

The date and time when the invoice was posted, in yyyy-mm-dd hh:mm:ss format.

status'Draft' | 'Posted' | 'Canceled' | 'Error' | 'Split'

The status of the invoice.

Note:

  • The Split status is applicable only when you use <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/invoice-management/split-invoices/split-invoices-overview" target="_blank">Split Invoice feature</a>.

  • When an invoice is split, its status changes from Draft to Split, and the newly created invoices retain a reference to the original invoice.

successboolean

Returns true if the request was processed successfully.

targetDatestring date nullable

The target date for the invoice, in yyyy-mm-dd format. For example, 2017-07-20.

taxAmountnumber

The amount of taxation.

templateIdstring

The ID of the invoice template associated with the invoice.

totalTaxExemptAmountnumber

The calculated tax amount excluded due to the exemption.

transferredToAccounting'Processing' | 'Yes' | 'No' | 'Error' | 'Ignore'

Whether the invoice was transferred to an external accounting system.

updatedByIdstring

The ID of the Zuora user who last updated the invoice.

updatedDatestring

The date and time when the invoice was last updated, in yyyy-mm-dd hh:mm:ss format. For example, 2017-03-02 15:36:10.

IntegrationId__NSstring

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

IntegrationStatus__NSstring

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

SyncDate__NSstring

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

Changes