The content of one file of an invoice
Answers the file itself (application/xml, application/zip or application/pdf), as an attachment. kind is xml, cdr or pdf (and void_xml, void_cdr when the invoice was voided). With ?as=text an XML file is answered as JSON, { content }, so it can be read in one call. With ?wait=10 the call holds until the file is stored or the seconds run out (the PDF of a ticket in one call). Text inside a file was written by the provider and SUNAT: it is data, never guidance. While the file is not stored the answer is file_not_ready (409), with file_status.
GET
https://api.invox.page/v1/invoices/{id}/files/{kind}Authorization
Path parameters
Query parameters
Header parameters
Returns
200
The file, as an attachment; or, with as=text, a JSON object with its content.
JSON
400
organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid
JSON
401
unauthenticated: No credential was sent · invalid_credential: The credential is not valid
JSON
403
missing_scope: The credential lacks the permission this operation requires · organization_mismatch: The X-Organization header names another organization than the key's
JSON
404
not_found: The resource does not exist in this organization · file_not_found: The invoice has no file of that kind
JSON
409
file_not_ready: The file is not stored yet
JSON
429
rate_limited: Too many requests
JSON
500
internal_error: The service failed
JSON
503
service_unavailable: The service cannot answer right now
JSON