See what correcting a failed or rejected invoice would issue, and get the token that allows it
Only for an invoice that ended failed or rejected. Asks the provider what it holds under the number and answers what would be issued NOW, in the same invoice: the same number or the next one of its series (number.mode, with why), and today's date in Lima. If the provider already holds this very document as accepted, would is adopt: nothing would be issued again: the invoice only picks up its verdict. The answer carries a preview_token valid for 10 minutes. Nothing is changed and no number is taken.
GET
https://api.invox.page/v1/invoices/{id}/correctionAuthorization
Path parameters
Header parameters
Returns
200
The proposal and its preview_token.
JSON
400
organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid · test_scenario_not_allowed: The Test-Scenario header is only accepted in a test organization served by the simulator · test_scenario_unknown: The Test-Scenario header names a scenario that does not exist
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
JSON
409
invoice_not_correctable: Only a failed or rejected invoice can be corrected · void_in_progress: A void of this invoice is already in progress · invoice_held: The invoice is held: the provider gave an answer the service cannot interpret · invoice_type_not_allowed_for_regime: An issuer under the Nuevo RUS does not issue facturas
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