Skip to main content

Update invoice

PATCH 

/v1/invoices/:id

Partial update: absent fields keep their stored value. A paid, void or uncollectible invoice keeps its terms locked and only takes subscription_id, description, line_items, metadata, custom_metadata and external_id — plus nfe_issuance_policy and nfe_description_line while it is paid. Changing the value of any other field in those statuses (company, collection method, late-fee policy, due date, billing period, footer) returns 422 with code INVOICE_FIELD_LOCKED and, in details, status, locked_fields (the refused fields) and editable_fields. A locked field sent with the value already stored is not a change: it is ignored, so sending back the whole object read from the API works. line_items is still refused (409) while the invoice has an issued or in-flight NF-e. The same rule applies to PUT /invoices when it matches an existing invoice.

Request​

Responses​

Invoice updated.