Skip to main content

How to interpret the response codes of the SendDocumentToAutority method?

When interpreting the API's response for the SendDocumentToAuthority method, keep the following fields in mind:

  • Success: When the value is:
    • false it means there was a problem during the processing of the document, or that it was rejected by the tax authority.
    • true it means the document was processed successfully (in asynchronous countries this does not mean it is approved, whereas in synchronous countries it does).
  • OtherData → SubCodeError (new development, deployed to the production environment for CO, PE, PA, GT, SV, MX.): This field provides a sub-code for the error that helps better understand what error occurred in cases where the error code returns a generic code, for example error 500. See the code table to find out the possible values.
    The OtherData field is dynamic and is handled as a key-value dictionary.
    The SubCodeError field will only be returned in the method response's OtherData when it has a specific value (Q001, Q002, N99, etc.), which means it will not appear in the response when it has no value (see the code table where SubCodeError is N/A).
  • Messages: Provides notifications, rejection reasons, and/or a description of the result of the process performed. The information provided in this field is extremely important when interpreting the process response, since it gives clues about what needs to be corrected before resending a document.
  • Code: Response code of the process. See the code table to find out the possible values.
  • Description: Description of the process response code. See the code table to find out the possible values.

Response examples

Code: 500 SubCodeError: Q005 Description: Company not active to issue documents How to replicate it? A/. There is no technique that can be shared to replicate this error, since it depends on internal configurations that the user cannot modify.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"SubCodeError": "Q005"
},
"Messages": [],
"ResponseValue": "Empresa no activa",
"Code": "500",
"Description": "Empresa no activa para emitir",
"ErrorException": null
}

Code: 500 SubCodeError: Q006 Description: Pending process for document {code}, TrackId: {trackId}. How to replicate it? A/. Sending concurrent requests for the same document.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"SubCodeError": "Q006"
},
"Messages": [
"Regla: Ya Existe un proceso pendiente para este documento: 1-SETP-990003275. (TipoDocumento-Serie-Folio)"
],
"ResponseValue": null,
"Code": "500",
"Description": "Proceso pendiente para el documento 1-SETP-990003275, TrackId:79bae241-2512-4432-b27f-e9f423e632fb.",
"ErrorException": null
}

To see the available code table, please review the information for each country: COLOMBIA PERU PANAMA GUATEMALA EL SALVADOR MEXICO