Approves a draft sales invoice in the credential-bound company: it takes its number (a number supplied at creation is kept and the sequence is not used), posts the invoice journal and becomes due. Under an invoice approval policy the draft is submitted for approval instead and comes back with approval_state: waiting. Every line except a free-text or discount row must have an account: a draft with a line that has none is refused with 422 invoice_line_account_missing (the code also starts the message), naming each such line as error.fields.line_items.N.account_id in the order the invoice lists its lines; set the account with invoice.update (account_id or account_code) and approve again. Nothing is posted and the invoice stays a draft. Other refusals: 422 invoice_number_taken, 422 document_number_unavailable, 409 document_number_conflict (retryable). Requires If-Match with the invoice ETag and an Idempotency-Key, which stores the terminal response for 24 hours. Requires the invoices:action OAuth scope.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
