Skip to main content

The Spanish version is the authoritative reference. View in Spanish

Method to Check the Status of the Document and the Cancellation (GetStatusDocument)

To cancel a document, it is essential to know its status, since this shows whether it has already been canceled or whether it requires acceptance to be canceled. For this reason, it is crucial that the API expose both the document status query and the cancellation process.

The POST GetStatusDocument method allows checking the document's status and determining which stage of the cancellation process it is in.

To use this method, enter the URL according to the environment to be consumed:

PRODUCTIONhttps://developers.gosocket.net/api/v1/Document/GetStatusDocument
SANDBOXhttps://developers-sbx.gosocket.net/api/v1/Document/GetStatusDocument

The method has the following parameters:

GetStatusDocument (request)
ParameterTypeDescriptionAllowed values
UUID*StringCountry-level tax identifier of the document.UUID (36 alphanumeric characters)
RFCEmisor*StringTax ID of the document issuer.

Legal Entities: 3 letters, 6 digits, and 3 alphanumeric characters (12).
Individuals: 4 letters, 6 digits, and 3 alphanumeric characters (13).
Alphanumeric characters.
Expected format: `[A-Z&Ñ]{3,4}[0-9]2(0[1-9]
  • Required

Request example

For this method we use Postman's Body tab.

  1. Select the method type. In this case, you must select POST.
  2. Enter the method URL.
  3. Enter the parameters shown in the table above with their corresponding values.
{
"UUID":"00000000-0000-0000-0000-000000000000",
"RFCEmisor":"ANJ235103JM8"
}
  1. Press Send.

Response example

The Tax Authority responds to queries through the API as follows: Successful result: Receipt obtained successfully: Active - Non-cancelable

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5",
"OtherData": {
"EstatusCancelacion": "",
"ValidacionEFOS": "200",
"ResponseSAT": "PHExOkVudmVsb...udmVsb3BlPg==",
"StatusCode": "No cancelable",
"StatusMessage": "Vigente"
},
"Messages": null,
"ResponseValue": "PD94bWwgdmV...HJvYmFudGU+",
"Code": "200",
"Description": "S - Comprobante obtenido satisfactoriamente.",
"ErrorException": null
}

Successful result: Receipt obtained successfully: Active - Cancelable without acceptance

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5",
"OtherData": {
"EstatusCancelacion": "",
"ValidacionEFOS": "200",
"ResponseSAT": "PHExOkVudmV...pFbnZlbG9wZT4=",
"StatusCode": "Cancelable sin aceptación",
"StatusMessage": "Vigente"
},
"Messages": null,
"ResponseValue": "PD94bWwgdm...m9iYW50ZT4=",
"Code": "200",
"Description": "S - Comprobante obtenido satisfactoriamente.",
"ErrorException": null
}

Successful result: Receipt obtained successfully: Active - Cancelable with acceptance

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5",
"OtherData": {
"EstatusCancelacion": "",
"ValidacionEFOS": "200",
"ResponseSAT": "PHExOkVudm...ZlbG9wZT4=",
"StatusCode": "Cancelable con aceptación",
"StatusMessage": "Vigente"
},
"Messages": null,
"ResponseValue": "PGNmZGk6Q2...wcm9iYW50ZT4=",
"Code": "200",
"Description": "S - Comprobante obtenido satisfactoriamente.",
"ErrorException": null
}

Successful result: Receipt obtained successfully: Canceled - Canceled without acceptance

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5",
"OtherData": {
"EstatusCancelacion": "Cancelado sin aceptación",
"ValidacionEFOS": "200",
"ResponseSAT": "PHExOkVudmVs...ZWxvcGU+",
"StatusCode": "Cancelable sin aceptación",
"StatusMessage": "Cancelado"
},
"Messages": null,
"ResponseValue": "PD94bWwg...b2JhbnRlPg==",
"Code": "200",
"Description": "S - Comprobante obtenido satisfactoriamente.",
"ErrorException": null
}

Successful result: Receipt obtained successfully: Canceled - Deadline expired

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5",
"OtherData": {
"EstatusCancelacion": "Plazo vencido",
"ValidacionEFOS": "200",
"ResponseSAT": "PHExOkVu...2ZWxvcGU+",
"StatusCode": "Cancelable con aceptación",
"StatusMessage": "Cancelado"
},
"Messages": null,
"ResponseValue": "PD94bWw...JvYmFudGU+",
"Code": "200",
"Description": "S - Comprobante obtenido satisfactoriamente.",
"ErrorException": null
}

Successful result: Receipt not found: Not found

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5",
"OtherData": {
"EstatusCancelacion": "",
"ValidacionEFOS": "",
"ResponseSAT": "PHExOkVudm...nZlbG9wZT4=",
"StatusCode": "",
"StatusMessage": "No Encontrado"
},
"Messages": null,
"ResponseValue": "PD94bWwg...9iYW50ZT4=",
"Code": "99",
"Description": "N - 602: Comprobante no encontrado.",
"ErrorException": null
}

If the sending result is NOT successful, the Inbox API will respond with an error message: Document not found in the database:

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"StatusCode": "500",
"StatusMessage": null
},
"Messages": null,
"ResponseValue": null,
"Code": "500",
"Description": "Documento no encontrado",
"ErrorException": null
}

Company not active to consume the method:

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": null,
"ResponseValue": "Permis Required",
"Code": "500",
"Description": "Empresa no activa para utilizar el evento CancelFunction",
"ErrorException": null
}

Interpreting the Response

To correctly interpret the response, take into account the following criteria:

GetStatusDocument (response)
ParameterTypeDescriptionAllowed values
SuccessBooleanIndicates whether the request executed successfully.true: The request executed successfully. false: The request executed with some inconsistency.
GlobalDocumentIdStringnull00000000-0000-0000-0000-000000000000
CountryDocumentIdStringTax identifier of the queried document (UUID).null Queried UUID (36 alphanumeric characters).
OtherDataStringAdditional properties depending on the country and the method.
OtherData.EstatusCancelacionStringStatus of the cancellation request* In process * Canceled without acceptance * Canceled with acceptance * Request Rejected * Deadline Expired * null
OtherData.ValidacionEFOSStringStatus of the issuing taxpayer on the EFOS list* 100 * 200
OtherData.ResponseSATStringXML with SAT's response for the queried documentBase64-encoded XML
OtherData.StatusCodeStringCancellation conditions* Cancelable without acceptance * Cancelable with acceptance * Non-cancelable
OtherData.StatusMessageStringReceipt status* Active * Canceled * Not found
MessagesStringnullnull
ResponseValueStringResponse from the queried service in base64-encoded XML format.Base64-encoded XML
CodeStringResponse code for the process* 99: Receipt not found * 200: Receipt obtained successfully * 404: document not found in Inbox
DescriptionStringIndicates whether the receipt was found or if there is a problem with the query* N 601: The provided printed expression is not valid. * N 602: Receipt not found * S Receipt obtained successfully
ErrorExceptionStringnullnull