Overview
The /dte/invalidate route allows you to invalidate a document for your business by sending the required data. The document is processed and sent to Hacienda, and a response is provided indicating success or failure.
Request Details
URL: https://api.smartbill.lat/v1/dte/invalidate
HTTP Method: POST
Headers:
- Content-Type: application/json
- X-Smartbill-Public-Key: API Public key
- X-Smartbill-Private-Key: API private key
Structure
In the body of the request, you will need to include the structure for "body". This key acts as the container for the invoice details, ensuring that Smartbill can accurately process the request and generate the corresponding document.
document
UUID
Required
This refers to the “generation code” of the document you want to invalidate.
As you can see, the only information required is the document you wish to invalidate. Please note that the invalidation time may vary depending on the document type. However, the Smartbill API will return an error if the document is not eligible for invalidation. These timeframes are determined by Hacienda and not by Smartbill. An example of the error when the document cannot be invalidated is shown at the bottom.
Example
Below is an example of a request to invalidate a document by simply specifying the document you wish to invalidate:
Response
In this section, you can see two types of responses: a successful response and an error response. Both types share the same structure