{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/raiffeisen-ru/main/json-schema/raiffeisen-ru-statement-transfers-response-schema.json",
  "title": "StatementTransfersResponse",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/raiffeisen-ru-payroll-openapi.yml#/components/schemas/StatementTransfersResponse",
  "type": "object",
  "required": [
    "externalId",
    "transfers",
    "offset",
    "limit",
    "totalCount"
  ],
  "properties": {
    "externalId": {
      "$ref": "#/$defs/ExternalId"
    },
    "transfers": {
      "type": "array",
      "description": "Список переводов в ведомости cо статусами",
      "items": {
        "$ref": "#/$defs/TransferStatusDetails"
      }
    },
    "offset": {
      "$ref": "#/$defs/Offset"
    },
    "limit": {
      "$ref": "#/$defs/Limit"
    },
    "totalCount": {
      "$ref": "#/$defs/TotalCount"
    }
  },
  "$defs": {
    "Error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Код ошибки"
        },
        "message": {
          "type": "string",
          "description": "Текст ошибки"
        }
      }
    },
    "ExternalId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40,
      "pattern": "^[a-z0-9\\-]+$",
      "description": "Уникальный идентификатор ведомости во внешней системе"
    },
    "Limit": {
      "type": "integer",
      "description": "Максимальное количество элементов на странице",
      "minimum": 1,
      "maximum": 100
    },
    "Offset": {
      "type": "integer",
      "description": "Смещение от начала списка",
      "minimum": 0
    },
    "OrderNumber": {
      "type": "integer",
      "minimum": 1,
      "description": "Порядковый номер перевода в ведомости"
    },
    "TotalCount": {
      "type": "integer",
      "description": "Общее количество элементов"
    },
    "TransferExternalStatus": {
      "type": "string",
      "description": "Статус перевода",
      "enum": [
        "CHECKING",
        "DRAFT",
        "CREATED",
        "CREATED_WITH_WARNINGS",
        "PROCESSING",
        "EXECUTED",
        "ERROR",
        "DECLINED"
      ]
    },
    "TransferStatusDetails": {
      "type": "object",
      "required": [
        "orderNumber",
        "status"
      ],
      "properties": {
        "orderNumber": {
          "$ref": "#/$defs/OrderNumber"
        },
        "status": {
          "$ref": "#/$defs/TransferExternalStatus"
        },
        "message": {
          "type": "string",
          "minLength": 1,
          "description": "Причина отказа в случае статуса перевода DECLINED"
        },
        "errors": {
          "type": "array",
          "description": "Список ошибок в переводе, заполняется в случае статуса перевода ERROR",
          "items": {
            "$ref": "#/$defs/Error"
          }
        },
        "warnings": {
          "type": "array",
          "description": "Список предупреждений в переводе",
          "items": {
            "$ref": "#/$defs/Warning"
          }
        }
      }
    },
    "Warning": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Код предупреждения"
        },
        "message": {
          "type": "string",
          "description": "Текст предупреждения"
        }
      }
    }
  }
}