# List batches (/docs/api-reference/batches/list)

`GET https://druckling-nine.vercel.app/v1/batches`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |
| `status` | query | string | no |  |

## Response 200: OK

```json
{
  "type": "object",
  "properties": {
    "object": {
      "const": "list"
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "batch"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "canceled"
            ],
            "type": "string",
            "description": "`queued` → `running` → `completed` (ZIP ready), `failed` (nothing rendered, or the ZIP couldn't be built) or `canceled`."
          },
          "template": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "filename_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "counts": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              },
              "pending": {
                "type": "number"
              },
              "rendered": {
                "type": "number"
              },
              "failed": {
                "type": "number"
              },
              "canceled": {
                "type": "number"
              }
            },
            "required": [
              "total",
              "pending",
              "rendered",
              "failed",
              "canceled"
            ],
            "description": "Items by outcome; `pending` is queued or rendering."
          },
          "zip_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Signed download URL of the ZIP with every rendered file (PDFs, or XML e-invoices), once the batch completed and while the ZIP is retained."
          },
          "zip_size_bytes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "zip_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the ZIP is deleted (the file retention period)."
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "test_mode": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "status",
          "template",
          "version",
          "filename_pattern",
          "counts",
          "zip_url",
          "zip_size_bytes",
          "zip_expires_at",
          "error",
          "test_mode",
          "created_at",
          "finished_at"
        ]
      }
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "object",
    "data",
    "next_cursor"
  ]
}
```