Factuarea APIDevelopers

invoice_invalid_status_transition

The target status is unreachable from the current one. The document lifecycle is directed: `draft` moves to `scheduled` or `sent`, `sent` to `overdue` or `annulled`, `overdue` to `annulled`, and `cancelled` and `annulled` are terminal. Being paid is not a step of that lifecycle: it is read from the payment ledger.

CodeTypeHTTPCategory
invoice_invalid_status_transitioninvalid_request_error422Invoices

Cause

The target status is unreachable from the current one. The document lifecycle is directed: draft moves to scheduled or sent, sent to overdue or annulled, overdue to annulled, and cancelled and annulled are terminal. Being paid is not a step of that lifecycle: it is read from the payment ledger.

What to do

Read the current status and call the operation for the step you actually need, instead of setting the target status directly.

On this page

Need a hand?Contact support