Skip to main content

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:

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

The method has the following parameters:

ResponseCancelRequest (request)
ParameterTypeDescriptionAllowed values
RFCReceptor*StringTax 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*StringCountry-level tax identifier of the document.36 alphanumeric characters
Response*StringResponse to the pending cancellation requestA – Acceptance R - Rejection
  • 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.
{
"RFCReceptor":"ANJ235103JM8",  
"UUID":"00000000-0000-0000-0000-000000000000",
"Response":"A"
}
  1. 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)
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
CountryDocumentIdStringnullnull
OtherDataStringInformation received related to the response of the pending cancellation request.null or an object with Folios, RFCPac, Fecha, and RFCReceptor.
OtherData.FoliosStringNode 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.RFCPacStringTax identifier of the PAC through which the response to the cancellation request was sent.Valid RFC. Example: PPD101129EA3
OtherData.FechaStringDate the response to the cancellation request was sent
OtherData.RFCReceptorStringTax identifier of the document receiver to whom the response to the cancellation request was given.Valid receiver RFC.
MessagesStringGlobal invocation code. A value of 0 (zero) indicates the invocation was successful; otherwise it indicates the reason for the problem.Example: "0" "Certificate Error"
ResponseValueStringnullnull
CodeStringResponse code for the processSee the EstatusUUID table
DescriptionStringIndicates the description of the process response codeSee the EstatusUUID table
ErrorExceptionStringnullnull
EstatusUUID
------
CodeDescription
1000The request's response was received successfully
1001No cancellation requests are pending a response for the uuid
1002A response has already been received for the uuid's cancellation request
1003Seal Does Not Match the Receiver RFC
1004More than one cancellation request exists for the same uuid
1005The uuid is null or does not have the correct format
1006The maximum number of allowed requests was exceeded