Close held invoices and voids as failed, with the token of their preview (staff only)
Irreversible. Requires the preview_token of POST /v1/staff/held/close/preview (without it, or with one that expired or is not yours, nothing happens), a reason that is kept in the events, and accept_risk: true when the preview marked a document unanswered or unrecognized (without it, held_close_risk_not_accepted and nothing happens). The provider is NOT asked again and nothing is sent to it. Each document still held exactly as the preview saw it is closed in one transaction: an invoice becomes failed with status_reason: held_closed_by_staff (its number stays used; the sale is issued again as a new invoice), a void becomes failed with the same reason and its invoice stays accepted. A document released, resolved or held again since the preview is not closed (skipped). Each closed document gets its event (invoice.failed, invoice.void_failed) with close: who closed it, the reason, what the provider answered, whether the risk was accepted and the version of the code; its organization receives the alert of a failure, and it leaves the staff's list and its reminders. A retry with the same Idempotency-Key answers what the first call closed while the token lives, and never closes twice. Reserved to the staff of the service; anyone else gets staff_required, and a service-account key gets person_credential_required.
https://api.invox.page/v1/staff/held/closeAuthorization
Header parameters
Request body JSON required
Returns
200
What was closed and what was skipped, with the id of the close.