Skip to main content

The Spanish version is the authoritative reference. View in Spanish

Cancellation process

The API in Panamá offers the option to automate the document cancellation process. To do this, you must use the ChangeDocumentStatus method with the following parameters:

ChangeDocumentStatus for cancellation (request)
ParameterTypeDescriptionAllowed values
countryDocumentIdStringCountry-level tax identifier of the document, also known as CUFE, CLAVE, UUID, IDSee the Country Document ID Structure table
ReasonStringReason for the cancellationAlphanumeric characters.
StatusStringCancellation code: 4Numeric characters

Request example

image-20240221-230629.png

For this method we use the Params tab in Postman.

  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.
  4. Click Send.

If the event is generated successfully, it is then sent to the Tax Authority for validation and acceptance.


Response example

Since this is a synchronous method, the response is received immediately. If the result is successful, the API will respond as follows:

image-20240221-230943.png

To correctly interpret the response from the Tax Authority, take the following into account:

image-20240221-230917.png


The record of this request and its acceptance message will be logged in the notes of the document preview in Inbox.

image-20240311-214745.png

In addition, the XML of the event sent to the Tax Authority will be shown as an attachment.

image-20240311-214909.png

On the Inbox query screen, the document will be shown with the status Cancelled.

image-20240311-215018.png

If the result of the submission is NOT successful, the Inbox API will respond with the following error message:

{
"ErrorMessage": null,
"IsValid": false,
"StatusCode": "500",
"StatusDescription": null,
"StatusMessage": " El estado del documento no fue actualizado correctamente",
"XmlBase64Bytes": null,
"XmlBytes": null,
"XmlDocumentKey": null,
"XmlFileName": null,
"ResponseType": null,
"OtherData": null,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"Timestamp": null,
"Response": null,
"TaxDocument": null
}

The record of this request and the error message will be shown in the notes of the document preview within Inbox.

image-20240311-231355.png

If the document has been previously cancelled, the following response will be shown:

image-20240311-231513.png