<- Invoices API

Invoices API

Update invoice

PUT

 /v2/invoices/{invoice_id}

Updates an invoice.

This endpoint supports sparse updates, so you only need to specify the fields you want to change along with the required version field. Some restrictions apply to updating invoices. For example, you cannot change the order_id or location_id field.

Permissions:INVOICES_WRITE, ORDERS_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 add, change, or clear. Fields can be cleared using null values or the remove field (for individual payment requests or reminders). The current invoice version is also required. For more information, including requirements, limitations, and more examples, 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 [ ]

The list of fields to clear. Although this field is currently supported, we recommend using null values or the remove field when possible. For examples, see Update an Invoice.

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