Ir al contenido

Fijar el último consecutivo usado al migrar desde otro sistema (solo hacia adelante)

PUT
/emitters/{id}/numbering
curl --request PUT \
--url https://api.sudte.com/v1/emitters/example/numbering \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "environment": "00", "scope": "example", "type": "01", "year": 1, "last_value": 1, "updated_at": "2026-04-15T12:00:00Z", "reason": "example" }'

Para continuar la numeración que el emisor ya usó en otro sistema (Normativa §7.1.2: un correlativo no se repite entre los DTE sellados del ejercicio). Solo avanza: no permite fijar un valor menor al actual. environment debe ser el de la credencial. Alcance * si el emisor usa numeración centralizada o el código del establecimiento (M001…), y el tipo de documento (type, obligatorio: el consecutivo es por tipo de documento; los puntos de venta lo comparten). Queda en auditoría.

id
obligatorio
string
Media type application/json
object
environment
obligatorio

00 pruebas, 01 producción (CAT-001)

string
Allowed values: 00 01
scope
obligatorio

* = centralizada; o código MH del establecimiento (M001…)

string
type

Tipo de documento del consecutivo (cada tipo lleva el suyo en el establecimiento o en la empresa; obligatorio al fijarlo)

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
year
obligatorio
integer
last_value
obligatorio
integer format: int64
<= 999999999999999
updated_at
string format: date-time
reason
obligatorio
string
>= 10 characters

Consecutivo

Media type application/json
object
environment

00 pruebas, 01 producción (CAT-001)

string
Allowed values: 00 01
scope

* = centralizada; o código MH del establecimiento (M001…)

string
type

Tipo de documento del consecutivo (cada tipo lleva el suyo en el establecimiento o en la empresa; obligatorio al fijarlo)

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
year
integer
last_value
integer format: int64
<= 999999999999999
updated_at
string format: date-time

Example

{
"environment": "00",
"type": "01"
}

Error (RFC 9457)

Media type application/problem+json
object
type
string format: uri
title
string
status
integer
detail
string
instance
string
request_id
string
errors
Array<object>
object
path
string
message
string
mh
object
codigoMsg
string
descripcionMsg
string
observaciones
Array<string>
blocking_documents

Invalidación rechazada por AV 44: NC/ND vigentes (o pendientes) que ajustan el documento; invalídelas primero

Array<object>
object
id
string
type

CAT-002. Implementados: todos (01, 03, 04, 05, 06, 07, 08, 09, 11, 14 y 15)

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
control_number
string
generation_code
string
status

discarded: el emisor abandonó un documento sin sello (rechazado por el MH) con POST /documents/{id}/discard; conserva su historial, ya no se transmite ni se corrige y, si discard.number_released, su número de control lo toma el siguiente documento del mismo alcance y año.

string
Allowed values: draft validated signed sending processed rejected contingency voided error discarded
issue_date
string format: date

Example

{
"blocking_documents": [
{
"type": "01",
"status": "draft"
}
]
}

Error (RFC 9457)

Media type application/problem+json
object
type
string format: uri
title
string
status
integer
detail
string
instance
string
request_id
string
errors
Array<object>
object
path
string
message
string
mh
object
codigoMsg
string
descripcionMsg
string
observaciones
Array<string>
blocking_documents

Invalidación rechazada por AV 44: NC/ND vigentes (o pendientes) que ajustan el documento; invalídelas primero

Array<object>
object
id
string
type

CAT-002. Implementados: todos (01, 03, 04, 05, 06, 07, 08, 09, 11, 14 y 15)

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
control_number
string
generation_code
string
status

discarded: el emisor abandonó un documento sin sello (rechazado por el MH) con POST /documents/{id}/discard; conserva su historial, ya no se transmite ni se corrige y, si discard.number_released, su número de control lo toma el siguiente documento del mismo alcance y año.

string
Allowed values: draft validated signed sending processed rejected contingency voided error discarded
issue_date
string format: date

Example

{
"blocking_documents": [
{
"type": "01",
"status": "draft"
}
]
}

Error (RFC 9457)

Media type application/problem+json
object
type
string format: uri
title
string
status
integer
detail
string
instance
string
request_id
string
errors
Array<object>
object
path
string
message
string
mh
object
codigoMsg
string
descripcionMsg
string
observaciones
Array<string>
blocking_documents

Invalidación rechazada por AV 44: NC/ND vigentes (o pendientes) que ajustan el documento; invalídelas primero

Array<object>
object
id
string
type

CAT-002. Implementados: todos (01, 03, 04, 05, 06, 07, 08, 09, 11, 14 y 15)

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
control_number
string
generation_code
string
status

discarded: el emisor abandonó un documento sin sello (rechazado por el MH) con POST /documents/{id}/discard; conserva su historial, ya no se transmite ni se corrige y, si discard.number_released, su número de control lo toma el siguiente documento del mismo alcance y año.

string
Allowed values: draft validated signed sending processed rejected contingency voided error discarded
issue_date
string format: date

Example

{
"blocking_documents": [
{
"type": "01",
"status": "draft"
}
]
}