# Batches

Many invoices in a single call, stamped in the background.

The guide, step by step: https://fiscalisto.com/en/docs/api/lotes.md

## Endpoints

- [Stamp a batch of invoices](https://fiscalisto.com/en/docs/api/referencia/lotes/create-invoice-batch.md): `POST /v1/invoice_batches`
- [List batches](https://fiscalisto.com/en/docs/api/referencia/lotes/list-invoice-batches.md): `GET /v1/invoice_batches`
- [Get a batch](https://fiscalisto.com/en/docs/api/referencia/lotes/get-invoice-batch.md): `GET /v1/invoice_batches/{id}`

## The InvoiceBatch object

A batch of up to 1,000 invoices stamped in the background.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"invoice_batch"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer (iss_…). |
| `name` | string | yes | The batch's name, for you. |
| `status` | `processing`, `completed` | yes | processing: stamping. completed: none are left to stamp. |
| `total` | integer | yes | How many invoices the batch has. (from -9007199254740991 to 9007199254740991) |
| `stamped` | integer | yes | How many were stamped. (from -9007199254740991 to 9007199254740991) |
| `failed` | integer | yes | How many weren't stamped (they keep their reason). (from -9007199254740991 to 9007199254740991) |
| `processing` | integer |  | How many are still processing. (from -9007199254740991 to 9007199254740991) |
| `created_at` | string (date-time) or null | yes | When it was created, ISO 8601 with Mexico City time (-06:00). |
| `completed_at` | string (date-time) or null | yes | When it finished. |
| `invoices` | array of object |  | Each invoice in the batch (not included in lists or events). |
| `invoices[].index` | integer | yes | Its position in invoices, from 0. (from -9007199254740991 to 9007199254740991) |
| `invoices[].reference` | string or null | yes | Your identifier for this invoice (your order number), up to 100 characters. |
| `invoices[].status` | `processing`, `valid`, `failed` | yes | processing, valid (stamped) or failed (not stamped; see error). |
| `invoices[].invoice` | string or null | yes | The stamped invoice (inv_…). |
| `invoices[].uuid` | string or null | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `invoices[].total` | number | yes | Total in the receipt's currency (Total). |
| `invoices[].error` | string or null | yes | Why it wasn't stamped. |
| `invoices[].warnings` | array of string |  | Only in the POST /v1/invoice_batches response: this invoice's warnings before stamping it, the same ones POST /v1/invoices would give. It is stamped as sent. |

Example:

```json
{
  "id": "bat_OufpKqnrvx9p4hMdcoapAo5aaGJEme7mXj",
  "object": "invoice_batch",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "name": "Cuotas de octubre",
  "status": "processing",
  "total": 2,
  "stamped": 0,
  "failed": 0,
  "created_at": "2026-10-24T10:15:42-06:00",
  "completed_at": null,
  "processing": 2,
  "invoices": [
    {
      "index": 0,
      "reference": "depto-101",
      "status": "processing",
      "invoice": null,
      "uuid": null,
      "total": 1740,
      "error": null
    },
    {
      "index": 1,
      "reference": "depto-102",
      "status": "processing",
      "invoice": null,
      "uuid": null,
      "total": 1740,
      "error": null
    }
  ]
}
```
