Skip to main content
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

X-API-Key
string
required
Tu API Key.
POST /api/v1/events/start

Request Body

posId
string
required
UUID del punto de venta.
branchId
string
required
UUID de la sucursal.
codigoMotivo
integer
required
Codigo de motivo: 1 = Corte de internet, 2 = Falla SIAT, 3 = Virus informatico, 4 = Otro.
descripcion
string
required
Descripcion del evento.
curl -X POST https://sandbox.cucu.bo/api/v1/events/start \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sk_test_MuLfItnPAScdhgrOsYn6Y4ur_gdMfCSMXtLciK9P8S8" \
  -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

Request Body

posId
string
required
UUID del punto de venta.
branchId
string
required
UUID de la sucursal.
eventoId
string
required
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: sk_test_MuLfItnPAScdhgrOsYn6Y4ur_gdMfCSMXtLciK9P8S8" \
  -d '{
    "posId": "660e8400-e29b-41d4-a716-446655440004",
    "branchId": "660e8400-e29b-41d4-a716-446655440003",
    "eventoId": "event-uuid-123"
  }'

Consultar Eventos

POST /api/v1/events

Request Body

posId
string
required
UUID del punto de venta.
branchId
string
required
UUID de la sucursal.
fechaEvento
string
required
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.

Verificar Conexion SIAT

GET /api/v1/events/check-connection
Verifica si el SIAT esta respondiendo. Util para decidir si iniciar contingencia.
{
  "success": true,
  "data": true
}