Ir al contenido

Bitácora de la caja (auditoría)

GET
/emitters/{id}/cash-events
curl --request GET \
--url 'https://api.sudte.com/v1/emitters/example/cash-events?limit=20' \
--header 'Authorization: Bearer <token>'

Lista los eventos de la bitácora de la caja (cash_event: cajón abierto con motivo, líneas quitadas o rebajadas, órdenes vaciadas, cierres sin arqueo), más recientes primero, para auditoría desde el portal. Inmutable (solo se agrega por sync/push). Filtros por tipo, caja/sesión, usuario y fechas.

id
obligatorio
string
type
string

Tipo de evento (drawer_open, line_removed, line_discounted, order_voided…)

session_id
string
establishment
string

Código MH de la sucursal (M001…)

app_user_id
string
from
string format: date-time

Desde (inclusive)

to
string format: date-time

Hasta (inclusive)

limit
integer
default: 20 >= 1 <= 100
starting_after
string

Eventos

Media type application/json
object
data
Array<object>

Evento de la bitácora de la caja (inmutable; se sube por sync/push y se consulta por GET /cash-events)

object
id
string
<= 64 characters
object
Allowed value: cash_event
emitter_id
string
type

Drawer_open | line_removed | line_discounted | order_voided | …

string
establishment
string | null
point_of_sale
string | null
session_id
string | null
app_user_id

Quién

string | null
authorized_by

Quién autorizó (si aplica)

string | null
reason
string | null
amount

Monto (si aplica: rebaja, orden vaciada)

string
event_at
string format: date-time
seq
integer format: int64
origin_device_id
string | null
created_at
string format: date-time
has_more
boolean
next_cursor
string

Example

{
"data": [
{
"object": "cash_event"
}
]
}

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