The Spanish version is the authoritative reference. View in Spanish
Method to Query Documents Pending Cancellation (GetPendingCancelRequest)
When the CFDI requires acceptance to be canceled, the API allows checking whether the receiver has documents pending cancellation.
To identify documents with a pending cancellation request, the POST GetPendingCancelRequest method can be used.
To use this method, enter the URL according to the environment to be consumed:
https://developers.gosocket.net/api/v1/Document/GetPendingCancelRequesthttps://developers-sbx.gosocket.net/api/v1/Document/GetPendingCancelRequestThe method has the following parameters:
| GetPendingCancelRequest (request) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| RFCReceptor* | String | Tax ID of the document receiver. 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.
- Select the method type. In this case, you must select POST.
- Enter the method URL.
- Enter the parameters shown in the table above with their corresponding values.
{
"RFCReceptor":"ANJ235103JM8"
}- Press Send.
Response example
The Tax Authority responds to queries through the API as follows: Successful result: No pending requests exist for the queried RFC
{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {},
"Messages": [
"0"
],
"ResponseValue": null,
"Code": "1101",
"Description": "No existen peticiones para el RFC Receptor",
"ErrorException": null
}Successful result: With pending requests
{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"Uuids": "{\"Uuid\":[\"239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5\"]}"
},
"Messages": [
"0"
],
"ResponseValue": null,
"Code": "1100",
"Description": "Se obtuvieron las peticiones del RFC Receptor de forma exitosa",
"ErrorException": null
}If the sending result is NOT successful, the Inbox API will respond with an error message: 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
}Error with the client certificate:
{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": [
"Regla: Error de Certificado, verifique el certificado y reintente nuevamente. Failed to load certificate after retries"
],
"ResponseValue": null,
"Code": "500",
"Description": null,
"ErrorException": null
}Error with the client certificate:
{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": [
"Regla: Error de Certificado, verifique el certificado y reintente nuevamente. .Cer or .Key estan vacios para el accountCode: ANJ235103JM8"
],
"ResponseValue": null,
"Code": "500",
"Description": null,
"ErrorException": null
}Interpreting the Response
To correctly interpret the response, take into account the following criteria:
| GetPendingCancelRequest (response) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| Success | Boolean | Indicates whether the request executed successfully. | true: The request executed successfully. false: The request executed with some inconsistency. |
| GlobalDocumentId | String | null | 00000000-0000-0000-0000-000000000000 |
| CountryDocumentId | String | null | null |
| OtherData | String | List of documents with a pending cancellation request. | null or an object with the Uuids property. |
| OtherData.Uuids | String | Node containing information for the UUID(s) with a pending cancellation request. | Example: {"Uuid":["239EF8DC-A6C7-3E87-AAC6-FF8244DE1FB5"]} |
| Messages | String | Global invocation code. A value of 0 (zero) indicates the invocation was successful; otherwise it indicates the reason for the problem. | Example: "0" |
| ResponseValue | String | null | null |
| Code | String | Response code for the process | * 1100: The Receiver RFC's requests were retrieved successfully * 1101: No requests exist for the Receiver RFC |
| Description | String | Indicates the description of the process response code | * 1100: The Receiver RFC's requests were retrieved successfully * 1101: No requests exist for the Receiver RFC |
| ErrorException | String | null | null |