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

# Listar Facturas

> Obtiene una lista paginada de facturas del tenant autenticado.

Devuelve una lista paginada de facturas emitidas, ordenadas por fecha de emision descendente.

## Headers

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

## Query Parameters

| Parametro | Tipo    | Req | Descripcion                                  |
| --------- | ------- | --- | -------------------------------------------- |
| `page`    | integer | No  | Numero de pagina (inicia en 0). Default: `0` |
| `size`    | integer | No  | Elementos por pagina (max 50). Default: `20` |

## Response

| Campo                | Tipo    | Descripcion                    |
| -------------------- | ------- | ------------------------------ |
| `success`            | boolean | `true` si exitoso              |
| `data.content`       | array   | Lista de facturas              |
| `data.page`          | integer | Pagina actual                  |
| `data.size`          | integer | Tamano de pagina               |
| `data.totalElements` | integer | Total de facturas              |
| `data.totalPages`    | integer | Total de paginas               |
| `data.first`         | boolean | `true` si es la primera pagina |
| `data.last`          | boolean | `true` si es la ultima pagina  |
| `timestamp`          | string  | Fecha/hora de la respuesta     |

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET "https://sandbox.cucu.bo/api/v1/invoices?page=0&size=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch(
    'https://sandbox.cucu.bo/api/v1/invoices?page=0&size=10',
    { 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',
      headers={'X-API-Key': 'YOUR_API_KEY'},
      params={'page': 0, 'size': 10}
  )
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "success": true,
    "data": {
      "content": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "invoiceNumber": 5,
          "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74",
          "state": "VALIDATED",
          "clientBusinessName": "EMPRESA DEMO S.R.L.",
          "amountTotal": 500.00,
          "emissionDate": "2026-02-11T12:00:00"
        }
      ],
      "page": 0,
      "size": 10,
      "totalElements": 1,
      "totalPages": 1,
      "first": true,
      "last": true
    },
    "timestamp": "2026-02-11T12:00:00"
  }
  ```
</ResponseExample>
