Correct a failed or rejected invoice
Requires the preview_token of its proposal. The SAME invoice goes back to processing with a new attempt: what you send (customer, items, notes, issue_date) replaces what it had, the rest stays, totals are calculated again by the same rules as an emission, and the attempt that ended is kept in previous_attempts. When the number changes, the next number of the series is taken in the same transaction; an error answer means nothing changed and no number was used. If what would be issued is no longer what the proposal showed (another correction went first, the provider now reports something else, the day changed), the answer is correction_proposal_changed: ask for the proposal again. If the provider already holds this document as accepted, the invoice is adopted instead (outcome: adopted) and what you sent is not applied. The provider is never called to SEND inside this request: follow the invoice as after issuing it. In a test organization the header Test-Scenario chooses what the simulated provider answers to the new attempt (default accepted).
https://api.invox.page/v1/invoices/{id}/correctionAuthorization
Path parameters
Header parameters
Request body JSON required
- issue_dateoptionalstring
The fiscal issue date of the corrected invoice, as a Lima wall clock. Default: now in Lima. Never in the future, and at most 3 days in the past for a factura and 7 for a boleta (the legal window to send it to SUNAT). An older one is refused with
issue_date_too_oldbefore any number is taken.pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
Returns
200
A retry: the invoice the first request reopened, in its current state.
202
The invoice is in process again. Retry-After says when to look again.