{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rombik-app/json-schema/rombik-app-batch-response-schema.json",
  "title": "BatchResponse",
  "description": "Відповідь у режимі ?json=1.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rombik-app-openapi.yml#/components/schemas/BatchResponse",
  "type": "object",
  "properties": {
    "format": {
      "type": "string"
    },
    "bundle": {
      "type": "string",
      "enum": [
        "pdf",
        "zip"
      ]
    },
    "count": {
      "type": "integer",
      "description": "Скільки елементів надіслано"
    },
    "rendered": {
      "type": "integer",
      "description": "Скільки елементів успішно"
    },
    "credits": {
      "type": "integer",
      "description": "Скільки експортів зараховано (= кількості успішних елементів)"
    },
    "creditsLeft": {
      "type": "integer",
      "description": "Скільки експортів лишилось цього місяця (назва поля — для сумісності)"
    },
    "filename": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "description": "присутнє лише якщо ok=false"
          }
        }
      }
    },
    "encoding": {
      "type": "string",
      "enum": [
        "base64"
      ]
    },
    "content": {
      "type": "string",
      "description": "Bundle (pdf|zip) у base64"
    }
  }
}