{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/invoicepdfs-com/json-schema/invoicepdfs-com-batch-response-schema.json",
  "title": "BatchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/invoicepdfs-com-batches-api-openapi.yml#/components/schemas/BatchResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/BatchOut"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "BatchOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "status": {
          "$ref": "#/$defs/BatchStatus"
        },
        "operation": {
          "type": "string",
          "title": "Operation"
        },
        "template_id": {
          "type": "string",
          "title": "Template Id"
        },
        "template_version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Template Version"
        },
        "total_items": {
          "type": "integer",
          "title": "Total Items"
        },
        "completed_items": {
          "type": "integer",
          "title": "Completed Items"
        },
        "failed_items": {
          "type": "integer",
          "title": "Failed Items"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "title": "Updated At"
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Completed At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "status",
        "operation",
        "template_id",
        "total_items",
        "completed_items",
        "failed_items",
        "created_at",
        "updated_at"
      ],
      "title": "BatchOut"
    },
    "BatchStatus": {
      "type": "string",
      "enum": [
        "queued",
        "processing",
        "completed",
        "failed",
        "cancelled"
      ],
      "title": "BatchStatus"
    }
  }
}