Documentation Index
Fetch the complete documentation index at: https://docs.cucu.bo/llms.txt
Use this file to discover all available pages before exploring further.
Cuando el SIAT no responde, puedes activar un evento de contingencia para seguir emitiendo facturas offline. Las facturas emitidas en contingencia se envian al SIAT cuando el servicio se restablece.
Iniciar Evento de Contingencia
POST /api/v1/events/start
| Parametro | Ubicacion | Tipo | Req | Descripcion |
|---|
X-API-Key | Header | string | Si | Tu API Key |
posId | Body | string | Si | UUID del punto de venta |
branchId | Body | string | Si | UUID de la sucursal |
codigoMotivo | Body | integer | Si | Codigo de motivo: 1 = Corte de internet, 2 = Falla SIAT, 3 = Virus informatico, 4 = Otro |
descripcion | Body | string | Si | Descripcion del evento |
curl -X POST https://sandbox.cucu.bo/api/v1/events/start \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"posId": "660e8400-e29b-41d4-a716-446655440004",
"branchId": "660e8400-e29b-41d4-a716-446655440003",
"codigoMotivo": 2,
"descripcion": "SIAT no responde desde las 10:00"
}'
Respuesta (200):
{
"success": true,
"data": {
"id": "event-uuid-123",
"posId": "660e8400-e29b-41d4-a716-446655440004",
"codigoMotivo": 2,
"descripcionMotivo": "Falla SIAT",
"fechaInicio": "2026-02-11T10:00:00",
"fechaFin": null,
"cufdEvento": "BQW5FZ...",
"codigoEventoSiat": 12345,
"finalizado": false,
"createdAt": "2026-02-11T10:00:00"
}
}
Finalizar Evento de Contingencia
POST /api/v1/events/end
| Parametro | Ubicacion | Tipo | Req | Descripcion |
|---|
X-API-Key | Header | string | Si | Tu API Key |
posId | Body | string | Si | UUID del punto de venta |
branchId | Body | string | Si | UUID de la sucursal |
eventoId | Body | string | Si | UUID del evento a finalizar |
curl -X POST https://sandbox.cucu.bo/api/v1/events/end \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"posId": "660e8400-e29b-41d4-a716-446655440004",
"branchId": "660e8400-e29b-41d4-a716-446655440003",
"eventoId": "event-uuid-123"
}'
Consultar Eventos
POST /api/v1/events
| Parametro | Ubicacion | Tipo | Req | Descripcion |
|---|
X-API-Key | Header | string | Si | Tu API Key |
posId | Body | string | Si | UUID del punto de venta |
branchId | Body | string | Si | UUID de la sucursal |
fechaEvento | Body | string | Si | Fecha a consultar (formato YYYY-MM-DD) |
Evento Activo
GET /api/v1/events/active/{posId}
Obtiene el evento de contingencia activo (no finalizado) para un punto de venta.
| Parametro | Ubicacion | Tipo | Req | Descripcion |
|---|
X-API-Key | Header | string | Si | Tu API Key |
posId | Path | string | Si | UUID del punto de venta |
Verificar Conexion SIAT
GET /api/v1/events/check-connection
Verifica si el SIAT esta respondiendo. Util para decidir si iniciar contingencia.
| Parametro | Ubicacion | Tipo | Req | Descripcion |
|---|
X-API-Key | Header | string | Si | Tu API Key |
{
"success": true,
"data": true
}