> ## 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.

# Estado de Factura

> Verifica el estado actual de una factura ante el SIAT.

Consulta el estado mas reciente de una factura directamente en el SIAT. Util para verificar si una factura fue procesada correctamente o si cambio de estado.

## Path Parameters

| Parametro | Tipo   | Req | Descripcion        |
| --------- | ------ | --- | ------------------ |
| `id`      | string | Si  | UUID de la factura |

## Headers

| Parametro   | Tipo   | Req | Descripcion |
| ----------- | ------ | --- | ----------- |
| `X-API-Key` | string | Si  | Tu API Key  |

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET https://sandbox.cucu.bo/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch(
    'https://sandbox.cucu.bo/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status',
    { headers: { 'X-API-Key': 'YOUR_API_KEY' } }
  );
  const data = await response.json();
  ```

  ```python Python theme={"system"}
  import requests

  response = requests.get(
      'https://sandbox.cucu.bo/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status',
      headers={'X-API-Key': 'YOUR_API_KEY'}
  )
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "success": true,
    "data": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "invoiceNumber": 5,
      "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74",
      "state": "VALIDATED",
      "siatCode": 908,
      "siatDescription": "FACTURA VALIDADA",
      "emissionType": "NORMAL",
      "lastChecked": "2026-02-11T14:30:00"
    },
    "timestamp": "2026-02-11T14:30:00"
  }
  ```
</ResponseExample>

## Estados posibles

| Estado        | Descripcion                                      |
| ------------- | ------------------------------------------------ |
| `PENDING`     | Factura creada, pendiente de envio al SIAT       |
| `VALIDATED`   | Validada exitosamente por el SIAT                |
| `REJECTED`    | Rechazada por el SIAT (ver codigo de error)      |
| `CANCELLED`   | Anulada                                          |
| `CONTINGENCY` | Emitida en modo contingencia, pendiente de envio |
