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
- 200
- 400
- 401
- 403
- 404
- 422
- 429
- 500
Invoice updated.
Request body failed validation.
Missing or invalid bearer token.
Token is valid but lacks permission for this operation. With code insufficient_scope, details.required carries the one minimal set of scopes that, added to details.granted, would let the request through: the resource scope (billing/{resource}, or billing/all off the catalogue) then the bare verb — e.g. ["billing/customers", "delete"].
Resource not found in the current organization.
Request body failed validation.
Rate limit exceeded.
Unexpected server error.