# Update an invoice Updates a specific invoice. The following tutorials demonstrate how to use this operation: - Add and delete invoice items of draft standalone invoices - Edit due dates of draft standalone invoices - Edit invoice item prices and custom fields of draft standalone invoices Endpoint: PUT /v1/invoices/{invoiceKey} Version: 2026-02-20 Security: bearerAuth ## Header parameters: - `Accept-Encoding` (string) 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-Encoding` (string) 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-Id` (string) 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-Ids` (string) 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-Ids` (string) 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. 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-Version` (string) The minor API version. For a list of available minor versions, see API upgrades. ## Path parameters: - `invoiceKey` (string, required) The ID or number of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab or INV-0000001. ## Request fields (application/json): - `autoPay` (boolean) 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. - `comments` (string) Additional information related to the invoice that a Zuora user added to the invoice. - `dueDate` (string) The date by which the payment for this invoice is due. - `invoiceDate` (string) 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. - `invoiceItems` (array) Container for invoice items, The maximum number of items is 1,000. Example: [{"id":"8ad084db909fae930190a121c87f5800","amount":105}] - `invoiceItems.accountingCode` (string) The accounting code associated with the invoice item. - `invoiceItems.adjustmentLiabilityAccountingCode` (string) The accounting code for adjustment liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.adjustmentRevenueAccountingCode` (string) The accounting code for adjustment revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.amount` (number) The amount of the invoice item. - For tax-inclusive invoice items, the amount indicates the invoice item amount including tax. - For tax-exclusive invoice items, the amount indicates the invoice item amount excluding tax. - `invoiceItems.bookingReference` (string) The booking reference of the invoice item. Note: This field is only available if id is null. - `invoiceItems.chargeDate` (string) The date when the invoice item is charged, in yyyy-mm-dd hh:mm:ss format. - `invoiceItems.chargeName` (string) The name of the charge associated with the invoice item. This field is required if the productRatePlanChargeId field is not specified in the request. - `invoiceItems.contractAssetAccountingCode` (string) The accounting code for contract asset. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.contractLiabilityAccountingCode` (string) The accounting code for contract liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.contractRecognizedRevenueAccountingCode` (string) The accounting code for contract recognized revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.deferredRevenueAccountingCode` (string) The accounting code for the deferred revenue, such as Monthly Recurring Liability. Note: This field is only available if you have Zuora Finance enabled. - `invoiceItems.delete` (boolean) Indicates whether to delete the existing invoice item. Note: Set this field to true and specify an item id to delete an item. - `invoiceItems.description` (string) The description of the invoice item. - `invoiceItems.discountItems` (array) Container for discount items. The maximum number of discount items is 10. - `invoiceItems.discountItems.accountingCode` (string) The accounting code associated with the discount item. - `invoiceItems.discountItems.adjustmentLiabilityAccountingCode` (string) The accounting code for adjustment liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.discountItems.adjustmentRevenueAccountingCode` (string) The accounting code for adjustment revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.discountItems.amount` (string, required) The amount of the discount item. - Should be a negative number. For example, -10. - Always a fixed amount no matter whether the discount charge associated with the discount item uses the [fixed-amount model or percentage model](https://knowledgecenter.zuora.com/Billing/Subscriptions/Product_Catalog/B_Charge_Models/B_Discount_Charge_Models#Fixed_amount_model_and_percentage_model). - For tax-exclusive discount items, this amount indicates the discount item amount excluding tax. - For tax-inclusive discount items, this amount indicates the discount item amount including tax. - `invoiceItems.discountItems.bookingReference` (string) The booking reference of the discount item. - `invoiceItems.discountItems.chargeDate` (string) The date when the discount item is charged, in yyyy-mm-dd hh:mm:ss format. - `invoiceItems.discountItems.chargeName` (string) The name of the charge associated with the discount item. This field is required if the productRatePlanChargeId field is not specified in the request. - `invoiceItems.discountItems.contractAssetAccountingCode` (string) The accounting code for contract asset. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.discountItems.contractLiabilityAccountingCode` (string) The accounting code for contract liability. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.discountItems.contractRecognizedRevenueAccountingCode` (string) The accounting code for contract recognized revenue. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.discountItems.deferredRevenueAccountingCode` (string) The accounting code for the deferred revenue, such as Monthly Recurring Liability. Note: This field is only available if you have Zuora Finance enabled. - `invoiceItems.discountItems.description` (string) The description of the discount item. - `invoiceItems.discountItems.id` (string) The unique ID of the discount item. - `invoiceItems.discountItems.itemType` (string) The type of the discount item. - `invoiceItems.discountItems.purchaseOrderNumber` (string) The purchase order number associated with the discount item. - `invoiceItems.discountItems.recognizedRevenueAccountingCode` (string) 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. - `invoiceItems.discountItems.revRecCode` (string) The revenue recognition code. - `invoiceItems.discountItems.revRecTriggerCondition` (string) The date when revenue recognition is triggered. Enum: "ContractEffectiveDate", "ServiceActivationDate", "CustomerAcceptanceDate" - `invoiceItems.discountItems.revenueRecognitionRuleName` (string) The name of the revenue recognition rule governing the revenue schedule. Note: This field is only available if you have Zuora Finance enabled. - `invoiceItems.discountItems.sku` (string) The SKU of the invoice item. The SKU of the discount item must be different from the SKU of any existing product. - `invoiceItems.discountItems.unbilledReceivablesAccountingCode` (string) The accounting code for unbilled receivables. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.discountItems.unitPrice` (string) 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. - `invoiceItems.discountItems.IntegrationId__NS` (string) ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). - `invoiceItems.discountItems.IntegrationStatus__NS` (string) Status of the invoice item's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). - `invoiceItems.discountItems.SyncDate__NS` (string) Date when the invoice item was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). - `invoiceItems.excludeItemBillingFromRevenueAccounting` (boolean) 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. - `invoiceItems.id` (string) The unique ID of the invoice item. - Specify this field when updating or deleting an existing memo item. - Do not specify this field when creating a memo item. - `invoiceItems.itemType` (string) The type of the invoice item. - `invoiceItems.productRatePlanChargeId` (string) The ID of the product rate plan charge that the invoice item is created from. If you specify the ID of a product rate plan charge in this field, no matter whether the following fields are specified with values, the following fields use the values from the corresponding product rate plan charge instead of the specified values: - chargeName - sku - uom - taxCode - taxMode - accountingCode - deferredRevenueAccountingCode - recognizedRevenueAccountingCode Note: Do not specify the invoice item id when specifying this field. - `invoiceItems.purchaseOrderNumber` (string) The purchase order number associated the invoice item. - `invoiceItems.quantity` (string) The number of units for the invoice item. - `invoiceItems.recognizedRevenueAccountingCode` (string) 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. - `invoiceItems.revenueRecognitionRuleName` (string) The name of the revenue recognition rule governing the revenue schedule. Note: This field is only available if you have Zuora Finance enabled. - `invoiceItems.serviceEndDate` (string) The service end date of the invoice item. - `invoiceItems.serviceStartDate` (string) The service start date of the invoice item. - `invoiceItems.sku` (string) The SKU of the invoice item. The SKU of the invoice item must be different from the SKU of any existing product. - `invoiceItems.taxCode` (string) The tax code identifies which tax rules and tax rates to apply to the invoice item. Note: - This field is only available if you have Taxation enabled. - If the values of both taxCode and taxMode fields are changed to null when updating a standalone invoice, the corresponding invoiceItems > taxItems field and its nested fields specified in the creation request will be removed. - `invoiceItems.taxMode` (string) The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax. Note: - This field is only available if you have Taxation enabled. - If the values of both taxCode and taxMode fields are changed to null when updating a standalone invoice, the corresponding invoiceItems > taxItems field and its nested fields specified in the creation request will be removed. Enum: "TaxInclusive", "TaxExclusive" - `invoiceItems.unbilledReceivablesAccountingCode` (string) The accounting code for unbilled receivables. Note: This field is only available if you have the Billing - Revenue Integration feature enabled. - `invoiceItems.unitPrice` (string) The per-unit price of the invoice item. - `invoiceItems.uom` (string) The unit of measure. - `transferredToAccounting` (string) Whether the invoice was transferred to an external accounting system. Enum: "Processing", "Yes", "Error", "Ignore" - `templateId` (string) The ID of the invoice template associated with the invoice. Note: This field is only available if you have the Flexible Billing Attributes feature enabled. - `IntegrationStatus__NS` (string) Status of the invoice's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). - `SyncDate__NS` (string) Date when the invoice was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). ## Response 200 fields (application/json): - `accountId` (string) The ID of the customer account associated with the invoice. - `amount` (number) The total amount of the invoice. - `autoPay` (boolean) Whether invoices are automatically picked up for processing in the corresponding payment run. - `balance` (number) The balance of the invoice. - `cancelledById` (string,null) The ID of the Zuora user who cancelled the invoice. - `cancelledOn` (string,null) The date and time when the invoice was cancelled, in yyyy-mm-dd hh:mm:ss format. - `comment` (string) Comments about the invoice. - `createdById` (string) The ID of the Zuora user who created the invoice. - `createdDate` (string) 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. - `creditBalanceAdjustmentAmount` (number) 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. - `currency` (string) A currency defined in the web-based UI administrative settings. - `discount` (number) The discount of the invoice. - `dueDate` (string) The date by which the payment for this invoice is due. - `id` (string) The unique ID of the invoice. - `invoiceDate` (string) The date on which to generate the invoice. - `number` (string) The unique identification number of the invoice. - `postedById` (string) The ID of the Zuora user who posted the invoice. - `postedOn` (string) The date and time when the invoice was posted, in yyyy-mm-dd hh:mm:ss format. - `status` (string) The status of the invoice. Enum: "Draft", "Posted", "Canceled", "Error" - `success` (boolean) Returns true if the request was processed successfully. - `targetDate` (string) The target date for the invoice, in yyyy-mm-dd format. For example, 2017-07-20. - `taxAmount` (number) The amount of taxation. - `templateId` (string) The ID of the invoice template associated with the invoice. - `totalTaxExemptAmount` (number) The calculated tax amount excluded due to the exemption. - `transferredToAccounting` (string) Whether the invoice was transferred to an external accounting system. Enum: "Processing", "Yes", "Error", "Ignore" - `updatedById` (string) The ID of the Zuora user who last updated the invoice. - `updatedDate` (string) 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__NS` (string) ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). - `IntegrationStatus__NS` (string) Status of the invoice's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). - `SyncDate__NS` (string) Date when the invoice was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265). ## Response 500 fields (application/json): - `reasons` (array) Example: [{"code":"ObjectNotFound","message":"Notification definition with id 6e569e1e05f040eda51a927b140c0ac1 does not exist"}] - `reasons.code` (string) The error code of response. - `reasons.message` (string) The detail information of the error response ## Response 4XX fields (application/json): - `processId` (string) The ID of the process that handles the operation. - `reasons` (array) The container of the error code and message. This field is available only if the success field is false. - `reasons.code` (string) The error code of response. - `reasons.message` (string) The detail information of the error response - `requestId` (string) Unique identifier of the request. - `success` (boolean) Indicates whether the call succeeded.