Ir al contenido

Eventos de Operaciones Especiales del emisor (más recientes primero)

GET
/emitters/{id}/special-operations
curl --request GET \
--url 'https://api.sudte.com/v1/emitters/example/special-operations?limit=20' \
--header 'Authorization: Bearer <token>'
id
obligatorio
string
limit
integer
default: 20 >= 1 <= 100
starting_after
string

Eventos

Media type application/json
object
data
Array<object>
object
id
string
object
Allowed value: mh_event
kind
string
Allowed values: return special_operations
type

CAT-002: 17 Evento de Operaciones Especiales, 18 Evento de Retorno

string
Allowed values: 17 18
emitter_id
string
environment

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

string
Allowed values: 00 01
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
external_id
string | null
generation_code

CodigoGeneracion del evento

string
reception_stamp

SelloRecibido

string | null
processed_at
string | null format: date-time
event_at

Fecha y hora del evento (fecEmi/horEmi)

string format: date-time
establishment
string
point_of_sale
string
receiver

Retorno: receptor del documento (sección «documento»)

object
name
string | null
document_type
string | null
document_number
string | null
email
string | null
related_documents

Retorno: documentos a los que se aplica y lo retornado de cada uno

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
generation_code
string
control_number
string
issue_date
string format: date
returned

Montos por categoría (2 decimales). FE: gravado con IVA, como en el DTE

object
taxable

Ventas gravadas

string
/^-?\d+(\.\d{1,8})?$/
exempt
string
/^-?\d+(\.\d{1,8})?$/
non_subject
string
/^-?\d+(\.\d{1,8})?$/
purchases

Compras a sujetos excluidos (FSE)

string
/^-?\d+(\.\d{1,8})?$/
iva_withheld
string
/^-?\d+(\.\d{1,8})?$/
income_tax_withheld
string
/^-?\d+(\.\d{1,8})?$/
totals
object
total_non_subject
string
/^-?\d+(\.\d{1,8})?$/
total_exempt
string
/^-?\d+(\.\d{1,8})?$/
total_taxable

Gravado (en el retorno de FSE, compras)

string
/^-?\d+(\.\d{1,8})?$/
subtotal
string
/^-?\d+(\.\d{1,8})?$/
iva

Retorno de FE: totalIva informativo; EOE: IVA 13 %

string
/^-?\d+(\.\d{1,8})?$/
iva_withheld
string
/^-?\d+(\.\d{1,8})?$/
total_operation
string
/^-?\d+(\.\d{1,8})?$/
total

Retorno: totalPagar; EOE: total

string
/^-?\d+(\.\d{1,8})?$/
total_in_words
string
mh_response
object
code
string | null
message
string | null
observations
Array<string>
public_url

Consulta pública del MH (QR)

string format: uri
json_url
string format: uri
pdf_url
string format: uri
void_deadline

«Invalidar hasta»: 10.º día hábil del mes siguiente al sello (Cuadro 6, ADR 0004)

string | null format: date-time
voided_at
string | null format: date-time
void
object
status
string
reception_stamp
string | null
generation_code
string
warnings
Array<object>
object
code
string
message
string
path
string
events
Array<object>
object
type
string
at
string format: date-time
message
string
created_at
string format: date-time
has_more
boolean

Example

{
"data": [
{
"object": "mh_event",
"kind": "return",
"type": "17",
"environment": "00",
"status": "draft",
"related_documents": [
{
"type": "01",
"returned": {
"taxable": "113.00",
"exempt": "113.00",
"non_subject": "113.00",
"purchases": "113.00",
"iva_withheld": "113.00",
"income_tax_withheld": "113.00"
}
}
],
"totals": {
"total_non_subject": "113.00",
"total_exempt": "113.00",
"total_taxable": "113.00",
"subtotal": "113.00",
"iva": "113.00",
"iva_withheld": "113.00",
"total_operation": "113.00",
"total": "113.00"
}
}
]
}

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"
}
]
}