Void an accepted invoice
Requires the preview_token of its preview: without it, or with one that expired, belongs to another invoice or no longer matches what would be done, nothing happens. The void is taken (202) and the provider is never called inside this request: the invoice STAYS accepted until SUNAT confirms, then becomes voided; if SUNAT rejects the void it stays accepted. Follow it with GET /v1/invoices/{id}/void or the events invoice.voided, invoice.void_rejected, invoice.void_failed. One void at a time per invoice: a second request while one is in process answers void_in_progress with the void that exists. A retry with the same Idempotency-Key answers the same void in its current state.
https://api.invox.page/v1/invoices/{id}/voidAuthorization
Path parameters
Header parameters
Request body JSON required
Returns
200
A retry: the void created by the first request, in its current state.
202
The void was taken and is in process. Retry-After says when to look again.