The Spanish version is the authoritative reference. View in Spanish
Method to Respond to Pending Cancellation Requests (ResponseCancelRequest)
When the CFDI requires acceptance to be canceled, the API allows sending the Acceptance or Rejection response for documents pending cancellation.
To send the response to documents with a pending cancellation request, the POST ResponseCancelRequest 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/ResponseCancelRequesthttps://developers-sbx.gosocket.net/api/v1/Document/ResponseCancelRequestThe method has the following parameters:
| ResponseCancelRequest (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] |
| UUID* | String | Country-level tax identifier of the document. | 36 alphanumeric characters |
| Response* | String | Response to the pending cancellation request | A – Acceptance R - Rejection |
- 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",
"UUID":"00000000-0000-0000-0000-000000000000",
"Response":"A"
}- Press Send.
Response example
The Tax Authority responds to queries through the API as follows: Successful result:
{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"Folios": "[{\"UUID\":\"00000000-0000-0000-0000-000000000000\",\"EstatusUUID\":\"1001\"}]",
"RFCPac": "PPD101129EA3",
"Fecha": "2025-08-26T16:32:52",
"RFCReceptor": "ANJ235103JM8"
},
"Messages": [
"0"
],
"ResponseValue": null,
"Code": "1000",
"Description": "Se recibió la respuesta de la petición 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:
| ResponseCancelRequest (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 | Information received related to the response of the pending cancellation request. | null or an object with Folios, RFCPac, Fecha, and RFCReceptor. |
| OtherData.Folios | String | Node containing the UUID information and the status of the cancellation response. See the EstatusUUID table. | Example: [{"UUID":"00000000-0000-0000-0000-000000000000","EstatusUUID":"1001"}] |
| OtherData.RFCPac | String | Tax identifier of the PAC through which the response to the cancellation request was sent. | Valid RFC. Example: PPD101129EA3 |
| OtherData.Fecha | String | Date the response to the cancellation request was sent | |
| OtherData.RFCReceptor | String | Tax identifier of the document receiver to whom the response to the cancellation request was given. | Valid receiver RFC. |
| 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" "Certificate Error" |
| ResponseValue | String | null | null |
| Code | String | Response code for the process | See the EstatusUUID table |
| Description | String | Indicates the description of the process response code | See the EstatusUUID table |
| ErrorException | String | null | null |
| EstatusUUID | |||
| --- | --- | ||
| Code | Description | ||
| 1000 | The request's response was received successfully | ||
| 1001 | No cancellation requests are pending a response for the uuid | ||
| 1002 | A response has already been received for the uuid's cancellation request | ||
| 1003 | Seal Does Not Match the Receiver RFC | ||
| 1004 | More than one cancellation request exists for the same uuid | ||
| 1005 | The uuid is null or does not have the correct format | ||
| 1006 | The maximum number of allowed requests was exceeded |