<- Invoices API

Invoices API

Update invoice

PUT

 /v2/invoices/{invoice_id}

Updates an invoice by modifying fields, clearing fields, or both.

For most updates, you can use a sparse Invoice object to add fields or change values and use the fields_to_clear field to specify fields to clear. However, some restrictions apply. For example, you cannot change the order_id or location_id field and you must provide the complete custom_fields list to update a custom field. Published invoices have additional restrictions.

Permissions:ORDERS_WRITE, INVOICES_WRITE
Try in API Explorer
Link to section

Path parameters

Example code

Link to section

invoice_id

string

Required

The ID of the invoice to update.

Link to section

Request body

Link to section

invoice

Required

The invoice fields to update. The current invoice version must be specified in the version field. For more information, see Update an Invoice.

Link to section

idempotency_key

string

A unique string that identifies the UpdateInvoice request. If you do not provide idempotency_key (or provide an empty string as the value), the endpoint treats each request as independent.

For more information, see Idempotency.

Link to section

fields_to_clear

string [ ]

Link to section

Response fields

Link to section

invoice

The updated invoice.

Link to section

errors

Information about errors encountered during the request.

Error descriptions