{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/smartpdf-ru/json-schema/smartpdf-ru-photo-to-pdf-request-schema.json",
  "title": "PhotoToPdfRequest",
  "description": "«Фото в PDF»: page \"a4\" — лист A4 в ориентации фото, \"photo\" — страница по размеру фото; compact — до 2000 px,\nJPEG без EXIF; mode \"scan\" — «Скан документа». Число фото — по тарифу (MERGE_FILE_LIMITS).",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/smartpdf-ru-openapi.json#/components/schemas/PhotoToPdfRequest",
  "properties": {
    "webhook_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Url",
      "description": "https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)"
    },
    "file_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 50,
      "minItems": 1,
      "title": "File Ids"
    },
    "order": {
      "anyOf": [
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Order"
    },
    "page": {
      "type": "string",
      "enum": [
        "a4",
        "photo"
      ],
      "title": "Page",
      "default": "a4"
    },
    "compact": {
      "type": "boolean",
      "title": "Compact",
      "default": true
    },
    "grayscale": {
      "type": "boolean",
      "title": "Grayscale",
      "default": false
    },
    "mode": {
      "type": "string",
      "enum": [
        "photo",
        "scan"
      ],
      "title": "Mode",
      "default": "photo"
    },
    "scan_color": {
      "type": "string",
      "enum": [
        "bw",
        "color"
      ],
      "title": "Scan Color",
      "default": "bw"
    },
    "corners": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number",
                    "maximum": 1,
                    "minimum": 0
                  },
                  "type": "array",
                  "maxItems": 2,
                  "minItems": 2
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Corners"
    }
  },
  "type": "object",
  "required": [
    "file_ids"
  ]
}