invoice_handoff
Get one issued invoice ready to give the client, in one call: the document, the client link (made if it has none), the PDF (printed or the stored one) and the prepared message (invoice_message_prepare's words, with the link). ready lists the parts made; missing gives each other part's reason_code, reason and next_call. A turned-off link is never re-issued: invoice_share action 'rotate' waits for the owner's approval. NOTHING IS SENT. Refusals (CONFLICT): draft SIMPLER_SALES_MESSAGE_NOT_ISSUED (issue it with invoice_update status 'sent'); cancelled; written off; SIMPLER_SALES_MESSAGE_PURPOSE_UNFIT (send its next_call). Read-only token or viewer: FORBIDDEN. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The invoice's id, from invoice_list or invoice_read. | |
| purpose | No | The message's purpose: 'invoice', 'reminder', 'receipt' or 'promise_follow_up' (a promised payment date has passed). Leave out to get the one that fits the invoice's state. | |
| language | No | The message's language: 'en', 'ms' or 'zh'. Leave out to use the client's message_language (English when none is set). |