Rápido Pagos
Electronic invoicing

Cancel the unused tail of an e-NCF range

POST
/ecf-sequence/{id}/cancellation

Cancels the numbers of the range from fromNumber to its last number that no cancellation took yet. No e-CF takes them from then on, and the range keeps its bounds, so a new range that holds one of them is refused. A workflow signs the ANECF and sends it to the DGII, and an ecf-cancellation.accepted, ecf-cancellation.partially-accepted or ecf-cancellation.rejected event reports the answer. A cancellation that the DGII rejected, or that ended errored before any send, leaves its numbers open, and a request from its first number cancels them again. 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 range

Formatuuid
Example"8a3d5f1c-2e7b-4c9a-b6d0-4f1e8a2c7b53"

Request Body

Where the cancelled tail starts

application/json
  1. body
fromNumber?integer

The first number to cancel, without the E and the type. It defaults to nextNumber and cannot be below it.

Range1 <= value <= 9999999999
Example501

Response Body

The cancellation, created pending

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 the unused tail of an e-NCF range
curl -X POST 'https://api.rapidopagos.com/ecf-sequence/8a3d5f1c-2e7b-4c9a-b6d0-4f1e8a2c7b53/cancellation' \  -H 'Content-Type: application/json' \  -d '{  "fromNumber": 501}'
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"}