Issue an invoice (factura or boleta)
Validates, calculates, takes the next number of the series and stores the invoice. The provider is never called inside this request: the answer is the invoice with status: processing (202) or, with wait, its outcome if it arrives in time (201). An error answer means nothing was created and no number was used. What SUNAT says later is a state of the invoice, never an HTTP error. In a test organization, the header Test-Scenario chooses what the simulated provider answers (GET /v1/test/scenarios).
https://api.invox.page/v1/invoicesAuthorization
Query parameters
Header parameters
Request body JSON required
- template_idoptional
The template its PDF prints with: one of yours or a shared one (
system:thermal-80). Default: the issuer'sdefault_template, elsesystem:a4. On the live face your template prints its promoted version; on the test face its latest published one. The invoice keeps the version it printed with. - issue_dateoptionalstring
The fiscal issue date as a Lima wall clock, with no zone. 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 created by the first request, in its current state.
201
The invoice reached its outcome within wait.
202
The invoice is in process. Retry-After says when to look again.