Skip to main content

The Spanish version is the authoritative reference. View in Spanish

Invalidation of Folios

Through this event you can inform the Tax Authority that you did not use or will not use a folio or range of folios.

The parameters to send in the API are as follows:

Invalidation of folios (request)
ParameterParameter typeData typeDescriptionAllowed valuesLength
statusStringNumericEvent code991-2 characters
stampNumberIntegerNumericStamp number8 characters
estalishmentStringAlphanumericEstablishmentFill with leading zeros3 characters
dispatchPointStringAlphanumericDispatch pointFill with leading zeros3 characters
startNumberRangeStringAlphanumericStarting number of the document rangeThe maximum amount for invalidation is a range of up to 1000 DE numbers. Fill with leading zeros.7 characters
endNumberRangeStringAlphanumericEnding number of the document rangeFill with leading zeros7 characters
documentTypeStringNumericDocument type1: Electronic invoice 2: Electronic export invoice 3: Electronic import invoice 4: Electronic self-billed invoice 5: Electronic credit note 6: Electronic debit note 7: Electronic dispatch note 8: Electronic withholding receipt1-2 characters
reasonStringAlphanumericReason for the event5-500 characters
accountCodeStringNumericIssuer Tax ID

Request example

image-20240516-191634.png

Note: Remember that before using the method, you must authenticate within the Authorization tab.

For this method we use the body tab, x-ww-form-urlencoded section, 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.

Note: You can invalidate a maximum of one thousand numbers of the DE. Use zeros to complete the starting and ending numbers of the range.


Submission to the Tax Authority

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


Invalidation response

The API will respond to your request with one of the following codes:

Invalidation response codes
MessageCodeNote
Invalid stamp number for the testing environment.4051In the testing environment, the use of a test stamp is required.
Stamp number does not correspond to the taxpayer.4052The stamp number does not correspond to the RUC of the electronic invoicing taxpayer.
Stamp number does not correspond to the generation method.4053The stamp number does not correspond to the generation method for the electronic invoice.
Invalid establishment code.4054The establishment code does not correspond to a stamp of the generation method for electronic invoicing.
The dispatch point code is invalid for the provided stamp.4055The dispatch point code does not correspond to a stamp authorized for the taxpayer.
Document type does not correspond to the stamp number.4060The document type does not correspond to the authorized stamp number.
There is a DTE in the provided range.4065For the requested range, a DTE exists in SIFEN.
There is an invalidated number in the requested range.4066Within the range requested for invalidation, there are DE numbers already invalidated in SIFEN
The number of items in the range is invalid.4067The maximum number of items in the range must be less than or equal to 1000 (GEI005 - GEI005 less than or equal to 1000)
Range ending number is invalid.4068The range ending number (GEI006) must be greater than the range starting number (GEI005)

Response examples

If the result is successful, the API response is as follows:

image-20240507-013531.png

If the submission result is not successful, the API will respond with the following error message:

image-20240507-013601.png