Ir al contenido

Listar documentos

GET
/documents
curl --request GET \
--url 'https://api.sudte.com/v1/documents?limit=20&type=01&status=draft&environment=00' \
--header 'Authorization: Bearer <token>'
limit
integer
default: 20 >= 1 <= 100
starting_after
string
emitter_id
string
type

CAT-002. Semana 1 implementa 01, 03, 05 y 06.

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
status
string
Allowed values: draft validated signed sending processed rejected contingency voided error
external_id
string
issued_from
string format: date
issued_to
string format: date
environment

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

string
Allowed values: 00 01
q
string
<= 100 characters

Búsqueda libre: número de control, código de generación, sello, nombre o documento del receptor

Página de documentos

Media type application/json
object
data
Array<object>
object
id
string
object
Allowed value: document
emitter_id
string
environment

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

string
Allowed values: 00 01
type

CAT-002. Semana 1 implementa 01, 03, 05 y 06.

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
status
string
Allowed values: draft validated signed sending processed rejected contingency voided error
external_id
string
generation_code

CodigoGeneracion

string
control_number

NumeroControl

string
reception_stamp

SelloRecibido

string
processed_at
string format: date-time
issued_at
string format: date-time
totals
object
subtotal
string
/^-?\d+(\.\d{1,8})?$/
iva
string
/^-?\d+(\.\d{1,8})?$/
total
string
/^-?\d+(\.\d{1,8})?$/
total_in_words
string
mh_response
object
code
string
message
string
observations
Array<string>
public_url

Consulta pública MH (QR)

string format: uri
pdf_url
string format: uri
json_url
string format: uri
created_at
string format: date-time
emitter_name
string
establishment

Código MH del establecimiento

string
point_of_sale

Código MH del punto de venta

string
receiver

Resumen del receptor para listados

object
name
string
document_type
string
document_number
string
nrc
string
email
string
related_documents
Array<object>
object
id
string
type

CAT-002. Semana 1 implementa 01, 03, 05 y 06.

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
generation_code
string
voided_at
string format: date-time
void

Datos de la invalidación si status=voided

object
reason_type
string
reason
string
replacement_document_id
string
reception_stamp
string
warnings

Advertencias no bloqueantes (p. ej. retención no aplicada por monto menor a $100)

Array<object>
object
code
string
message
string
events

Historial (creado, firmado, transmitido, reintento, sellado, rechazado, correo enviado, invalidado)

Array<object>
object
type
string
at
string format: date-time
message
string
has_more
boolean

Example

{
"data": [
{
"object": "document",
"environment": "00",
"type": "01",
"status": "draft",
"totals": {
"subtotal": "113.00",
"iva": "113.00",
"total": "113.00"
},
"related_documents": [
{
"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>

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
],
"mh": {
"codigoMsg": "example",
"descripcionMsg": "example",
"observaciones": [
"example"
]
}
}