Rápido Pagos
Electronic invoicing

Cancel an errored e-CF's e-NCF

POST
/ecf/{id}/cancellation

Cancels the e-NCF of an e-CF that ended errored before any send to the DGII, so the number ends in a cancellation. A workflow signs the ANECF and sends it to the DGII, and an ecf-cancellation.accepted or ecf-cancellation.rejected event reports the answer. A second request returns the same cancellation, unless the DGII rejected it or it ended errored before any send, and then it starts a new one. An e-CF that the DGII may hold is corrected with a credit note instead. The DGII has no ANECF service in certification.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key of the organization the request acts for, created in the dashboard and sent as "Authorization: Bearer ".

Path Parameters

id*string

The ID of the e-CF

Formatuuid
Example"5f2c8e1a-9b4d-4a7e-8c3f-2d6b0e9a1c47"

Response Body

The cancellation that the e-CF already has

application/json
  1. response

One ANECF, the cancellation of e-NCF numbers that no e-CF sent to the DGII

id*string
Formatuuid
Example"6d1f4b8e-3a2c-4e7d-9b5f-1c8a0e2d4f63"
type*string

TipoeCF of the cancelled numbers

Example"31"
Value in"31""32""33""34""41""43""44""45""46""47"
environment*string

The DGII environment of the cancelled numbers

Example"test"
Value in"test""certification""production"
firstNumber*integer

The first cancelled number, without the E and the type

Example501
lastNumber*integer

The last cancelled number

Example1000
ecfId*|

The e-CF whose e-NCF the cancellation cancels, or null for the tail of a range

Formatuuid
Examplenull
status*string

pending until the DGII answers the ANECF, then accepted, partially-accepted when the DGII cancels only part of the numbers, rejected, or errored when the ANECF could not be signed or sent

Value in"pending""accepted""partially-accepted""rejected""errored"
dgii*

The DGII's answer to the ANECF. For a partially-accepted cancellation its messages list the numbers the DGII did not cancel.

createdAt*string
Formatdate-time
Example"2026-10-20T14:05:12.000Z"
updatedAt*string
Formatdate-time
Example"2026-10-20T14:05:15.000Z"
Cancel an errored e-CF's e-NCF
curl -X POST 'https://api.rapidopagos.com/ecf/5f2c8e1a-9b4d-4a7e-8c3f-2d6b0e9a1c47/cancellation'
Example Response
{  "id": "6d1f4b8e-3a2c-4e7d-9b5f-1c8a0e2d4f63",  "type": "31",  "environment": "test",  "firstNumber": 501,  "lastNumber": 1000,  "ecfId": null,  "status": "pending",  "dgii": {    "messages": [      {        "code": "string",        "message": "string"      }    ]  },  "createdAt": "2026-10-20T14:05:12.000Z",  "updatedAt": "2026-10-20T14:05:15.000Z"}