{
  "openapi": "3.0.2",
  "info": {
    "title": "Prodly V3",
    "version": "3.0.10",
    "description": "Публичный API для поставщиков\n\nAPI работает в асинхронном режиме. На все запросы с префиксом `/request/` в ответ возвращается индентификатор запроса `requestID`. В дальнейшем, этот индентификатор можно использовать для получения информации о состоянии запроса.\n\nПри передаче данных методом PUT предпочтительно использовать формат данных NDJSON. Формат NDJSON позволяет не парсить большие объекты данных одновременно, а обрабатывать записи построчно, с разделителем строк \"\\n\". Подробно формат описан на страничке [https://github.com/ndjson/ndjson-spec](https://github.com/ndjson/ndjson-spec). Если вы передаёте данные в NDJSON, то не забывайте установить соответствующий Content-Type запроса (Content-Type: application/x-ndjson).\n\nРезультатом выполнения запроса методом PUT является JSON-объект вида `{ \"requestId\": \"XXX-XXX-XXX\" }`, где `XXX-XXX-XXX` - это идентификатор запроса в базе данных Prodly. Выполняя GET-запрос `/request/XXX-XXX-XXX` вы можете получить данные о текущем состоянии дел с запросом (результат выплднения, ошибки, возникшие при разборе данных и т.д.). Подробно формат ответа на GET-запрос `/request` описан в разделе \"Результат выполнения\".\n\n",
    "contact": {
      "name": "Prodly team",
      "url": "https://prodly.ru",
      "email": "info@prodly.ru"
    }
  },
  "servers": [
    {
      "url": "https://api-stage.prodly.ru/v3",
      "description": "Сервер для тестирования"
    },
    {
      "url": "https://api.prodly.ru/v3",
      "description": "Основой сервер"
    }
  ],
  "paths": {
    "/request/clients.post": {
      "summary": "Обновление контрагентов",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ClientCard"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ClientCard"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Клиенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "clients.post",
        "summary": "Обновление клиентов"
      },
      "parameters": [
        {
          "name": "branch",
          "description": "",
          "schema": {
            "type": "string"
          },
          "in": "query",
          "required": true
        }
      ]
    },
    "/request/orders.post": {
      "summary": "Обновление заказов",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VendorOrderIN"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VendorOrderIN"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Заказы"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "orders.post",
        "summary": "Обновление заказов",
        "description": "Внимание! При отмене заказа на стороне поставщика необходимо передавать в поле vendorStatus \"decline\", а в поле vendorMessage - одну из причин отмены заказа: \n1. Дебиторская задолженность у КА;\n2. Нет товара на складе;\n3. Заказ меньше мин. суммы;\n4. Нет договора с КА;\n5. Телефон клиента недоступен;\n6. Заказ сделан по ошибке;\n7. Другое"
      }
    },
    "/request/products.post": {
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductCard"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductCard"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Товары"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "products.post",
        "summary": "Загрузка номенклатуры",
        "description": "Загрузка справочника товарной номенклатуры"
      }
    },
    "/request/products.patch": {
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductBranchCard"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductBranchCard"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Товары"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "products.patch",
        "summary": "Обновление товаров",
        "description": "Загрузка информации по ценам/остаткам в филиалах"
      }
    },
    "/request/actions.post": {
      "summary": "Обновление промо-акций.",
      "description": "Обновление промо-акций. \nВнимание! Если Вы используете формат данных NDJSON, то укажите признак ndJson = true.",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PromoCard"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PromoCard"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Маркетинг"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "actions.post",
        "summary": "Загрузка акций",
        "description": "Загрузка и обновление маркетинговых акций. \n\nВнимание! \n* Загрузка акций по частям не допускается, так как при выполнении запроса ранние записи удаляются. \n* Акции discount со скидкой менее 5% не отображаются в разделе скидок, акция не подсвечивается, но цена на товар расчитывается с применением скидки.\n* Акции без указанного клиента будут доступны несопоставленным пользователям."
      }
    },
    "/request/price.post": {
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VendorPrice"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VendorPrice"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Цены"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "price.post",
        "summary": "Персонализированные цены",
        "description": "Загрузка персонализированных цен. Внимание! Обновление цен по частям не допускается. При выполнении запроса ранние записи удаляются."
      }
    },
    "/request/{requestID}": {
      "summary": "Получение состояния запроса",
      "get": {
        "tags": [
          "Результат выполнения"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestStatus"
          },
          "404": {
            "description": "Запрос не найден"
          }
        },
        "operationId": "request.status",
        "summary": "Результат",
        "description": "Возвращает состояние отправленного ранее запроса. Рекомендуемая частота опроса - не чаще двух раз в минуту"
      },
      "parameters": [
        {
          "name": "requestID",
          "description": "Идентификатор запроса",
          "schema": {
            "type": "string"
          },
          "in": "path",
          "required": true
        }
      ]
    },
    "/request/wbl.post": {
      "summary": "Ограничения на товары",
      "description": "Обновление чёрно-белых списков для товаров",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WBLRec"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WBLRec"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Товары",
          "Клиенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Ограничения на товары",
        "description": "Загрузка чёрно-белых списков"
      }
    },
    "/request/currencies.post": {
      "summary": "Отправка курсов валют",
      "description": "Обновление курсов валют поставщика",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CurrencyRate"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CurrencyRate"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Валюты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Отправка курсов валют"
      }
    },
    "/request/certificates.post": {
      "summary": "Загрузка сертификатов товаров",
      "description": "Обновление ссылок на сертификаты качества ",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductCertificates"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductCertificates"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Товары"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Обновление сертификатов"
      }
    },
    "/messages": {
      "summary": "Обмен сообщениями",
      "description": "Внимание! Раздел находится в разработке.",
      "get": {
        "tags": [
          "Сообщения"
        ],
        "parameters": [
          {
            "name": "subject",
            "description": "Фильтр по теме сообщения (точное совпадение)",
            "schema": {
              "type": "string"
            },
            "in": "query"
          },
          {
            "name": "state",
            "description": "Фильтр по статусу сообщений. Если не указано, то `new`",
            "schema": {
              "enum": [
                "new",
                "sent",
                "done",
                "error"
              ],
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "skip",
            "description": "Пропустить первые сообщения. Используется для постраничного получения сообщений.",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          },
          {
            "name": "limit",
            "description": "Сколько сообщений получить за один раз.\nПо умолчанию `100`. \nМаскимальное значение `100`",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/messageListResponse"
          }
        },
        "security": [
          {
            "X-Vendor": [],
            "X-Secret": [],
            "branch": []
          }
        ],
        "operationId": "messages.list",
        "summary": "Получить входящие сообщения",
        "description": "Возвращает новые сообщения отправленные в филиал поставщика"
      }
    },
    "/request/reserves.post": {
      "summary": "Резерв товара для клиентов",
      "description": "Добавление кастомных остатков товара для клиентов",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VendorReserveIn"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VendorReserveIn"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Резерв"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Резерв товара для клиентов"
      }
    },
    "/request/stocks.post": {
      "summary": "Обновление остатков",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Товары"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Обновление остатков"
      }
    },
    "/post/action": {
      "summary": "[OBSOLETE] Удаление акций",
      "delete": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoDeleteReq"
              }
            }
          },
          "required": true
        },
        "tags": [
          "Маркетинг"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoDeleteRes"
                }
              }
            },
            "description": "Поле deleted содержит результат выполнения операции (штатно: 1)"
          }
        },
        "summary": "Удаление акции"
      }
    },
    "/post/messages/{messageID}": {
      "summary": "Обмен сообщениями",
      "description": "Внимание! Раздел находится в разработке. ",
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageCard"
              }
            }
          },
          "required": true
        },
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "код 200 говорит об успехе операции"
          }
        },
        "operationId": "messages.post",
        "summary": "Обновление сообщения",
        "description": "Обновение статуса или ответа на сообщение"
      },
      "parameters": [
        {
          "name": "messageID",
          "description": "Идентификатор сообщения",
          "schema": {
            "type": "string"
          },
          "in": "path",
          "required": true
        }
      ]
    },
    "/request/client.post": {
      "summary": "Точечное обновление контрагента",
      "description": "",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Client.Post.Object"
              }
            },
            "application/x-ndjson": {
              "schema": {
                "$ref": "#/components/schemas/Client.Post.Object"
              }
            }
          },
          "required": true
        },
        "tags": [
          "Клиенты"
        ],
        "parameters": [
          {
            "name": "x-vendor",
            "description": "Код поставщика",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          },
          {
            "name": "x-secret",
            "description": "Секретный ключ",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          },
          {
            "name": "branch",
            "description": "Код филиала",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          },
          {
            "name": "client",
            "description": "Код контрагента, кодированный в base64",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ApiResponse"
          }
        },
        "summary": "Точечное обновление контрагента",
        "description": "Запрос состоит из 4 необязательных блоков:\n\n* client - ИНН, адрес, тип и т.д.\n* prices - массив цен, матриц, скидок клиента\n* actions - акции (акции будут привязаны к персональному тегу контрагента)\n* plakat - объект плаката (плакат будет привязан к персональному тегу контрагента)\n\n"
      }
    },
    "/request/actions.delete": {
      "summary": "Удалиние акций",
      "description": "",
      "put": {
        "requestBody": {
          "description": "Список идентификаторов акций",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "examples": {
                "Массив строковых идентификаторов": {
                  "value": [
                    "action 1",
                    "action 2",
                    "action 5"
                  ]
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Маркетинг"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ApiResponse"
          }
        },
        "summary": "Пакетное удаление акций",
        "description": "Пакетное удаление промоакций. Получает массив идентификаторов или имен документов промоакций и удаляет их. Возвращает идентификатор операции RequestID. "
      }
    },
    "/request/firms.post": {
      "summary": "Обновление юридических лиц",
      "description": "Запрос на обновление справочника юр.лиц ПОСТАВЩИКА",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Firm.Object"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Firm.Object"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Клиенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Обновление юридических лиц",
        "description": "Обновление юридических лиц (фирм) ПОСТАВЩИКА."
      },
      "parameters": [
        {
          "name": "x-vendor",
          "description": "Код поставщика",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "x-secret",
          "description": "Секретный код ",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "branch",
          "description": "Код филиала",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        }
      ]
    },
    "/request/debts.post": {
      "summary": "Обновление дебиторской задолженности клиентов",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ClientDebet"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ClientDebet"
                }
              }
            }
          }
        },
        "tags": [
          "Клиенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "debts.post",
        "summary": "обновление дебиторской задолженности клиентов",
        "description": "Обновление дебиторской задолженности клиентов"
      },
      "parameters": [
        {
          "name": "x-vendor",
          "description": "Код поставщика",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "x-secret",
          "description": "Секретный код ",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "branch",
          "description": "Код филиала",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        }
      ]
    },
    "/request/tasks.get": {
      "summary": "Получение задач с платформы",
      "get": {
        "tags": [
          "Агенты"
        ],
        "parameters": [
          {
            "name": "branch",
            "description": "Код филиала",
            "schema": {
              "$ref": "#/components/schemas/BranchEnum"
            },
            "in": "query",
            "required": true
          },
          {
            "name": "deep",
            "description": "Глубина в часах. По-умолчанию - 72 часа. Максимум - 72 часа.",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          },
          {
            "name": "source",
            "description": "Идентификатор УС поставщика",
            "schema": {
              "type": "string"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/responseTasks"
          }
        },
        "operationId": "Tasks.Get",
        "summary": "Получение задач с платформы",
        "description": "Функционал торгового агента подключается отдельно"
      }
    },
    "/request/tasks.post": {
      "summary": "Отправка задач на платформу",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trader.Task.Object"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trader.Task.Object"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Агенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Отправка задач на платформу",
        "description": "Функционал торгового агента подключается отдельно"
      },
      "parameters": [
        {
          "name": "x-vendor",
          "description": "Код поставщика",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "x-secret",
          "description": "Секретный код поставщика",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "branch",
          "description": "Код филиала",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        }
      ]
    },
    "/request/visits.get": {
      "summary": "Получение визитов с платформы",
      "get": {
        "tags": [
          "Агенты"
        ],
        "parameters": [
          {
            "name": "branch",
            "description": "Код филиала",
            "schema": {
              "$ref": "#/components/schemas/BranchEnum"
            },
            "in": "query",
            "required": true
          },
          {
            "name": "deep",
            "description": "Глубина в часах. По-умолчанию - 72 часа. Максимум - 72 часа.",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/responseVisits"
          }
        },
        "operationId": "Visits.Get",
        "summary": "Получение визитов с платформы",
        "description": "Функционал торгового агента подключается отдельно"
      }
    },
    "/request/plakats.post": {
      "summary": "Плакат",
      "description": "Создание записей plakats.",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Plakat"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Plakat"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Маркетинг"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Плакат",
        "description": "Добавление записей плакатов."
      }
    },
    "/request/managers.post": {
      "summary": "функционал торгового агента подключается отдельно",
      "description": "Обновление справочника менеджеров",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Manager.Object"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Manager.Object"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Агенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Обновление справочника менеджеров (торговых агентов)",
        "description": "Функционал торгового агента подключается отдельно"
      },
      "parameters": [
        {
          "name": "x-vendor",
          "description": "Код поставщика",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "x-secret",
          "description": "Секретный код",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        },
        {
          "name": "branch",
          "description": "Код филиала",
          "schema": {
            "type": "string"
          },
          "in": "header",
          "required": true
        }
      ]
    },
    "/request/plans.post": {
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SalePlan"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Маркетинг"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "operationId": "plans.post",
        "summary": "План продаж",
        "description": "План продаж"
      }
    },
    "/request/returns.post": {
      "put": {
        "requestBody": {
          "description": "Массив данных обработанных заявок на возврат товаров",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ReturnVendorItem"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ReturnVendorItem"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Возвраты"
        ],
        "parameters": [
          {
            "name": "x-vendor",
            "description": "Код поставщика",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          },
          {
            "name": "x-secret",
            "description": "Секретный код",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ApiResponse"
          }
        },
        "summary": "Отправка данных по заявкам на возврат товара"
      }
    },
    "/request/resources.post/{fileName}": {
      "summary": "Загрузка ресурсов",
      "description": "Загрузка ресурсов",
      "put": {
        "requestBody": {
          "content": {
            "image/jpeg": {},
            "image/png": {},
            "application/pdf": {}
          },
          "required": true
        },
        "tags": [
          "Товары"
        ],
        "parameters": [
          {
            "name": "resourceType",
            "description": "Допустимые значения:\nimage - изображение товара. \ncertificate - документ сертификата",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ApiResponse"
          }
        },
        "summary": "Загрузка ресурсов",
        "description": "Загрузка ресурсов - изображений к товарам, сертификатов качества"
      },
      "parameters": [
        {
          "name": "fileName",
          "description": "Имя файла с расширением.\n\nдля image допустимые расширения: png, jpg, jpeg\n\nдля certificate: png, jpg, jpeg, pdf",
          "schema": {
            "type": "string"
          },
          "in": "path",
          "required": true
        }
      ]
    },
    "/request/agentsCash.get": {
      "summary": "Инкассация",
      "get": {
        "tags": [
          "Агенты"
        ],
        "parameters": [
          {
            "name": "branch",
            "description": "Код филиала",
            "schema": {
              "$ref": "#/components/schemas/BranchEnum"
            },
            "in": "query",
            "required": true
          },
          {
            "name": "state",
            "description": "Статус. По умолчанию - 'new'.",
            "schema": {
              "$ref": "#/components/schemas/OrderState"
            },
            "in": "query"
          },
          {
            "name": "deep",
            "description": "Глубина в часах. По-умолчанию - 72 часа. Максимум - 72 часа.",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentsCashResponse"
          }
        },
        "summary": "Инкассация. Получении с платформы информации о наличных, полученных агентом",
        "description": "Функционал торгового агента подключается отдельно"
      }
    },
    "/request/returns.get": {
      "summary": "Возвраты поставщику",
      "get": {
        "tags": [
          "Возвраты"
        ],
        "parameters": [
          {
            "name": "branch",
            "description": "Филиал поставщика",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": true
          },
          {
            "name": "x-vendor",
            "description": "Код поставщика",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          },
          {
            "name": "x-secret",
            "description": "Секретный код",
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true
          },
          {
            "name": "state",
            "description": "Статус. По умолчанию - 'new'.",
            "schema": {
              "$ref": "#/components/schemas/OrderState"
            },
            "in": "query"
          },
          {
            "name": "deep",
            "description": "Глубина в часах. По-умолчанию - 72 часа. Максимум - 72 часа.",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/responseReturns"
          }
        },
        "summary": "Получить заявки на возвраты товаров"
      }
    },
    "/request/mustlist.post/": {
      "summary": "функционал торгового агента подключается отдельно",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MustList"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MustList"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Агенты"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RequestResponse"
          }
        },
        "summary": "Добавление маст-листов и плакатов (v2)",
        "description": "Функционал торгового агента подключается отдельно"
      }
    },
    "/orders": {
      "summary": "Работа с заказами",
      "get": {
        "tags": [
          "Заказы"
        ],
        "parameters": [
          {
            "name": "branch",
            "description": "Код филиала",
            "schema": {
              "$ref": "#/components/schemas/BranchEnum"
            },
            "in": "query",
            "required": true
          },
          {
            "name": "state",
            "description": "Статус. По умолчанию - 'new'.",
            "schema": {
              "$ref": "#/components/schemas/OrderState"
            },
            "in": "query"
          },
          {
            "name": "deep",
            "description": "Глубина в часах. По-умолчанию - 72 часа. Максимум - 168 часов (неделя).",
            "schema": {
              "type": "integer"
            },
            "in": "query"
          },
          {
            "name": "type",
            "description": "Тип заказа, необязательный. Возможные значения:\n- \"prodly\" для получения заказов, созданных клиентами\n- \"agent\" для получения заказов, созданных торговыми агентами",
            "schema": {
              "type": "string"
            },
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/responseOrders"
          }
        },
        "operationId": "Orders.Get",
        "summary": "Получение заказов",
        "description": "Возвращает массив заказов в состоянии state.\nВ результате будет не более 100 заказов. Для того, чтобы получить следующие, надо обработать полученные и отправить результат обработки на сервер Prodly. Обработка не подразумевает отправку заказа покупателю, вы можете просто сменить заказу статус на `sent` - отправлен поставщику. Для того, чтобы получить заказы, отменённые клиентом, нужно выполнить запрос с параметром state=canceled. Рекомендуется регулярно (обычно 1 раз в 10 мин) выполнять такие запросы, иначе заказы, которые клиент не хочет получать, могут уйти в набор."
      }
    },
    "/request/visits.post": {
      "summary": "Обновление данных о визите на платформе",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trader.Visit"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trader.Visit"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Агенты"
        ],
        "responses": {
          "200": {
            "description": "код 200 говорит об успехе операции"
          }
        },
        "summary": "Обновление данных о визите на платформе",
        "description": "Функционал торгового агента подключается отдельно"
      }
    },
    "/request/agentsCash.post": {
      "summary": "Инкассация",
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trader.AgentsCash"
                }
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trader.AgentsCash"
                }
              }
            }
          },
          "required": true
        },
        "tags": [
          "Агенты"
        ],
        "responses": {
          "200": {
            "description": "код 200 говорит об успехе операции"
          }
        },
        "summary": "Инкассация. Отправка на платформу информации о проведении платежкй",
        "description": "Функционал торгового агента подключается отдельно"
      }
    }
  },
  "components": {
    "schemas": {
      "ProductCard": {
        "title": "Root Type for ProductCard",
        "description": "Карточка товара",
        "required": [
          "meta",
          "code",
          "country",
          "name"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Уникальный код товара",
            "type": "string"
          },
          "name": {
            "description": "Наименование товара",
            "type": "string"
          },
          "description": {
            "description": "Описание для отображения на сайте",
            "type": "string"
          },
          "brand": {
            "description": "Торговая марка",
            "type": "string"
          },
          "producer": {
            "description": "Наименование производителя",
            "type": "string"
          },
          "images": {
            "description": "Массив ссылок на изображения товара. Первый элемент в массиве будет использован как основной",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "description": "Страна происхождения в формате ISO-кода.\nhttps://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes",
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/ProductMeta",
            "description": "Обязательная информация о товаре",
            "properties": {
              "unit": {
                "type": "string"
              },
              "weight": {
                "format": "double",
                "type": "number"
              },
              "mercury": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "properties": {
            "description": "Дополнительные свойства товара для отображения в карточке",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyObject"
            }
          },
          "parent": {
            "description": "Код родительской карточки",
            "type": "string"
          },
          "active": {
            "description": "Разрешён ли товар для отображения и заказа. \nСвойство работает независимо от модерации. \nЕсли не передано - используется значение по умолчанию **true**",
            "type": "boolean"
          }
        },
        "example": {
          "active": true,
          "code": "0342449",
          "name": "Молоко 2.5%",
          "description": "Описание для сайта",
          "brand": "Торговая марка",
          "producer": "Производитель",
          "images": [
            "http(s)://...."
          ],
          "country": "643",
          "meta": {
            "unit": "кг",
            "weight": 2.5,
            "mercury": [
              "String",
              "String"
            ]
          },
          "properties": [
            {
              "key": "Жирность",
              "value": "2,5%"
            }
          ]
        }
      },
      "ProductMeta": {
        "title": "Root Type for ProductMeta",
        "description": "Метаинформация о товаре",
        "required": [
          "unit",
          "weight"
        ],
        "type": "object",
        "properties": {
          "unit": {
            "description": "Основая единица измерения",
            "enum": [
              "кг",
              "шт"
            ],
            "type": "string"
          },
          "weight": {
            "format": "float",
            "description": "Вес одной неделимой единицы товара",
            "type": "number"
          },
          "mercury": {
            "description": "Коды товара в системе \"Меркурий\"",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fgis_mt": {
            "description": "Признак того, что товар является подконтрольным в системе \"Честный знак\"",
            "type": "boolean"
          },
          "egais": {
            "description": "Код алкогольной продукции",
            "type": "string"
          }
        },
        "example": {
          "unit": "кг",
          "weight": 2.5,
          "mercury": [
            "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "123"
          ]
        }
      },
      "PropertyObject": {
        "title": "Root Type for PropertyObject",
        "description": "Дополнительные свойства",
        "required": [
          "value",
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "description": "Ключ",
            "type": "string"
          },
          "value": {
            "description": "Значение"
          }
        },
        "example": {
          "key": "Жирность",
          "value": "2.5%"
        }
      },
      "ApiResponse": {
        "title": "Root Type for ApiResponse",
        "description": "Стандартный ответ API-сервера",
        "type": "object",
        "properties": {
          "errors": {
            "description": "Список ошибок, возникших при обработке запроса",
            "type": "array",
            "items": {},
            "example": "Строка 124 - какая-то фигня в наименовании"
          },
          "success": {
            "description": "Информация об успешно обработанных данных",
            "type": "array",
            "items": {},
            "example": "Обновлено успешно"
          }
        },
        "example": {
          "errors": [],
          "success": []
        }
      },
      "ProductBranchCard": {
        "description": "Карточка товара с информацией, специфичной для филиала",
        "required": [
          "branch",
          "code",
          "active",
          "kvant",
          "nds",
          "stock",
          "type"
        ],
        "type": "object",
        "properties": {
          "branch": {
            "$ref": "#/components/schemas/BranchEnum",
            "description": "Код филиала"
          },
          "code": {
            "description": "Код товара",
            "type": "string"
          },
          "active": {
            "description": "Разрешён ли товар для заказа в указанном филиале",
            "type": "boolean"
          },
          "kvant": {
            "description": "Квант отгрузки товара (минимальная партия)",
            "type": "number"
          },
          "nds": {
            "description": "НДС (в процентах)",
            "type": "number"
          },
          "properties": {
            "description": "Дополнительные свойства товара для отображение в карточке на сайте. Будут перекрывать свойства из глобальной карточки",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyObject"
            }
          },
          "stock": {
            "description": "`deprecated` Количество доступного для заказа товара (остаток). Если нулевой, то товар будет помечен как отсутствующий. Устарело. Рекомендуется использовать массив stocks.",
            "type": "number"
          },
          "type": {
            "description": "Тип товара. Используется для деления заказа по машинам",
            "type": "string"
          },
          "prices": {
            "description": "`deprecated` Ценовые ряды для товара в привязке к филиалу (цены по умолчанию).\nЕсли цены не указаны, то товар будет недоступен для заказа.\nСрок жизни цены - 48 часов. Если в течении этого времени не было обновления цены, то товар становится недоступен для заказа.\nУстарело. Рекомендуется использовать массив stocks.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceItem"
            }
          },
          "packages": {
            "description": "Список дополнительных типов упаковок для товара",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackageItem"
            }
          },
          "stocks": {
            "description": "Массив предложений товаров с ценовыми рядами, остатками и сроками годности. Если срок годности не указан, считается, что предложение не принадлежит к категории с критическими сроками годности.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductStocksItem"
            }
          }
        },
        "example": {
          "branch": "MG",
          "code": "00111",
          "active": true,
          "kvant": 4.3,
          "nds": 10,
          "properties": [
            {
              "key": "Штрихкоды",
              "value": [
                "4650228980118",
                "14650228980115"
              ]
            },
            {
              "key": "Режим хранения",
              "value": "(+) от 0°С до + 6°С"
            },
            {
              "key": "Жирность",
              "value": 45
            },
            {
              "key": "Упаковка",
              "value": "Пленка"
            },
            {
              "key": "Срок хранения",
              "value": "до 30 дней"
            },
            {
              "key": "tags",
              "value": [
                "ТОВ_S3529",
                "ТОВ_Q5124"
              ]
            }
          ],
          "type": "Общий прайс",
          "packages": [
            {
              "name": "Единица",
              "shortName": "ед",
              "capacity": 3,
              "kvant": 1
            },
            {
              "name": "Коробка",
              "shortName": "кор",
              "capacity": 7,
              "kvant": 1
            }
          ],
          "stocks": [
            {
              "expirationDate": "2023-10-30",
              "stock": 250,
              "prices": [
                {
                  "type": "Магазины",
                  "price": 68.71
                },
                {
                  "type": "Область",
                  "price": 70.07
                },
                {
                  "type": "Стандартная",
                  "price": 68.7
                },
                {
                  "type": "Для опт.секций",
                  "price": 68.7
                },
                {
                  "type": "Закупочная",
                  "price": 54.08
                },
                {
                  "type": "Контрактная",
                  "price": 66.64
                }
              ],
              "transit": {
                "date": "2024-05-01",
                "count": 255
              }
            }
          ]
        }
      },
      "BranchEnum": {
        "description": "Список филиалов.\nПоставщик может работать только с теми филиалами, доступ к которым ему предоставлен сервисом. Регистрозависимый.",
        "enum": [
          "Примеры",
          "SM",
          "VLG",
          "000002"
        ],
        "type": "string"
      },
      "PackageItem": {
        "title": "Root Type for PackageItem",
        "description": "Дополнительная единица измерения для товара",
        "required": [
          "capacity",
          "kvant",
          "name",
          "shortName"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "Полное название",
            "type": "string"
          },
          "shortName": {
            "description": "Сокращенное название. \nНе может быть `кг` или `шт`",
            "maxLength": 3,
            "minLength": 1,
            "type": "string"
          },
          "capacity": {
            "description": "Вместительность в основных единицах измерения",
            "type": "number"
          },
          "kvant": {
            "description": "Квант отгрузки",
            "type": "number"
          }
        },
        "example": {
          "name": "Коробка",
          "shortName": "кор",
          "capacity": 7,
          "kvant": 1
        }
      },
      "PriceItem": {
        "title": "Root Type for PriceElement",
        "description": "Ценовой ряд для товара",
        "required": [
          "type",
          "price"
        ],
        "type": "object",
        "properties": {
          "type": {
            "description": "Ценовой ряд",
            "type": "string"
          },
          "price": {
            "format": "double",
            "description": "Цена",
            "type": "number"
          }
        },
        "example": {
          "type": "Магазины",
          "price": 50.2
        }
      },
      "VendorPrice": {
        "title": "Root Type for VendorPrice",
        "description": "Цена на товар для клиента",
        "required": [
          "branch",
          "client",
          "defaultPrice",
          "price",
          "productCode",
          "allowPromo",
          "isDiscount",
          "isMatrix"
        ],
        "type": "object",
        "properties": {
          "branch": {
            "$ref": "#/components/schemas/BranchEnum",
            "description": "Код филиала"
          },
          "client": {
            "description": "Код клиента",
            "type": "string"
          },
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "defaultPrice": {
            "description": "Цена по умолчанию",
            "type": "number"
          },
          "price": {
            "description": "Персональная цена для клиента",
            "type": "number"
          },
          "isMatrix": {
            "description": "Товар входит в матрицу клиента. default: false",
            "type": "boolean"
          },
          "allowPromo": {
            "description": "Разрешено последующее применение маркетинговых акций. default: true",
            "type": "boolean"
          },
          "validTill": {
            "format": "date",
            "description": "Дата, до которой цена действительна. Строка в формате ISO: 'YYYY-mm-dd'. По умолчанию - сутки со времени обработки файла.",
            "type": "string"
          },
          "isDiscount": {
            "description": "К товару применяется скидка. Будет создана промо-акция с методом \"discount\". default: false",
            "type": "boolean"
          }
        },
        "example": {
          "branch": "VV",
          "client": "42245",
          "productCode": "23424",
          "defaultPrice": 200,
          "price": 194,
          "validTill": "2023-07-20"
        }
      },
      "ClientCard": {
        "title": "Root Type for ClientCard",
        "description": "Карточка клиента",
        "required": [
          "branch",
          "code",
          "active",
          "inn",
          "logisticAddress",
          "name",
          "properties",
          "tags"
        ],
        "type": "object",
        "properties": {
          "_id": {
            "description": "_id клиента на сайте. ",
            "type": "string"
          },
          "active": {
            "description": "Может ли клиент делать заказ.",
            "type": "boolean"
          },
          "code": {
            "description": "Код контрагента",
            "type": "string"
          },
          "name": {
            "description": "Наименование клиента",
            "type": "string"
          },
          "inn": {
            "description": "ИНН",
            "type": "string"
          },
          "ogrn": {
            "description": "ОГРН",
            "type": "string"
          },
          "kpp": {
            "description": "КПП",
            "type": "string"
          },
          "zone": {
            "description": "Код зоны доставки в системе логистики поставщика.",
            "type": "string"
          },
          "type": {
            "description": "Тип клиента. Например, \"Розница\"",
            "type": "string"
          },
          "branch": {
            "$ref": "#/components/schemas/BranchEnum",
            "description": "Код филиала"
          },
          "address": {
            "description": "Юридический адрес",
            "type": "string"
          },
          "logisticAddress": {
            "description": "Адрес доставки",
            "type": "string"
          },
          "properties": {
            "description": "Список предопреленных свойств (key)\n\n* **reg_id** - Коды регистрации. Массив строк\n* **currency** - Валюта контрагента\n* **managers** - Список менеджеров клиента. Массив строк.\n* **warning** - Предупреждения и сообщения, которые будут показаны в корзине клиента. **Массив** объектов вида `{\"title\":\"Стоп-отгрузка\",\"message\":\"Свяжитесь с менеджером или по номеру телефона...\"}`\n* **stop** - Клиент стоит на СТОПе. Отгрузка запрещена. `true/false`\n* **debt** - Величина просроченной задолженности. Число.\n* **price**  - Название ценового ряда для клиента (см. обновление товаров)\n* **prices** - Если заполнено - price игнорируется. массив объектов `{\"price\": \"Для опт.секций\",\"tag\": \"NOM_00001\"}` задаёт тип цены для тэга товара. Необходимо, чтобы был один элемент \"по-умолчанию\", без указания тэга\n* **schedules** - Расписание доставки в виде массива объектов `{type:'Скоропорт',schedule:5}`. `type` - тип товара (если null - то это расписание по умолчанию), `schedule` - десятичное представление битовой маски доступных дней доставки, например `5` = `0b0000101` - пн и ср\n* **balance** - Баланс взаиморасчётов поставщика с контрагентом. Если больше 0, то долг контрагента, если меньше - долг поставщика.\n* **returnAllowed** - поставщик разрешил клиенту выполнять возвраты через Prodly. Boolean.\n* **creditAllowed** - поставщик разрешает клиенту оплату заказа в кредит от Сбербанка. Boolean\n* **momentalPayAllowed** - поставщик разрешает клиенту оплату заказа через \"Моментальный платеж\". Boolean\n\n\nКод регистрации используется для предварительной загрузки клиентов в сервис. Преставляет из себя массив строк в формате `XXX-XXXX-XXXX`. Первые три символа - сокращение поставщика согласованный с поддержкой prodly.ru, остальные - буквенно-цифровые (A-Z,0-9), все буквы в верхнем регистре. При самостоятельной добавлении контрагента, пользователь может указать код регистрации (полученный за пределами сервиса), в этом случае ему будут подключены все клиенты, у которых будет найдет введеный пользователем код регистрации.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyObject"
            }
          },
          "tags": {
            "description": "Набор тэгов для клиента.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "$ref": "#/components/schemas/ClientLocation",
            "description": "Координаты торговой точки"
          },
          "contacts": {
            "description": "Email-ы и телефоны клиента",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client.Post.Object.Contact"
            }
          },
          "managers": {
            "description": "Менеджеры контрагента. Передаются только при использовании функционала для торговых представитилей.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FirmManagerLink"
            }
          }
        },
        "example": {
          "_id": "dghroihorih536otyueh8756",
          "active": true,
          "code": "V666",
          "name": "Магазин \"Мясо всем\"",
          "inn": "6311454545454",
          "ogrn": "631786451515",
          "kpp": "6301001",
          "zone": "Город",
          "type": "Розница",
          "branch": "VV",
          "address": "г.Омск, ул Траншейная 15 кор 2",
          "logisticAddress": "г.Омск, ул. Крассных Коммунаров, 33",
          "tags": [
            "КА_K16115",
            "КА_K08817"
          ],
          "contacts": [
            {
              "fio": "Василий Алибабаевич",
              "email": "uasya@mail.ru",
              "phone": "+70000000008"
            }
          ],
          "properties": [
            {
              "key": "reg_id",
              "value": [
                "TRL-XXXX-XXXX",
                "TRL-YYYY-YYYY"
              ]
            },
            {
              "key": "currency",
              "value": "RUB"
            },
            {
              "key": "managers",
              "value": [
                "Иванов И.И.; +70000000005",
                "Петров Пётр Петрович; +70000000004"
              ]
            },
            {
              "key": "warnings",
              "value": [
                {
                  "title": "Стоп-отгрузка",
                  "message": "29.08.2025  Просрочка свыше 10 дней "
                }
              ]
            },
            {
              "key": "stop",
              "value": false
            },
            {
              "key": "debt",
              "value": 100.5
            },
            {
              "key": "schedules",
              "value": [
                {
                  "schedule": 0
                },
                {
                  "type": "Общий прайс",
                  "schedule": 3
                },
                {
                  "type": "Скоропорт",
                  "schedule": 5
                },
                {
                  "type": "Заморозка",
                  "schedule": 0
                }
              ]
            },
            {
              "key": "price",
              "value": "Стандартная"
            },
            {
              "key": "prices",
              "value": [
                {
                  "price": "Стандартная"
                },
                {
                  "price": "Для опт.секций",
                  "tag": "NOM_00001"
                }
              ]
            }
          ],
          "location": {
            "type": "Point",
            "coordinates": [
              52.434343,
              43.525252
            ]
          },
          "managers": [
            {
              "manager": "0000052729",
              "firm": "339"
            }
          ]
        }
      },
      "OrderState": {
        "description": "Состояние заказа. Тип поля enum, поле регистрозависимо.",
        "enum": [
          "new",
          "sent",
          "build",
          "delivery",
          "done",
          "canceled"
        ],
        "type": "string"
      },
      "OrderRow": {
        "title": "Root Type for OrderRow",
        "description": "Строка заказа",
        "required": [
          "code",
          "count",
          "unit",
          "price",
          "weight"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Код товара",
            "type": "string"
          },
          "count": {
            "description": "Количество",
            "type": "number"
          },
          "price": {
            "description": "Цена товара",
            "type": "number"
          },
          "weight": {
            "description": "Вес",
            "type": "number"
          },
          "unit": {
            "description": "Единица измерения",
            "enum": [
              "кг",
              "шт"
            ],
            "type": "string"
          },
          "invoice": {
            "description": "Номер накладной",
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/shortActionRef",
            "description": "Документ примененной в корзине акции"
          },
          "expirationDate": {
            "description": "Срок годности в формате ISODate (например \"2025-01-16\"). Если указан, то это товар с ограниченным сроком годности. По умолчанию пустая строка.",
            "type": "string"
          },
          "promocode": {
            "description": "промокод, применённый к товару",
            "type": "string"
          }
        },
        "example": {
          "code": "9983",
          "count": 100,
          "price": 27.69,
          "weight": 11.5,
          "unit": "шт",
          "invoice": "ТТ00000001",
          "expirationDate": "2025-01-16",
          "promocode": "ALEN-1"
        }
      },
      "VendorOrderOUT": {
        "description": "Структура заказа для поставщика",
        "required": [
          "_id",
          "number",
          "state",
          "client",
          "vendor",
          "branch",
          "deliveryDate",
          "pickup",
          "createdAt",
          "rows"
        ],
        "type": "object",
        "properties": {
          "_id": {
            "description": "Идентификатор заказа на сайте Prodly",
            "type": "string"
          },
          "number": {
            "description": "Номер заказа на сайте Prodly",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/OrderState",
            "description": "Текущий статус заказа"
          },
          "client": {
            "$ref": "#/components/schemas/ClientCard",
            "description": "Карточка клиента (некоторые поля будут недоступны)"
          },
          "vendor": {
            "description": "Идентификатор поставщика",
            "type": "string"
          },
          "branch": {
            "$ref": "#/components/schemas/BranchEnum",
            "description": "Код филиала"
          },
          "deliveryDate": {
            "format": "date",
            "description": "Дата доставки (самовывоза), строка в ISO-формате: 'YYYY-mm-dd'",
            "type": "string"
          },
          "note": {
            "description": "Комментарий клиента",
            "type": "string"
          },
          "pickup": {
            "description": "Признак самовывоза",
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "description": "Время создания заказа",
            "type": "string"
          },
          "rows": {
            "description": "Табличная часть заказа",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderRow"
            }
          },
          "bonus": {
            "description": "Массив подарков  в заказе",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderBonusRow"
            }
          },
          "contacts": {
            "description": "Контактные данные клиента",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderContact"
            }
          },
          "properties": {
            "description": "Дополнительные свойства заказа",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyObject"
            },
            "example": "[ \n  {\n      \"key\": \"paymentType\",\n      \"value\": \"cash\"  // при оформлении заказу указана \"оплата наличными при получении\"\n  },\n  {\n      \"key\": \"visitId\", // \n      \"value\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\" // идентификатор визита агента, если заказа оформлен агентом в рамках визита\n  },\n  {\n      \"key\": \"agentId\",\n      \"value\": \"C00001\" // код торгового агента, если заказа оформлен агентом\n  }\n]"
          },
          "multicombo": {
            "description": "Массив строк-документов, примененных к корзине клиента акций типа \"Мультикомбо\"",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "_id": "4KZ9Fs6dvADCuRWQE",
          "number": "2120723-22937",
          "state": "new",
          "client": {
            "_id": "604cac3681484e00d1a267c7",
            "name": "Аутлет ООО Кубанская 14",
            "inn": "2543103732",
            "kpp": "254301001",
            "ogrn": "1162536088648",
            "branch": "VV",
            "address": "690105, Приморский край, Владивосток г, Давыдова ул, дом № 35, кв. 214",
            "logisticAddress": "690033, Приморский край, Владивосток г, Кубанская ул, дом № 14",
            "code": "BEBEBE-163",
            "zone": "dhrohrgoifih76906767409ghlkghflk"
          },
          "contacts": [
            {
              "name": "Василькова Елена",
              "phone": "123-456-789",
              "emails": [
                "vas@example.org",
                "ilkova@example.org"
              ]
            }
          ],
          "vendor": "vendor-slug",
          "branch": "VV",
          "deliveryDate": "2021-07-28",
          "note": "",
          "pickup": false,
          "certRequest": false,
          "properties": [
            {
              "key": "paymentType",
              "value": "cash",
              "comment": "при оформлении заказу указана 'оплата наличными при получении' "
            },
            {
              "key": "visitId",
              "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "comment": "идентификатор визита агента, если заказа оформлен агентом в рамках визита"
            },
            {
              "key": "agentId",
              "value": "C00001",
              "comment": "код торгового агента, если заказа оформлен агентом"
            }
          ],
          "rows": [
            {
              "product": "5fa8e934b39914c7b17b3d7a",
              "price": 17.54,
              "count": 6,
              "summa": 105.24,
              "weight": 0.75,
              "unit": "шт",
              "code": "42221",
              "action": {
                "_id": "2TMBbbIyTkRvFi2FL5xNBFqdl5V",
                "document": "ГВ00000269_8,000%"
              }
            },
            {
              "product": "5fa8e93b737f2e3795df7463",
              "price": 28.82,
              "count": 6,
              "summa": 172.92000000000002,
              "weight": 0.48,
              "unit": "шт",
              "code": "53778"
            }
          ],
          "createdAt": "2021-07-26T23:22:39.941Z",
          "type": "prodly",
          "source": "site",
          "history": [
            {
              "date": "2021-07-26T23:22:39.941Z",
              "action": "Создан",
              "user": "8WhPHtpTuCgXbQ79Y"
            }
          ],
          "createdBy": "8WhPHtpTuCgXbQ79Y",
          "createdFrom": {
            "ip": "93.170.94.116",
            "isLan": false
          },
          "bonus": [
            {
              "document": "Док-00001",
              "count": 0.123,
              "productCode": "000001"
            }
          ]
        }
      },
      "VendorOrderIN": {
        "description": "Структура заказа для поставщика",
        "required": [
          "number",
          "state",
          "vendor",
          "branch",
          "pickup",
          "deliveryDate"
        ],
        "type": "object",
        "properties": {
          "number": {
            "description": "Номер заказа на сайте Prodly",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/OrderState",
            "description": "Текущий статус заказа"
          },
          "vendor": {
            "description": "Идентификатор поставщика",
            "type": "string"
          },
          "branch": {
            "$ref": "#/components/schemas/BranchEnum",
            "description": "Код филиала"
          },
          "deliveryDate": {
            "format": "date",
            "description": "Дата доставки (самовывоза) в ISO-формате: 'YYYY-mm-dd'",
            "type": "string"
          },
          "pickup": {
            "description": "Признак самовывоза",
            "type": "boolean"
          },
          "rows": {
            "description": "Табличная часть заказа",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderRow"
            }
          },
          "vendorStatus": {
            "description": "Подтверждение приема заказа",
            "enum": [
              "accepted",
              "declined"
            ],
            "type": "string"
          },
          "vendorMessage": {
            "description": "Сообщение с подробностями от поставщика. Например: \"Заказ не может быть обработан, т.к. указана недоступная дата доставки\"",
            "type": "string"
          },
          "invoices": {
            "description": "Накладные и данные по машинам",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderInvoice"
            }
          },
          "client": {
            "$ref": "#/components/schemas/VendorOrderIN.Client",
            "description": "Поле обязательно, если заказ НЕ был создан на платформе. Код контрагента в учётной системе поставщика.\n"
          }
        },
        "example": {
          "number": "46446-0009",
          "clientCode": "X66609",
          "branch": "VV",
          "state": "delivery",
          "pickup": false,
          "deliveryDate": "2020-11-07",
          "vendorStatus": "accepted",
          "vendorMessage": "Заказ куда-то там поехал",
          "invoices": [
            {
              "number": "ПМПМ026170",
              "car": {
                "code": "SM006597",
                "number": "А 499 ТМ 763"
              },
              "forwarder": {
                "code": "С06397",
                "name": "КИНДЕЕВ Андрей Сергеевич",
                "phone": "89279033761"
              }
            },
            {
              "number": "ПМПМ026120",
              "car": {
                "code": "SM006597",
                "number": "А 499 ТМ 763"
              },
              "forwarder": {
                "code": "С06397",
                "name": "КИНДЕЕВ Андрей Сергеевич",
                "phone": "89279033761"
              }
            }
          ],
          "rows": [
            {
              "code": "78958",
              "count": 5,
              "price": 400,
              "weight": 500,
              "unit": "кг",
              "invoice": "ПН45533-0001"
            }
          ]
        }
      },
      "PromoProducts": {
        "title": "Root Type for PromoProducts",
        "description": "Товары в акции",
        "type": "object",
        "properties": {
          "groups": {
            "description": "Группы",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoGroupsItem"
            }
          },
          "items": {
            "description": "Товары",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoProductsItem"
            }
          }
        },
        "example": {
          "groups": [
            {
              "_id": "1",
              "count": 1,
              "discount": 5
            },
            {
              "_id": "2",
              "count": 1,
              "price": 23.3
            },
            {
              "_id": "3",
              "count": 1
            }
          ],
          "items": [
            {
              "productCode": "46305",
              "group": "1",
              "ratio": 1,
              "discount": 3
            },
            {
              "productCode": "42195",
              "group": "2",
              "ratio": 1,
              "price": 25.12
            },
            {
              "productCode": "42193",
              "group": "3",
              "ratio": 1
            }
          ]
        }
      },
      "PromoTagsArr": {
        "title": "Root Type for PromoTagsArr",
        "description": "Список тегов\n",
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": [
          "КА_КС_09",
          "КА_КС_04",
          "КА_КС_10"
        ]
      },
      "PromoProductsItem": {
        "title": "Root Type for PromoProductsItem",
        "description": "Элемент массива products",
        "required": [
          "productCode",
          "ratio"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "group": {
            "description": "Идентификатор группы",
            "type": "integer"
          },
          "ratio": {
            "format": "int32",
            "description": "Коэффициент",
            "type": "integer"
          },
          "count": {
            "description": "Минимальное количество закупаемого товара для срабатывания акции",
            "type": "number"
          },
          "restrictions": {
            "$ref": "#/components/schemas/PromoRestrictions",
            "description": "Ограничения"
          },
          "discount": {
            "description": "Скидка в % для товара. Применяется в n+%.",
            "type": "number"
          },
          "price": {
            "description": "Цена товара. Применяется в n+%.",
            "type": "number"
          }
        },
        "example": {
          "productCode": "W8025",
          "group": "1",
          "ratio": 1,
          "count": 1
        }
      },
      "PromoGroupsItem": {
        "title": "Root Type for PromoGroupsItem",
        "description": "Элемент массива группы товаров",
        "required": [
          "group"
        ],
        "type": "object",
        "properties": {
          "group": {
            "description": "Идентификатор группы",
            "type": "integer"
          },
          "count": {
            "description": "Пороговое количество закупаемого товара для срабатывания акции",
            "type": "number"
          },
          "summa": {
            "description": "Пороговая сумма для срабатывания акции",
            "type": "number"
          },
          "restrictions": {
            "$ref": "#/components/schemas/PromoRestrictions",
            "description": "Ограничения"
          },
          "discount": {
            "description": "Скидка в % для группы товаров. Применяется в n+%. ",
            "type": "number"
          },
          "price": {
            "description": "Цена для группы товаров. Применяется в n+%",
            "type": "number"
          }
        },
        "example": "{\n    \"_id\": \"1\",\n    \"count\": 1\n    \"summa\": 245.4    \"\n}"
      },
      "PromoProductsDiscountItem": {
        "title": "Root Type for PromoProductsDiscountItem",
        "description": "Элемент массива products.items методе discount",
        "type": "object",
        "properties": {
          "group": {
            "format": "int32",
            "description": "Идентификатор группы промоакции",
            "type": "integer"
          },
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "price": {
            "format": "double",
            "description": "Цена",
            "type": "number"
          }
        },
        "example": {
          "group": 1,
          "productCode": "F0844",
          "price": 105.5
        }
      },
      "PromoDiscountProducts": {
        "title": "Root Type for PromoDiscountProducts",
        "description": "Элемент массива товаров в методе discount",
        "type": "object",
        "properties": {
          "groups": {
            "description": "Группа промоакции",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoGroupsItem"
            },
            "properties": {
              "_id": {
                "format": "int32",
                "type": "integer"
              }
            }
          },
          "items": {
            "description": "Товары в промоакции",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoDiscountProducts"
            }
          }
        },
        "example": {
          "groups": {
            "_id": 1
          },
          "items": [
            {
              "group": 1,
              "productCode": "F0844",
              "price": 105.5
            },
            {
              "group": 1,
              "productCode": "W6833",
              "price": 100.1
            }
          ]
        }
      },
      "RequestInfo": {
        "title": "Root Type for RequestInfo",
        "description": "Информация о принятом запросе. ID запроса позволяет получить информацию о ходе выполнения запроса.",
        "type": "object",
        "properties": {
          "requestID": {
            "description": "Идентификатор запроса в системе Prodly",
            "type": "string"
          }
        },
        "example": {
          "requestID": "0000-0000-0000-0000"
        }
      },
      "RequestStatus": {
        "title": "Root Type for RequestStatus",
        "description": "Статус обработки запроса\n",
        "type": "object",
        "properties": {
          "_id": {
            "description": "Идентификатор запроса",
            "type": "string"
          },
          "vendor": {
            "description": "Идентификатор поставщика",
            "type": "string"
          },
          "branch": {
            "description": "Филиал",
            "type": "string"
          },
          "func": {
            "description": "Операция",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "description": "Дата получения запроса в ISO-формате",
            "type": "string"
          },
          "state": {
            "description": "Состояние запроса\n\n* `new` - В очереди на выполнение\n* `process` - Выполняется\n* `done` - Запрос выполнен\n* `error` - В процессе выполнения возникли ошибки\n* `failed` - Выгрузка не удалась\n",
            "enum": [
              "new",
              "process",
              "done",
              "error",
              "failed"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "description": "Дата последнего обновления статуса в ISO-формате",
            "type": "string"
          },
          "errors": {
            "description": "Строковый массив ошибок, полученных при обработке данных",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "_id": "66b898da-f4ca-4e15-80a0-0aba43b67b47",
          "vendor": "vendor",
          "branch": "VV",
          "func": "products.post",
          "createdAt": "2022-11-23T14:17:39.162+04:00",
          "state": "process",
          "updatedAt": "2022-11-23T16:13:50.091+04:00",
          "errors": [
            "[127] не указан адрес доставки",
            "[ERROR][TEST_VENDOR][TEST_BRANCH] [1][ORD-NUMBER-1] Для стороннего заказа отсутствуют invoiceId"
          ]
        }
      },
      "Plakat": {
        "description": "Элемент массива plakats.",
        "required": [
          "doc_number",
          "doc_id",
          "dateFrom",
          "dateTo",
          "tags",
          "products",
          "branch"
        ],
        "type": "object",
        "properties": {
          "doc_number": {
            "description": "Номер документа в учетной системе поставщика",
            "type": "string"
          },
          "doc_id": {
            "description": "Уникальный идентификатор записи",
            "type": "string"
          },
          "dateFrom": {
            "format": "date",
            "description": "Время начала действия плаката в формате `гггг-мм-дд`",
            "type": "string"
          },
          "dateTo": {
            "format": "date",
            "description": "Время окончания действия плаката в формате `гггг-мм-дд`",
            "type": "string"
          },
          "tags": {
            "description": "Массив тегов клиентов, на которых распространяется плакат",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "description": "Товары в плакате.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/plakatProduct"
            }
          },
          "branch": {
            "description": "Филиал",
            "type": "string"
          }
        },
        "example": {
          "doc_number": "Мат-029054",
          "doc_id": "SM22333002771",
          "dateFrom": "2022-11-30",
          "dateTo": "2022-12-31",
          "branch": "SM",
          "tags": [
            "КА_ТС_00111"
          ],
          "products": [
            {
              "code": "W3565",
              "name": "ТОФФИФЕ конфеты 6x5x125 гр."
            },
            {
              "code": "64429",
              "name": "Кофе MacCoffеe GOLD натур.раствор.субл. м/у 75г*12шт "
            },
            {
              "code": "R3266",
              "name": "Сливки Домик в Деревне 10% 200г ТБА (18шт)"
            },
            {
              "code": "G4201",
              "name": "Сыр Пестравка Тильзитер 45% фасованный  флоу-пак 200 г"
            }
          ]
        }
      },
      "plakatProduct": {
        "title": "Root Type for plakatPrduct",
        "description": "товар в плакате",
        "required": [
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Код товара",
            "type": "string"
          },
          "name": {
            "description": "Наименование товара",
            "type": "string"
          }
        },
        "example": {
          "code": "W3565",
          "name": "ТОФФИФЕ конфеты 6x5x125 гр."
        }
      },
      "WBLRec": {
        "title": "Root Type for WBLRec",
        "description": "Элемент массива чёрно-белого списка",
        "type": "object",
        "properties": {
          "number": {
            "description": "Документ в учётной системе поставщика",
            "type": "string"
          },
          "name": {
            "description": "Наименование ограничения",
            "type": "string",
            "example": "Наименование правила"
          },
          "note": {
            "description": "Наименование правила",
            "type": "string"
          },
          "hidden": {
            "description": "Флаг сокрытия товарной карточки из каталога. При значении false товар будет виден, но покажется плашка \"Недоступно для заказа\". При значении true товар полностью скрывается для клиента.",
            "type": "boolean"
          },
          "products": {
            "description": "Двумерный массив тегов товаров",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WBLTags"
            }
          },
          "BL": {
            "description": "Двумерный массив тегов запрета (DENY)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WBLTags"
            },
            "example": ""
          },
          "WL": {
            "description": "Двумерный массив тегов разрешения (ALLOW)\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WBLTags"
            },
            "example": ""
          }
        },
        "example": {
          "number": "000000010",
          "name": "Купино",
          "note": "",
          "hidden": true,
          "products": [
            [
              "ТОВ_F9519"
            ],
            [
              "ТОВ_F9289"
            ],
            [
              "ТОВ_F9829"
            ],
            [
              "ТОВ_F9326"
            ],
            [
              "ТОВ_F9535"
            ],
            [
              "ТОВ_F9713"
            ]
          ],
          "BL": [],
          "WL": [
            [
              "КА_С30242"
            ]
          ]
        }
      },
      "WBLTags": {
        "title": "Root Type for WBLTags",
        "description": "Массивы тегов",
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": [
          "tag1",
          "tag2",
          "tag3"
        ]
      },
      "ClientLocation": {
        "title": "Root Type for ClientLocation",
        "description": "Объект геолокации ",
        "required": [
          "coordinates",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "description": "Тип Geo-объекта. Для торговой точки всегда `Point`",
            "type": "string"
          },
          "coordinates": {
            "description": "Координатная пара (Lon, Lat)",
            "type": "array",
            "items": {
              "format": "double",
              "type": "number"
            }
          }
        },
        "example": {
          "type": "Point",
          "coordinates": [
            43.997896,
            56.2868921
          ]
        }
      },
      "ClientContacts": {
        "description": "Объект контактов ",
        "type": "object",
        "properties": {
          "emails": {
            "description": "Электронная почта",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "phones": {
            "description": "Телефон",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": "{\n    emails: [\"deadmoroz@mail.ru\", \"deadmoroz@gmail.com\"],\n    phones: [\"+7912456456456\", \"+89124566456456\"]\n}"
      },
      "CurrencyRate": {
        "description": "Курс валют поставщика",
        "required": [
          "date",
          "currency",
          "branch",
          "multiplicity",
          "rate"
        ],
        "type": "object",
        "properties": {
          "date": {
            "format": "date",
            "description": "Дата применения курса в формате ISO. Должна быть больше текущей даты",
            "type": "string"
          },
          "currency": {
            "description": "Трёхбуквенный код валюты в формате ISO3",
            "type": "string"
          },
          "branch": {
            "description": "Код филиала",
            "type": "string"
          },
          "multiplicity": {
            "description": "Коэффициент к базовой валюте",
            "type": "number"
          },
          "rate": {
            "description": "Курс валюты",
            "type": "number"
          }
        },
        "example": {
          "branch": "SM",
          "currency": "KZT",
          "date": "2023-01-01",
          "multiplicity": 0.45,
          "rate": 5.0267
        }
      },
      "ProductCertificates": {
        "description": "Ссылки на сертификаты качества товара",
        "required": [
          "productCode",
          "certificates"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "certificates": {
            "description": "Массив ссылок на сертификаты",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductCertificate"
            }
          }
        },
        "example": {
          "productCode": "123456",
          "certificates": [
            {
              "updatedAt": "2023-02-28T17:02:00",
              "filename": "http(s)://...."
            }
          ]
        }
      },
      "ProductCertificate": {
        "title": "Root Type for ProductCertificate",
        "description": "Элемент массива сертификатов качества",
        "type": "object",
        "properties": {
          "updatedAt": {
            "format": "date-time",
            "description": "Время обновления файла в формате ISO",
            "type": "string"
          },
          "filename": {
            "description": "Ссылка на файл",
            "type": "string"
          }
        },
        "example": {
          "updatedAt": "2023-02-01T17:52:00",
          "filename": "http(s)://..."
        }
      },
      "Message": {
        "description": "Сообщение для поставщика",
        "required": [
          "_id",
          "sender",
          "recipient",
          "subject",
          "state",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "_id": {
            "description": "Идентификатор сообщения (uuid4)",
            "type": "string",
            "example": "ffb00888-dc5c-4344-8b89-5f4a753d01b5"
          },
          "sender": {
            "$ref": "#/components/schemas/MessageAddress",
            "description": "Отправитель сообщения"
          },
          "recipient": {
            "$ref": "#/components/schemas/MessageAddress",
            "description": "Получатель сообщения"
          },
          "subject": {
            "$ref": "#/components/schemas/MessageSubject",
            "description": "Тема сообщения"
          },
          "data": {
            "description": "Параметры сообщения. В общем виде это может быть произвольный объект. Существуют предопределенные форматы для следующих тем:\n\n* `settlements.request` - \n```\n{\n\t\t\"client\" : {\n\t\t\t\"_id\" : \"P5hpZSPb6x72mWYrP\",\n\t\t\t\"inn\" : \"027404288679\",\n\t\t\t\"kpp\" : null,\n\t\t\t\"ogrn\" : null,\n\t\t\t\"name\" : \"Сафина А.Э. (Шакша)\",\n\t\t\t\"address\" : null,\n\t\t\t\"logisticAddress\" : \"450069, Уфа г, Высоковольтная ул, дом № 8/1\",\n\t\t\t\"code\" : \"U02997\",\n\t\t\t\"zone\" : \"__DEFAULT__\"\n\t\t},\n\t\t\"vendor\" : \"dalimo\",\n\t\t\"branch\" : \"UF\",\n\t\t\"period\" : [ \"2023-04-25\", \"2023-04-27\" ]\n\t}\n```\n\n* `reports.service_level` , `reports.plan`, `reports.orders_issues`, - \n```\n{\n\t\"vendor\" : \"dalimo\",\n\t\"branch\" : \"SM\",\n\t\"agentCode\" : \"0000001062\" // код торгового агента\n}\n```"
          },
          "state": {
            "description": "Состояние сообщение",
            "enum": [
              "new",
              "sent",
              "done",
              "error"
            ],
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "description": "Дата создания сообщения",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "description": "Дата обновления сообщения",
            "type": "string"
          },
          "response": {
            "description": "Ответ получателя на сообщение.\nФормат зависит от темы сообщения. \n\nНапример для `settlements.request`:\n```\n[ // Массив файлов со взаиморасчетами\n\t{\n\t\t\"branch\" : \"UF\", // Филиал\n\t\t\"client\" : \"U02997\", // Код контрагента\n\t\t\"period\" : [ \"2023-04-25\", \"2023-04-27\" ], // Период за который расчитаны взаиморасчеты\n\t\t\"type\" : \"Взаиморасчеты\", // Тип документа\n\t\t\"href\" : \"https://example.com/UF_U02997.pdf\" // Публичная ссылка на файл документа\n\t}\n]\n```"
          }
        },
        "example": {
          "_id": "ffb00888-dc5c-4344-8b89-5f4a753d01b5",
          "sender": {
            "client": "P5hpZSPb6x72mWYrP"
          },
          "recipient": {
            "vendor": "dalimo",
            "branch": "UF"
          },
          "subject": "settlements.request",
          "data": {
            "client": {
              "_id": "P5hpZSPb6x72mWYrP",
              "inn": "027404288679",
              "name": "Сафина А.Э. (Шакша)",
              "logisticAddress": "450069, Башкортостан Респ, Уфа г, Высоковольтная ул, дом № 8/1",
              "code": "U02997",
              "zone": "__DEFAULT__"
            },
            "vendor": "dalimo",
            "branch": "UF",
            "period": [
              "2023-04-25",
              "2023-04-27"
            ]
          },
          "ttl": 86400,
          "state": "done",
          "createdAt": "2023-04-27T11:28:26.028+04:00",
          "updatedAt": "2023-04-27T11:29:41.822+04:00",
          "response": [
            {
              "branch": "UF",
              "client": "U02997",
              "period": [
                "2023-04-25",
                "2023-04-27"
              ],
              "type": "Взаиморасчеты",
              "href": "https://dlm-docs.hb.bizmrg.com/UF_%D0%92%D0%B7%D0%B0%D0%B8%D0%BC%D0%BE%D1%80%D0%B0%D1%81%D1%87%D0%B5%D1%82%D1%8B_U02997_2023-04-25_2023-04-27.pdf"
            }
          ]
        }
      },
      "MessageAddress": {
        "title": "Root Type for MessageSender",
        "description": "Адресат. \nКак минимум одно из полей должно быть заполнено",
        "type": "object",
        "properties": {
          "client": {
            "description": "Идентификатор клиента",
            "type": "string"
          },
          "user": {
            "description": "Логин пользователя",
            "type": "string"
          },
          "vendor": {
            "description": "Поставщик",
            "type": "string"
          },
          "branch": {
            "description": "Филиал поставщика",
            "type": "string"
          }
        },
        "example": {
          "client": "P5hpZSPb6x72mWYrP",
          "user": "+79171112233"
        }
      },
      "MessageSubject": {
        "description": "\nСписок предопределенных тем, к которым применяются внутренние процессы сервиса:\n* `settlements.request` - Запрос документа взаиморасчетов\n* `waybill.request` - Запрос накладной\n* `paymentInvoice.request` - Запрос счёта на оплаты",
        "type": "string"
      },
      "VendorReserveIn": {
        "title": "Root Type for VendorReserveIn",
        "description": "Объект кастомного остатка товара для клиента.",
        "required": [
          "branch",
          "client_tags",
          "productCode",
          "stock",
          "vendor"
        ],
        "type": "object",
        "properties": {
          "vendor": {
            "description": "Код поставщика",
            "type": "string"
          },
          "branch": {
            "description": "Филиал",
            "type": "string"
          },
          "client_tags": {
            "description": "Массив тегов контрагентов",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "stock": {
            "description": "Остаток товара",
            "type": "number"
          },
          "validTill": {
            "description": "Дата, до которой запись действительна в формате ISODate. Если не указана, то будет использована текущая дата.",
            "type": "string"
          }
        },
        "example": {
          "vendor": "dalimo",
          "branch": "SM",
          "client_tags": [
            "КА_С44773"
          ],
          "productCode": "F1251",
          "stock": 500,
          "validTill": "2023-07-20"
        }
      },
      "OrderBonusRow": {
        "title": "Root Type for OrderBonusRow",
        "description": "Подарок в заказе",
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара поставщика",
            "type": "string"
          },
          "count": {
            "format": "double",
            "description": "Количество",
            "type": "number"
          },
          "document": {
            "description": "Документ промоакции поставщика",
            "type": "string"
          }
        },
        "example": {
          "productCode": "000001",
          "count": 1.25,
          "document": "Док-000001"
        }
      },
      "shortActionRef": {
        "title": "Root Type for shortActionRef",
        "description": "Ссылка на документ акции",
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "document": {
            "type": "string"
          }
        },
        "example": {
          "_id": "2TMBbbIyTkRvFi2FL5xNBFqdl5V",
          "document": "ГВ00000269_8,000%"
        }
      },
      "PromoRestrictions": {
        "title": "Root Type for PromoRestrictions",
        "description": "Ограничения промо-акции",
        "type": "object",
        "properties": {
          "bySum": {
            "description": "Флаг ограничения по сумме",
            "type": "boolean"
          },
          "byCount": {
            "description": "Флаг ограничения по количеству товара",
            "type": "boolean"
          },
          "count": {
            "description": "Значение",
            "type": "number"
          }
        },
        "example": {
          "bySum": true,
          "byCount": true,
          "count": 1024
        }
      },
      "ProductStock": {
        "title": "Root Type for ProductBranchStock",
        "description": "Остаток товара в филиале",
        "required": [
          "stock",
          "productCode"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "stock": {
            "description": "Остаток",
            "type": "number"
          },
          "transit": {
            "description": "Ожидаемые поставки товара",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockTransitElement"
            }
          }
        },
        "example": {
          "productCode": "100500",
          "stock": 200,
          "transit": [
            {
              "date": "2024-10-01",
              "count": 225.6
            }
          ]
        }
      },
      "ProductStocksItem": {
        "title": "Root Type for ProductStocksItem",
        "description": "Элемент массива stocks",
        "required": [
          "prices",
          "expirationDate",
          "stock"
        ],
        "type": "object",
        "properties": {
          "expirationDate": {
            "format": "date",
            "description": "Дата истечения срока хранения. Если поле не пустое, то товар считается уценённым из-за приближающегося срока. Такие товары размещаются только в разделе \"Успей купить\". Для обычных товаров необходимо использовать пустую строку.",
            "type": "string"
          },
          "stock": {
            "format": "double",
            "description": "Остаток товара",
            "type": "number"
          },
          "prices": {
            "description": "Массив ценовых рядов",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceItem"
            },
            "properties": {
              "Магазин": {
                "format": "int32",
                "type": "integer"
              },
              "Склад": {
                "format": "int32",
                "type": "integer"
              },
              "Рынок": {
                "format": "int32",
                "type": "integer"
              },
              "Хорьки": {
                "format": "int32",
                "type": "integer"
              },
              "Ларьки": {
                "format": "int32",
                "type": "integer"
              }
            }
          },
          "transit": {
            "$ref": "#/components/schemas/StockTransitElement",
            "description": "Ожидаемое поступление"
          }
        },
        "example": "{\n    \"expirationDate\": \"2023-10-30\",\n    \"stock\": 250,\n    \"prices\": [\n        {\n            \"type\": \"Стандартная\",\n            \"price\": 15.3\n        },\n        {\n            \"type\": \"Магазины\",\n            \"price\": 16.04\n        },\n        {\n            \"type\": \"Область\",\n            \"price\": 16.33\n        },\n        {\n            \"type\": \"Контрактная\",\n            \"price\": 14.12\n        },\n        {\n            \"type\": \"Для опт.секций\",\n            \"price\": 15.5\n        },\n        {\n            \"type\": \"Закупочная\",\n            \"price\": 12.45\n        }\n    ],\n    \"transit\": {\n        date: \"2024-05-01\",\n        count: 255\n        \n    }\n}"
      },
      "MessageCard": {
        "title": "Root Type for MessageCard",
        "description": "Карточка сообщения",
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "branch": {
            "description": "Филиал",
            "type": "string"
          },
          "client": {
            "description": "Код контрагента-получателя сообщения",
            "type": "string"
          },
          "period": {
            "description": "Период",
            "type": "array",
            "items": {
              "format": "date",
              "type": "string"
            }
          },
          "type": {
            "description": "Тип документа",
            "enum": [
              "\"Взаиморасчеты\""
            ],
            "type": "string"
          },
          "href": {
            "description": "Ссылка на файл с документом(-ами)",
            "type": "string"
          },
          "state": {
            "description": "Статус сообщения. \n**done** - обработано успешно \n**error** - возникла ошибка. \n\nНеобязательное, по умолчанию - **done**.",
            "type": "string"
          },
          "error": {
            "description": "Текст сообщения об ошибке, возникшей на стороне поставщика",
            "type": "string",
            "example": "клиент не найден"
          }
        },
        "example": {
          "branch": "SM",
          "client": "181458",
          "period": [
            "2023-09-01",
            "2023-09-30"
          ],
          "type": "Взаиморасчеты",
          "href": "https://somewhere.else",
          "state": "done|error",
          "error": "сообщение об ошибке"
        }
      },
      "PromoDeleteReq": {
        "title": "Root Type for PromoDeleteReq",
        "description": "Тело запроса удаления акции",
        "required": [
          "document"
        ],
        "type": "object",
        "properties": {
          "document": {
            "description": "Номер документа акции",
            "type": "string"
          }
        },
        "example": {
          "document": "документ"
        }
      },
      "PromoDeleteRes": {
        "title": "Root Type for PromoDeleteRes",
        "description": "Ответ метода DELETE /v3/promo",
        "type": "object",
        "properties": {
          "deleted": {
            "format": "int32",
            "description": "Количество удалённых документов. Штатно - 1.",
            "type": "integer"
          },
          "error": {
            "description": "Сообщение об ошибке",
            "type": "string"
          }
        },
        "example": {
          "deleted": 1,
          "error": "Произошла Чудовищная Ошибка"
        }
      },
      "Client.Post.Object": {
        "title": "Root Type for Client.Post.Object",
        "description": "Объект точечного обновления контрагента",
        "type": "object",
        "properties": {
          "client": {
            "$ref": "#/components/schemas/Client.Post.Object.Client",
            "description": "Данные контрагента",
            "properties": {
              "_id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "updatedAt": {
                "format": "date-time",
                "type": "string"
              },
              "branch": {
                "type": "string"
              },
              "inn": {
                "type": "string"
              },
              "kpp": {
                "type": "string"
              },
              "ogrn": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "logisticAddress": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "active": {
                "type": "boolean"
              },
              "zone": {
                "type": "string"
              },
              "properties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "updateSource": {
                "type": "string"
              }
            }
          },
          "prices": {
            "description": "Персональные цены контрагента",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client.Post.Object.Price"
            }
          },
          "actions": {
            "description": "Промоакции для контрагента.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client.Post.Object.Actions.Action"
            }
          },
          "plakat": {
            "$ref": "#/components/schemas/Client.Post.Object.Plakat",
            "description": "Данные плаката",
            "properties": {
              "doc_number": {
                "type": "string"
              },
              "doc_id": {
                "type": "string"
              },
              "dateFrom": {
                "format": "date",
                "type": "string"
              },
              "dateTo": {
                "format": "date",
                "type": "string"
              },
              "products": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "example": {
          "client": {
            "_id": "61c2c7c5068fd8ec7de6d74c",
            "code": "А00002",
            "updatedAt": "2023-11-30T04:00:01+04:00",
            "branch": "SM",
            "inn": "6318120847",
            "kpp": "631801001",
            "ogrn": "",
            "name": "Табак Торг (Пугачевский тракт 25)",
            "address": "443074, Самарская обл, Самара г, Мориса Тореза ул, дом  119, квартира 49",
            "logisticAddress": "443101, Самарская обл, Самара г, Пугачевский тракт, дом  25",
            "type": "Розница",
            "active": true,
            "zone": "",
            "properties": [
              {
                "key": "currency",
                "value": "RUB"
              },
              {
                "key": "matrix",
                "value": false
              },
              {
                "key": "managers",
                "value": [
                  "Алёнин Алексей Юрьевич; +79613803191",
                  "Балабанова Оксана Александровна; +79277515441",
                  "Кочергин Евгений Алексеевич; 89277359414"
                ]
              },
              {
                "key": "warnings",
                "value": []
              },
              {
                "key": "mercury",
                "value": [
                  "f7a6074c-0df8-4eaa-902c-5c14053d059e"
                ]
              },
              {
                "key": "stop",
                "value": false
              },
              {
                "key": "debt",
                "value": 0
              },
              {
                "key": "balance",
                "value": 38097.16
              },
              {
                "key": "schedules",
                "value": [
                  {
                    "schedule": 25
                  },
                  {
                    "schedule": 25,
                    "type": "Общий прайс"
                  },
                  {
                    "schedule": 25,
                    "type": "Скоропорт"
                  },
                  {
                    "schedule": 0,
                    "type": "Заморозка"
                  },
                  {
                    "schedule": 25,
                    "type": "Товары для животных"
                  },
                  {
                    "schedule": 25,
                    "type": "Фрукты и овощи"
                  }
                ]
              },
              {
                "key": "price",
                "value": "Магазины"
              },
              {
                "key": "coordinates",
                "value": {
                  "latitude": 53.12201,
                  "longitude": 50.088659
                }
              },
              {
                "key": "reg_id",
                "value": [
                  "DLM-LU6B-ZVUZ"
                ]
              }
            ],
            "tags": [
              "КА_С00001",
              "КА_А10483",
              "КА_С00322",
              "КА_С00323"
            ],
            "updateSource": "IM|dalimo"
          },
          "prices": [
            {
              "productCode": "30892",
              "price": 92.72,
              "defaultPrice": 123.63,
              "isMatrix": true,
              "isDiscount": true,
              "allowedMarketing": false,
              "validTill": "2023-11-29"
            },
            {
              "productCode": "07905",
              "price": 92.72,
              "defaultPrice": 123.63,
              "isMatrix": true,
              "isDiscount": true,
              "allowedMarketing": false,
              "validTill": "2023-11-29"
            },
            {
              "productCode": "01352",
              "price": 92.72,
              "defaultPrice": 123.63,
              "isMatrix": false,
              "isDiscount": true,
              "allowedMarketing": false,
              "validTill": "2023-11-29"
            },
            {
              "productCode": "00682",
              "price": 92.72,
              "defaultPrice": 123.63,
              "isMatrix": false,
              "isDiscount": true,
              "allowedMarketing": false,
              "validTill": "2023-11-29"
            },
            {
              "productCode": "00681",
              "price": 92.72,
              "defaultPrice": 123.63,
              "isMatrix": false,
              "isDiscount": true,
              "allowedMarketing": false,
              "validTill": "2023-11-29"
            }
          ],
          "actions": [
            {
              "name": "GREEN KING, ПРОСТОНАРОДНЫЙ 5+1",
              "method": "n+1",
              "dateFrom": "2023-10-30",
              "dateTo": "2023-11-29",
              "document": "01031",
              "description": "GREEN KING, Простонародныйкупи 5шт.",
              "priority": 0,
              "giftProducts": [
                {
                  "productCode": "68547",
                  "Количество": 1,
                  "Коэффициент": 1,
                  "group": "1"
                }
              ],
              "requiredProducts": [],
              "products": {
                "groups": [
                  {
                    "_id": "1",
                    "count": 5
                  }
                ],
                "items": [
                  {
                    "productCode": "62822",
                    "group": "1",
                    "ratio": 1
                  },
                  {
                    "productCode": "62820",
                    "group": "1",
                    "ratio": 1
                  },
                  {
                    "productCode": "D4364",
                    "group": "1",
                    "ratio": 1
                  }
                ]
              }
            }
          ],
          "plakat": {
            "doc_number": "Мат-007471",
            "doc_id": "BN23332005625",
            "dateFrom": "2023-11-30",
            "dateTo": "2023-12-15",
            "products": [
              {
                "code": "S0143",
                "name": "Круассаны мини 7 DAYS крем ваниль 200г"
              },
              {
                "code": "50383",
                "name": "Батончик Славянка Обыкновенное чудо классическое 40г (24)"
              }
            ]
          }
        }
      },
      "Client.Post.Object.Client": {
        "title": "Root Type for Client.Post.Object.Client",
        "description": "Объест client",
        "required": [
          "branch",
          "inn",
          "code",
          "logisticAddress",
          "name"
        ],
        "type": "object",
        "properties": {
          "_id": {
            "description": "Идентификатор контрагента в prodly. Если он указан, то поиск контрагента не выполняется, вместо этого сразу обновляется найденный по _id контрагент.",
            "type": "string"
          },
          "code": {
            "description": "Код контрагента в системе учёта поставщика. Уникален в пределах филиала.",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "description": "Дата обновления контрагента. Если не указано, будет использоваться текущая дата/время",
            "type": "string"
          },
          "branch": {
            "description": "Код филиала контрагента",
            "type": "string"
          },
          "inn": {
            "description": "ИНН контрагента",
            "type": "string"
          },
          "kpp": {
            "description": "КПП контрагента",
            "type": "string"
          },
          "ogrn": {
            "description": "ОГРН",
            "type": "string"
          },
          "name": {
            "description": "Название торговой точки. ",
            "type": "string"
          },
          "address": {
            "description": "Адрес юридический",
            "type": "string"
          },
          "logisticAddress": {
            "description": "Адрес доставки.",
            "type": "string"
          },
          "type": {
            "description": "Тип клиента. Если null, то применяется тип клиента по умолчнаию.",
            "type": "string"
          },
          "active": {
            "description": "Флаг активности контрагента",
            "type": "boolean"
          },
          "zone": {
            "description": "Зона доставки. Если null, то применяется зона по умолчанию. ",
            "type": "string"
          },
          "properties": {
            "description": "Дополнительные характеристики. Передаются в виде массива элементов \"ключ-значение\". Значение может быть любым.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyObject"
            },
            "example": "[\n{\n    \"key\": \"REG_ID\",\n    \"value\": [\"111-222\", \"333-444\"]\n}\n]"
          },
          "tags": {
            "description": "Теги контрагента",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contacts": {
            "description": "Массив контактных лиц контрагента",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client.Post.Object.Contact"
            }
          },
          "managers": {
            "description": "Менеджеры",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FirmManagerLink"
            }
          }
        },
        "example": {
          "_id": "61c2c7c5068fd8ec7de6d74c",
          "code": "А00002",
          "updatedAt": "2023-11-30T04:00:01+04:00",
          "branch": "SM",
          "inn": "6318120847",
          "kpp": "631801001",
          "ogrn": "",
          "name": "Табак Торг (Пугачевский тракт 25)",
          "address": "443074, Самарская обл, Самара г, Мориса Тореза ул, дом  119, квартира 49",
          "logisticAddress": "443101, Самарская обл, Самара г, Пугачевский тракт, дом  25",
          "type": "Розница",
          "active": true,
          "zone": "",
          "contacts": [
            {
              "fio": "Василий Алибабаевич",
              "email": "uasya@mail.ru",
              "phone": "+79279050808"
            }
          ],
          "managers": [
            {
              "firm": "F0001",
              "manager": "M0001"
            }
          ],
          "properties": [
            {
              "key": "currency",
              "value": "RUB"
            },
            {
              "key": "matrix",
              "value": false
            },
            {
              "key": "managers",
              "value": [
                "Алёнин Алексей Юрьевич; +79613803191",
                "Балабанова Оксана Александровна; +79277515441",
                "Кочергин Евгений Алексеевич; 89277359414"
              ]
            },
            {
              "key": "warnings",
              "value": []
            },
            {
              "key": "mercury",
              "value": [
                "f7a6074c-0df8-4eaa-902c-5c14053d059e"
              ]
            },
            {
              "key": "stop",
              "value": false
            },
            {
              "key": "debt",
              "value": 0
            },
            {
              "key": "balance",
              "value": 38097.16
            },
            {
              "key": "schedules",
              "value": [
                {
                  "schedule": 25
                },
                {
                  "schedule": 25,
                  "type": "Общий прайс"
                },
                {
                  "schedule": 25,
                  "type": "Скоропорт"
                },
                {
                  "schedule": 0,
                  "type": "Заморозка"
                },
                {
                  "schedule": 25,
                  "type": "Товары для животных"
                },
                {
                  "schedule": 25,
                  "type": "Фрукты и овощи"
                }
              ]
            },
            {
              "key": "price",
              "value": "Магазины"
            },
            {
              "key": "coordinates",
              "value": {
                "latitude": 53.12201,
                "longitude": 50.088659
              }
            },
            {
              "key": "reg_id",
              "value": [
                "DLM-LU6B-ZVUZ"
              ]
            }
          ],
          "tags": [
            "КА_С00001",
            "КА_А10483",
            "КА_С00322"
          ],
          "updateSource": "IM|dalimo"
        }
      },
      "Client.Post.Object.Plakat": {
        "title": "Root Type for Client.Post.Object.Plakat",
        "description": "Объект plakat",
        "required": [
          "dateFrom",
          "dateTo",
          "products"
        ],
        "type": "object",
        "properties": {
          "doc_number": {
            "description": "Наименование документа плаката в учётной системе поставщика",
            "type": "string"
          },
          "doc_id": {
            "description": "Идентификатор документа плаката в учётной системе поставщика",
            "type": "string"
          },
          "dateFrom": {
            "format": "date",
            "description": "Дата начала действия плаката в формате \"гггг-мм-дд\"",
            "type": "string"
          },
          "dateTo": {
            "format": "date",
            "description": "Дата окончания действия плаката в формате \"гггг-мм-дд\"",
            "type": "string"
          },
          "products": {
            "description": "Товары",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/plakatProduct"
            }
          }
        },
        "example": {
          "doc_number": "Мат-007471",
          "doc_id": "BN23332005625",
          "dateFrom": "2023-11-30",
          "dateTo": "2023-12-15",
          "products": [
            {
              "code": "S0143",
              "name": "Круассаны мини 7 DAYS крем ваниль 200г"
            },
            {
              "code": "50383",
              "name": "Батончик Славянка Обыкновенное чудо классическое 40г (24)"
            }
          ]
        }
      },
      "Client.Post.Object.Actions.Action": {
        "title": "Root Type for Client.Post.Object.Actions.Action",
        "description": "Объект промоакции. ",
        "required": [
          "dateFrom",
          "dateTo",
          "description",
          "method"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "Наименование акции (отображается на сайте и в приложении).",
            "type": "string"
          },
          "method": {
            "description": "Тип акции.",
            "enum": [
              "discount",
              "n+%",
              "s+%",
              "n+1",
              "s+1",
              "n+p",
              "s+p",
              "nn+%",
              "mc+%",
              "mc+p"
            ],
            "type": "string"
          },
          "dateFrom": {
            "format": "date",
            "description": "Дата начала акции в формате \"гггг.мм.дд\"",
            "type": "string"
          },
          "dateTo": {
            "format": "date",
            "description": "Дата окончания акции в формате \"гггг.мм.дд\"",
            "type": "string"
          },
          "document": {
            "description": "Номер документа акции в системе учёта поставщика",
            "type": "string"
          },
          "description": {
            "description": "Описание акции (отображается на сайте и в приложении)",
            "type": "string"
          },
          "giftProducts": {
            "description": "Товары в подарок. Применяется в акциях с методом \"n+1\", \"s+1\"",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Promo.RequiredProduct"
            }
          },
          "requiredProducts": {
            "description": "Товары которые должны быть куплены, чтобы акция сработала. Используется в методах n+1, s+1, n+%, s+%",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Promo.RequiredProduct"
            }
          },
          "products": {
            "$ref": "#/components/schemas/PromoProducts",
            "description": "Товары, участвующие в акции",
            "properties": {
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string"
                    },
                    "count": {
                      "format": "int32",
                      "type": "integer"
                    }
                  }
                }
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "productCode": {
                      "type": "string"
                    },
                    "group": {
                      "type": "string"
                    },
                    "ratio": {
                      "format": "int32",
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "discount": {
            "description": "Глобальный процент скидки в акции. Применяется в методах discount, n+%",
            "type": "number"
          },
          "levels": {
            "description": "Поле используется в акциях типа s+% (скидка от суммы).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoLevel"
            }
          },
          "price": {
            "description": "Глобальная цена на все товары, участвующие в акции. Может применяться в акциях с методом discount, n+% вместо поля глобальной скидки discount.",
            "type": "number"
          },
          "type": {
            "description": "Тип клиента, к которому применяется акция",
            "type": "string"
          },
          "promocode": {
            "description": "Промокод для активации скрытой акции. Пропустите это поле, если акция действует безусловно, без ввода промокода в корзине.",
            "type": "string"
          },
          "trigger": {
            "$ref": "#/components/schemas/PromoTrigger",
            "description": "Объект с описанием триггера для акций типа \"Мультикомбо\" - условий, без соблюдения которых промо не сработает. Применяется только в акциях с типом mc+%, mc+1 и mc+p"
          },
          "image": {
            "description": "Ссылка на изображение для акций типа \"Мультикомбо\", будет отображаться в списке акций.",
            "type": "string"
          }
        },
        "example": {
          "name": "GREEN KING, ПРОСТОНАРОДНЫЙ 5+1",
          "method": "n+1",
          "dateFrom": "2023-10-30",
          "dateTo": "2023-11-29",
          "document": "01031",
          "description": "GREEN KING, Простонародныйкупи 5шт.",
          "giftProducts": [
            {
              "productCode": "68547",
              "count": 1,
              "ratio": 1
            }
          ],
          "requiredProducts": [
            {
              "productCode": "454454",
              "coiunt": 5,
              "ratio": 3
            }
          ],
          "products": {
            "groups": [
              {
                "_id": "1",
                "count": 5
              }
            ],
            "items": [
              {
                "productCode": "62822",
                "group": "1",
                "ratio": 1
              },
              {
                "productCode": "62820",
                "group": "1",
                "ratio": 1
              },
              {
                "productCode": "D4364",
                "group": "1",
                "ratio": 1
              }
            ]
          }
        }
      },
      "Client.Post.Object.Price": {
        "title": "Root Type for Client.Post.Object.Price",
        "description": "Элемент массива prices",
        "required": [
          "productCode",
          "price",
          "isMatrix",
          "isDiscount",
          "defaultPrice",
          "allowedMarketing"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "price": {
            "format": "double",
            "description": "Цена после применения скидки",
            "type": "number"
          },
          "defaultPrice": {
            "format": "double",
            "description": "Цена по умолчанию, до применения скидки",
            "type": "number"
          },
          "isMatrix": {
            "description": "Товар для матрицы",
            "type": "boolean"
          },
          "isDiscount": {
            "description": "Создавать соответствующую промоакцию",
            "type": "boolean"
          },
          "allowedMarketing": {
            "description": "Разрешено дальнейшее применение промо-акций",
            "type": "boolean"
          },
          "validTill": {
            "format": "date",
            "description": "Цена дествительна до. Дата в формате \"гггг-мм-дд\"",
            "type": "string"
          }
        },
        "example": {
          "productCode": "30892",
          "price": 92.72,
          "defaultPrice": 123.63,
          "isMatrix": true,
          "isDiscount": true,
          "allowedMarketing": false,
          "validTill": "2023-11-29"
        }
      },
      "Promo.RequiredProduct": {
        "title": "Root Type for Promo.RequiredProduct",
        "description": "Элемент массива requiredProducts",
        "required": [
          "ratio",
          "productCode",
          "count"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "ratio": {
            "description": "Коэффициент, на который будут умножено поле count",
            "type": "number"
          },
          "count": {
            "description": "Количество, необзодимое, чтобы акция сработала",
            "type": "number"
          }
        },
        "example": {
          "productCode": "fff-ggg-ttt",
          "ratio": 3
        }
      },
      "OrderContact": {
        "title": "Root Type for OrderContact",
        "description": "Контактные данные пользователя в заказе",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "name": "Василькова Елена",
          "phone": "123-456-789",
          "emails": [
            "vas@example.org",
            "ilkova@example.org"
          ]
        }
      },
      "OrderInvoice": {
        "title": "Root Type for OrderInvoice",
        "description": "Данные по доставке",
        "type": "object",
        "properties": {
          "number": {
            "description": "Номер накладной",
            "type": "string"
          },
          "car": {
            "$ref": "#/components/schemas/OrderInvoiceCar",
            "description": "Машина (госномер, код по системе учёта поставщика)",
            "properties": {
              "code": {
                "type": "string"
              },
              "number": {
                "type": "string"
              }
            }
          },
          "forwarder": {
            "$ref": "#/components/schemas/OrderInvoiceForwarder",
            "description": "Водитель (ФИО, телефон, код по системе учёта поставщика)",
            "properties": {
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              }
            }
          },
          "invoiceId": {
            "description": "Id документа в УС поставщика. Предполагается, что меняться он не может. Обязательный реквизит, если заказ создан не в Prodly",
            "type": "string"
          },
          "debt": {
            "description": "задолженность по накладной",
            "type": "number"
          }
        },
        "example": {
          "number": "ПМПМ026170",
          "debt": 123.45,
          "invoiceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "car": {
            "code": "SM006597",
            "number": "А 499 ТМ 763"
          },
          "forwarder": {
            "code": "С06397",
            "name": "КИНДЕЕВ Андрей Сергеевич",
            "phone": "89279033761"
          }
        }
      },
      "OrderInvoiceCar": {
        "title": "Root Type for OrderInvoiceCar",
        "description": "Машина",
        "type": "object",
        "properties": {
          "code": {
            "description": "Код машины в системе учёта поставщика",
            "type": "string"
          },
          "number": {
            "description": "Госномер",
            "type": "string"
          }
        },
        "example": {
          "code": "SM006597",
          "number": "А 499 ТМ 763"
        }
      },
      "OrderInvoiceForwarder": {
        "title": "Root Type for OrderInvoiceForwarder",
        "description": "Водитель",
        "type": "object",
        "properties": {
          "code": {
            "description": "Код водителя",
            "type": "string"
          },
          "name": {
            "description": "ФИО водителя",
            "type": "string"
          },
          "phone": {
            "description": "Телефон",
            "type": "string"
          }
        },
        "example": {
          "code": "С06397",
          "name": "КИНДЕЕВ Андрей Сергеевич",
          "phone": "89279033761"
        }
      },
      "StockTransitElement": {
        "title": "Root Type for StockTransitElement",
        "description": "",
        "required": [
          "count",
          "date"
        ],
        "type": "object",
        "properties": {
          "date": {
            "format": "date",
            "description": "Когда ожидается поступление, дата в ISO-формате: YYYY-MM-DD",
            "type": "string"
          },
          "count": {
            "format": "double",
            "description": "Количество в базовых единицах",
            "type": "number"
          }
        },
        "example": {
          "date": "2024-10-01",
          "count": 225.6
        }
      },
      "PromoGiftProductsItem": {
        "title": "Root Type for PromoGiftProductsItem",
        "description": "Элемент массива giftProducts",
        "required": [
          "productCode",
          "ratio",
          "count"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "ratio": {
            "format": "int32",
            "description": "Коэффициент",
            "type": "integer"
          },
          "count": {
            "description": "Количество",
            "type": "number"
          },
          "price": {
            "description": "Цена товара. Применяется только в n+p, s+p.",
            "type": "number"
          },
          "restrictions": {
            "$ref": "#/components/schemas/PromoRestrictions",
            "description": "ограничения. обрабатываем лоько ограничения по клдичеству"
          }
        },
        "example": {
          "productCode": "W8025",
          "ratio": 1,
          "count": 1,
          "price": 1
        }
      },
      "PromoCard": {
        "description": "Промоакции.\n* Суммарное количество тегов в полях `allow` и `deny` не должно превышать 1000.\n* Поля discount и price доступны для всей акции, группы товаров в акции или одного конкретного товара. Преимуществом пользуются значения снизу дерева. То есть, если не установлен discount на товар, то будет предпринята попытка найти discount на группу или глобальный discount. \n* Одновременно может быть использовано только одно поле: либо discount, либо price. Если указаны оба поля, то будет использовано поле price, а discount проигнорирован.",
        "required": [
          "branch",
          "method",
          "document",
          "dateFrom",
          "dateTo",
          "priority",
          "products"
        ],
        "type": "object",
        "properties": {
          "branch": {
            "description": "Код филиала",
            "type": "string"
          },
          "method": {
            "description": "Тип акции",
            "enum": [
              "discount",
              "n+%",
              "s+%",
              "n+1",
              "s+1",
              "n+p",
              "s+p",
              "nn+%",
              "mc+%",
              "mc+p"
            ],
            "type": "string"
          },
          "document": {
            "description": "Идентификатор акции в системе учёта поставщика",
            "type": "string"
          },
          "dateFrom": {
            "description": "Дата начала действия акции в формате ISO 8601 (ГГГГ-ММ-ДД)",
            "type": "string",
            "example": "2025-06-01"
          },
          "dateTo": {
            "description": "Дата окончания действия акции в формате ISO 8601 (ГГГГ-ММ-ДД) ",
            "type": "string",
            "example": "2025-06-30"
          },
          "priority": {
            "description": "Приоритет в рамках одной и той же механики. Чем меньше значение, тем приоритетнее.",
            "type": "integer"
          },
          "products": {
            "$ref": "#/components/schemas/PromoProducts",
            "description": "Товары, участвующие в акции"
          },
          "name": {
            "description": "Название. В методе discount не используется.",
            "type": "string"
          },
          "description": {
            "description": "Описание акции. В методе discount не используется.",
            "type": "string"
          },
          "allow": {
            "description": "Массив списка разрешающих клиентских тегов. Если null, то разрешены все теги (при пустом deny, соответственно).\n\nСуммарное количество тегов в полях `allow` и `deny` не должно превышать 2000!",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoTagsArr"
            }
          },
          "deny": {
            "description": "Массив списка запрещающих клиентских тегов. Если null, то запрещены все теги, кроме тех, что явно не указаны в allow. При пустых allow и deny акция доступна всем.\n\nСуммарное количество тегов в полях `allow` и `deny` не должно превышать 2000!",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoTagsArr"
            }
          },
          "type": {
            "description": "Тип клиента",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "discount": {
            "description": "Процент скидки. Применяется в методе discount, n+%.",
            "type": "number"
          },
          "giftProducts": {
            "description": "Товары в подарок. Применяется в методах n+1, s+1, n+p, s+p",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoGiftProductsItem"
            }
          },
          "requiredProducts": {
            "description": "Обязательные товары, которые должны быть куплены, чтобы акция сработала. Используется в методах n+1, s+1, n+%",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoProductsItem"
            }
          },
          "client": {
            "description": "Код клиента для персональной скидки. Используется в методе discount.",
            "type": "string"
          },
          "delete": {
            "description": "Флаг удаления документа акции. Если передать как true, то промо-акция с указанным document будет удалена. При этом остальные поля, кроме document необязательны.",
            "type": "boolean"
          },
          "price": {
            "description": "Глобальная цена на все товары, участвующие в акции. Может применяться в акциях с методом n+% вместо поля глобальной скидки discount.",
            "type": "number"
          },
          "levels": {
            "description": "Поле используется в акциях с возможностью установки ступенчатой скидки типа s+% (скидка от суммы), nn+% (скидка от кол-ва).",
            "maxItems": 3,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromoLevel"
            }
          },
          "promocode": {
            "description": "Промокод для активации скрытой акции. Пропустите это поле, если акция действует безусловно, без ввода промокода в корзине.",
            "type": "string"
          },
          "trigger": {
            "$ref": "#/components/schemas/PromoTrigger",
            "description": "Объект с описанием триггера для акций типа \"Мультикомбо\" - условий, без соблюдения которых промо не сработает. Применяется только в акциях с типом mc+%, mc+1 и mc+p."
          },
          "image": {
            "description": "Ссылка на изображение для акций типа \"Мультикомбо\", будет отображаться в списке акций.",
            "type": "string"
          }
        }
      },
      "Client.Post.Object.Contact": {
        "title": "Root Type for Client.Post.Object.Contact",
        "description": "Объект \"Контакты\" контрагента",
        "type": "object",
        "properties": {
          "phone": {
            "description": "Контактный номер телефона",
            "type": "string"
          },
          "email": {
            "description": "Адрес электронной почты",
            "type": "string"
          },
          "fio": {
            "description": "ФИО контактного лица",
            "type": "string"
          }
        },
        "example": {
          "phone": "+7987988544",
          "email": "uasya@mail.ru",
          "fio": "Аликпер Васильевич Худайбердыев"
        }
      },
      "Manager.Object": {
        "title": "Root Type for Manager.Object",
        "description": "Торговый представитель поставщика",
        "required": [
          "active",
          "code",
          "fio",
          "phone"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Код менеджера в 1С",
            "type": "string"
          },
          "fio": {
            "description": "ФИО",
            "type": "string"
          },
          "phone": {
            "description": "Телефон",
            "type": "string"
          },
          "active": {
            "description": "Признак активности менеджера",
            "type": "boolean"
          },
          "tags": {
            "description": "тэги (рекомендуется добалять индивидуальный тэг с кодом агента)",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "code": "123456",
          "fio": "Исаев Максим Максимович",
          "phone": "+7954987962",
          "active": true,
          "tags": [
            "EMP_SM_123456"
          ]
        }
      },
      "Firm.Object": {
        "title": "Root Type for Firm.Object",
        "description": "Юридическое лицо",
        "required": [
          "active",
          "title",
          "inn",
          "code",
          "address"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Уникальный в филиале код фирмы",
            "type": "string"
          },
          "fullName": {
            "description": "Полное наименование фирмы",
            "type": "string"
          },
          "inn": {
            "description": "ИНН",
            "type": "string"
          },
          "kpp": {
            "description": "КПП",
            "type": "string"
          },
          "active": {
            "description": "Признак активности фирмы",
            "type": "boolean"
          },
          "address": {
            "description": "Адрес фирмы",
            "type": "string"
          },
          "ogrn": {
            "description": "ОГРН",
            "type": "string"
          },
          "title": {
            "description": "Наименование для отображения",
            "type": "string"
          },
          "accounts": {
            "description": "Банковские реквизиты поставщика.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FirmAccount"
            }
          }
        },
        "example": {
          "code": "01-0123456789",
          "fullName": "ООО Ромашка",
          "inn": "0123456789",
          "kpp": "012345678",
          "active": true,
          "address": "",
          "ogrn": "",
          "title": "Продукты мира",
          "accounts": []
        }
      },
      "Client.FirmManager.Link": {
        "title": "Root Type for Client.FirmManager.Link",
        "description": "Связка \"фирма-менеджер\" для контрагента.",
        "type": "object",
        "properties": {
          "firm": {
            "description": "Код фирмы",
            "type": "string"
          },
          "manager": {
            "description": "Код менеджера",
            "type": "string"
          }
        },
        "example": {
          "firm": "F00001",
          "manager": "M00001"
        }
      },
      "FirmManagerLink": {
        "title": "Root Type for FirmManagerLink",
        "description": "Связка \"менеджер-фирма\"",
        "type": "object",
        "properties": {
          "firm": {
            "description": "Код фирмы (юрлица) в 1С",
            "type": "string"
          },
          "manager": {
            "description": "Код менеджера в 1С",
            "type": "string"
          },
          "shedule": {
            "description": "Десятичное представление битовой маски запланированных дней посещения в текущем месяце, например 10568325 = `0b0000000101000010100001010000101` - 1,3,8,10,15,17,22,24 число",
            "type": "number"
          }
        },
        "example": {
          "firm": "F0001",
          "manager": "M0001"
        }
      },
      "VendorOrderIN.Client": {
        "description": "Данные о клиенте при загрузке заказа на платформу",
        "required": [
          "clientCode"
        ],
        "type": "object",
        "properties": {
          "clientCode": {
            "description": "Код клиента в УС поставщика",
            "type": "string"
          },
          "clientId": {
            "description": "id клиента на сайте Prodly",
            "type": "string"
          }
        }
      },
      "ClientDebet": {
        "title": "Root Type for ClientDebet",
        "description": "Данне о дебеторсокй задолженности клиента",
        "type": "object",
        "properties": {
          "clientCode": {
            "description": "Код клиента в УС поставщика",
            "type": "string"
          },
          "documents": {
            "description": "Массив документов",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientDebetDocument"
            }
          }
        },
        "example": "[\n    {\n        \"clientCode\": \"С00001\",\n        \"documents\": [\n            {\n                \"firmCode\": \"061\",\n                \"agentCode\": \"00043012\",\n                \"docId\": \"X123123123123\",\n                \"docType\": \"расходная накладная\",\n                \"docNumber\": \"РН12312\",\n                \"docDate\": \"2024-07-10\",\n                \"summa\": 1234.56,\n                \"debet\": 3456.78\n                \"note\": \"\",\n                \"payUntill\": \"2018-01-17\"\n            },\n            {\n                \"firmCode\": \"ril\",\n                \"agentCode\": \"lmn\",\n                \"docId\": \"09rqa\",\n                \"docType\": \"\",\n                \"docNumber\": \"\",\n                \"docDate\": \"2018-01-17\",\n                \"summa\": 76.22,\n                \"debet\": 28.17,\n                \"note\": \"9g11o2og\",\n                \"payUntill\": \"2018-01-17\"\n            }\n        ]\n    }\n]"
      },
      "ClientDebetDocument": {
        "title": "Root Type for ClientDebetDocument",
        "description": "Документ дебиторской задолженности",
        "required": [
          "debet",
          "firmCode",
          "summa"
        ],
        "type": "object",
        "properties": {
          "firmCode": {
            "description": "код юридического лица поставщика",
            "type": "string"
          },
          "agentCode": {
            "description": "код агента/торгового представителя",
            "type": "string"
          },
          "docId": {
            "description": "идентификатор документа в УС поставщика",
            "type": "string"
          },
          "docType": {
            "description": "тип документа (\"расходная накладная\" и т.п.) для отображения пользователю",
            "type": "string"
          },
          "docNumber": {
            "description": "номер документа",
            "type": "string"
          },
          "docDate": {
            "format": "date",
            "description": "дата документа",
            "type": "string"
          },
          "summa": {
            "format": "double",
            "description": "сумма документа",
            "type": "number"
          },
          "debet": {
            "format": "double",
            "description": "задолженность по документу (м.б. меньше суммы документа, в т.ч. отрицательной при возникновении \"переплаты\" (возврат после оплаты и т.п.)",
            "type": "number"
          },
          "note": {
            "description": "примечания, комментарии",
            "type": "string"
          },
          "payUntill": {
            "format": "date",
            "description": "срок оплаты (дата, до которой требуется оплатить документ)",
            "type": "string"
          }
        },
        "example": {
          "firmCode": "061",
          "agentCode": "00043012",
          "docId": "X123123123123",
          "docType": "расходная накладная",
          "docNumber": "РН12312",
          "docDate": "2024-07-10",
          "payUntil": "2024-07-24",
          "summa": 1234.56,
          "debet": 3456.78
        }
      },
      "SalePlan": {
        "title": "Root Type for SalePlan",
        "description": "",
        "required": [
          "items",
          "dateFrom",
          "dateTo"
        ],
        "type": "object",
        "properties": {
          "active": {
            "description": "Признак активности документа",
            "type": "boolean"
          },
          "branch": {
            "description": "Код филиала поставщика",
            "type": "string"
          },
          "dateFrom": {
            "format": "date",
            "description": "Дата начала действия документа в формате ISO: 'YYYY-mm-dd'",
            "type": "string"
          },
          "dateTo": {
            "format": "date",
            "description": "Дата окончания действия документа в формате ISO: 'YYYY-mm-dd'",
            "type": "string"
          },
          "name": {
            "description": "Наименование документа",
            "type": "string"
          },
          "items": {
            "description": "Массив объектов с товарами",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalePlanItem"
            }
          },
          "image": {
            "description": "Ссылка на картинку",
            "type": "string"
          },
          "text": {
            "description": "Текстовое примечание к документу",
            "type": "string"
          },
          "url": {
            "description": "Дополнительная ссылка на сторонние ресурсы (соц.сети)",
            "type": "string"
          },
          "document": {
            "description": "Идентификатор документа",
            "type": "string"
          }
        },
        "example": "[\n    {\n        \"document\": \"dm7\",\n        \"active\": true,\n        \"branch\": \"SM\",\n        \"dateFrom\": \"2018-01-17\",\n        \"dateTo\": \"2018-01-17\",\n        \"name\": \"Установка плана товарооборота на сентябрь\",\n        \"items\": [\n            {\n                \"clientCode\": \"С010101\",\n                \"blocks\": [\n                    {\n                        \"blockName\": \"Пестравка\",\n                        \"goodsTags\": [\"П00001\"],\n                        \"plansumm\": 2.75,\n                        \"factsumm\": 3.52,\n                        \"unit\": \"р.\"\n                    },\n                    {\n                        \"blockName\": \"Купино\",\n                        \"goodsTags\": [\"К0010101\"],\n                        \"plansumm\": 4.95,\n                        \"factsumm\": 23.76,\n                        \"unit\": \"р.\"\n                    }\n                ]\n            },\n             \n        ],\n        \"image\": \"https://images.com/iamge.png\",\n        \"text\": \"Подробное описание телевизора\",\n        \"url\": \"https://vk.com/prodly_store\"\n    }\n]"
      },
      "SalePlanItem": {
        "title": "Root Type for SalePlanClient",
        "description": "",
        "required": [
          "goodsTag",
          "blockName",
          "plan",
          "fact",
          "unit",
          "blocks"
        ],
        "type": "object",
        "properties": {
          "clientCode": {
            "description": "Код клиента в учетной системе поставщика",
            "type": "string"
          },
          "blocks": {
            "description": "Массив товарных блоков",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalePlanClientProduct"
            }
          }
        },
        "example": [
          {
            "clientCode": "j",
            "blocks": [
              {
                "blockName": "u09",
                "plansumm": 47.52,
                "factsumm": 15.33,
                "unit": "",
                "goodsTags": [
                  "",
                  "lgh"
                ]
              },
              {
                "blockName": "kj",
                "plansumm": 42.36,
                "factsumm": 64.85,
                "unit": "or",
                "goodsTags": [
                  "i",
                  "k"
                ]
              }
            ]
          }
        ]
      },
      "SalePlanClientProduct": {
        "title": "Root Type for SalePlanClientProduct",
        "description": "",
        "required": [
          "plansumm",
          "goodsTags"
        ],
        "type": "object",
        "properties": {
          "blockName": {
            "description": "Название блока (поставщика/группы товаров)",
            "type": "string"
          },
          "plansumm": {
            "format": "double",
            "description": "Планка по минимальной закупаемой денежной сумме",
            "type": "number"
          },
          "factsumm": {
            "format": "double",
            "description": "Фактическая сумма, на которую сейчас закупился клиент",
            "type": "number"
          },
          "unit": {
            "description": "единицы, в которых передаётся план и факт. руб/шт/%",
            "type": "string"
          },
          "goodsTags": {
            "description": "Товарные теги",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": "[\n    {\n        \"blockName\": \"Goods\",\n        \"plansumm\": 38.51,\n        \"factsumm\": 62.81,\n        \"unit\": \"s\",\n        \"goodsTags\": [\n            \"\"gr,\n            \"je\"\n        ]\n    }\n]"
      },
      "Trader.Task.Object": {
        "title": "Root Type for Task.Trader.Object",
        "description": "Объект заданий для торгового представителя\n\n ",
        "required": [
          "guid",
          "clientCode",
          "description",
          "till",
          "percent",
          "state",
          "agentCode"
        ],
        "type": "object",
        "properties": {
          "guid": {
            "description": "Идентификатор задачи в системе учёта поставщика",
            "type": "string"
          },
          "clientCode": {
            "description": "Код контрагента в системе учёта поставщика",
            "type": "string"
          },
          "description": {
            "description": "Описание задания",
            "type": "string"
          },
          "till": {
            "description": "Выполнить до. Дата в формате ISODate (напр. 2024-05-15)",
            "type": "string"
          },
          "percent": {
            "description": "Процент выполнения задания",
            "type": "number"
          },
          "state": {
            "description": "Статус задания\n\nСоздана - new\nВ Работе - inprodgress\nНе выполнена - failed\nВыполнена - done\nОтменена - canceled",
            "type": "number"
          },
          "products": {
            "description": "Список товаров в задании",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trader.Task.Object.Product"
            }
          },
          "source": {
            "description": "Идентификатор внутренней системы поставщика, например \"1С\"",
            "type": "string"
          },
          "auto": {
            "description": "Признак, позволяющий агенту закрывать задачу. auto=true означает, что закрытие задачи происходит в учётной системе, а не кнопкой \"ОК\".",
            "type": "boolean"
          },
          "agentCode": {
            "description": "Код агента из 1С",
            "type": "string"
          },
          "number": {
            "description": "Номер документа в 1С",
            "type": "string"
          }
        },
        "example": {
          "guid": "9e943ae7-c1bb-43c3-84ff-aa5ce971277d",
          "clientCode": "С23578",
          "description": "Починить МТрейд. Срочно",
          "till": "2024-05-15",
          "percent": 100,
          "state": 1,
          "auto": true,
          "source": "1C",
          "products": [
            {
              "productCode": "W2360",
              "toSale": 5,
              "sold": 0,
              "percent": 0
            }
          ]
        }
      },
      "Trader.Task.Object.Product": {
        "title": "Root Type for Task.Trader.Object.Product",
        "description": "Элемент массива товаров в задании торгового представителя",
        "type": "object",
        "properties": {
          "code": {
            "description": "Код товара",
            "type": "string"
          },
          "toSale": {
            "format": "int32",
            "description": "Сколько единиц нужно продать",
            "type": "integer"
          },
          "sold": {
            "format": "int32",
            "description": "Сколько единиц товара продано",
            "type": "integer"
          },
          "percent": {
            "format": "int32",
            "description": "Процент выполнения",
            "type": "integer"
          }
        },
        "example": {
          "code": "W2360",
          "toSale": 5,
          "sold": 0,
          "percent": 0
        }
      },
      "Trader.Visit.Location": {
        "title": "Root Type for Trader.Visit.Location",
        "description": "координаты",
        "type": "object",
        "properties": {
          "latitude": {
            "format": "double",
            "description": "широта",
            "type": "number"
          },
          "longitude": {
            "format": "double",
            "description": "долгота",
            "type": "number"
          }
        },
        "example": {
          "latitude": 52.52,
          "longitude": 53.53
        }
      },
      "Trader.Visit.Request": {
        "title": "Root Type for Trader.Visit.Requiest",
        "description": "",
        "type": "object",
        "properties": {
          "total": {
            "format": "int32",
            "type": "integer"
          },
          "avgTotal": {
            "format": "int32",
            "type": "integer"
          },
          "avgSKUcount": {
            "format": "int32",
            "type": "integer"
          },
          "SKUcount": {
            "format": "int32",
            "type": "integer"
          },
          "result": {
            "type": "string"
          }
        },
        "example": {
          "total": 12,
          "avgTotal": 6,
          "avgSKUcount": 3,
          "SKUcount": 4,
          "result": "win"
        }
      },
      "ReturnItem": {
        "title": "Root Type for ReturnItem",
        "description": "Заявка на возврат",
        "required": [
          "contacts",
          "createdAt",
          "createdBy",
          "invoices",
          "orderNumber",
          "products",
          "state",
          "id",
          "clientCode",
          "number"
        ],
        "type": "object",
        "properties": {
          "orderNumber": {
            "description": "Номер заказа",
            "type": "string"
          },
          "state": {
            "description": "Состояние заявки. new - новая, sent - отправлена поставщику, canceled - отменена, partial - частично завершена, done - завершена.",
            "enum": [
              "new",
              "sent",
              "canceled",
              "done",
              "partial"
            ],
            "type": "string"
          },
          "contacts": {
            "$ref": "#/components/schemas/UserContact",
            "description": "Контакты пользователя",
            "properties": {
              "name": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "createdAt": {
            "format": "date-time",
            "description": "Время создания заявки в формате ISODate",
            "type": "string"
          },
          "createdBy": {
            "description": "ID пользователя в системе учёта Prodly",
            "type": "string"
          },
          "note": {
            "description": "Комментарий клиента",
            "type": "string"
          },
          "invoices": {
            "description": "Ссылки на загруженные фото накладных. Минимум 1, максимум 10 фото.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "description": "Массив товаров для возврата",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProduct"
            }
          },
          "extra": {
            "description": "Ссслки на сканы дополнительных документов, требуемых поставщиком для возврата (договор, заявление, скан паспорта и т.п.)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "description": "Идентификатор заявки на возврат в системе учёта Prodly",
            "type": "string"
          },
          "clientCode": {
            "description": "код клиента",
            "type": "string"
          },
          "number": {
            "description": "Номер заявки на возврат",
            "type": "string"
          },
          "agentCode": {
            "description": "Код торгового представителя в УС поствщика (при наличии)",
            "type": "string"
          }
        },
        "example": [
          {
            "id": "1ed4dd57-7d54-43b7-b950-3e881adf32ba",
            "number": "296C-9ADE9R",
            "vendor": "dalimo",
            "branch": "CH",
            "client": "2cyysimspvEAGKthThIJ25XWkiX",
            "clientCode": "E15780",
            "orderNumber": "73SQCJX-11995",
            "state": "new",
            "createdAt": "2025-01-14T05:59:43.412Z",
            "createdBy": "c6WPTZhsbjquRYq23",
            "note": "",
            "invoices": [],
            "extra": [],
            "rows": [
              {
                "productCode": "59556",
                "invoiceNumber": "РЧП0036713",
                "qty": 4,
                "reason": "Брак",
                "images": [
                  "https://hb.bizmrg.com/prodly/RETURNS/dalimo/2025-01-14/CH/73SQCJX-11995/1736834388621_776.png"
                ]
              },
              {
                "productCode": "62819",
                "invoiceNumber": "РЧП0036693",
                "qty": 3,
                "reason": "Брак",
                "images": [
                  "https://hb.bizmrg.com/prodly/RETURNS/dalimo/2025-01-14/CH/73SQCJX-11995/1736834391054_597.png"
                ]
              }
            ]
          }
        ]
      },
      "UserContact": {
        "title": "Root Type for UserContact",
        "description": "Контактные данные пользователя",
        "type": "object",
        "properties": {
          "name": {
            "description": "Имя, фамилия",
            "type": "string"
          },
          "phone": {
            "description": "Телефон",
            "type": "string"
          },
          "emails": {
            "description": "Email",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "name": "Ромашкин Степан",
          "phone": "+79121765444",
          "emails": [
            "stepanr@mail.ru",
            "roman-stepashknd@yandex.ru"
          ]
        }
      },
      "ReturnProduct": {
        "title": "Root Type for ReturnRow",
        "description": "Элемент товара для возврата",
        "required": [
          "images",
          "productCode",
          "qty",
          "reason"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара в системе учёта поставщика.",
            "type": "string"
          },
          "qty": {
            "description": "Количество товара в единицах измерения поставщика (шт., кг.)",
            "type": "number"
          },
          "reason": {
            "description": "Причина возврата. \"Срок\" - истёк срок хранения. \"Брак\" - обнаружен брак.",
            "enum": [
              "Брак",
              "Срок"
            ],
            "type": "string"
          },
          "images": {
            "description": "Ссылки на изображения возвращаемого товара. Для брака минимум 2 фото, для возврата по сроку годности - одно фото.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "invoiceNumber": {
            "description": "номер накладной, по которой отгружен товар. ",
            "type": "string"
          }
        },
        "example": {
          "productCode": "59556",
          "invoiceNumber": "РЧП0036713",
          "qty": 4,
          "reason": "Брак",
          "images": [
            "https://hb.bizmrg.com/prodly/RETURNS/dalimo/2025-01-14/CH/73SQCJX-11995/1736834388621_776.png"
          ]
        }
      },
      "ReturnVendorItem": {
        "description": "Элемент массива обновления заявок на возвраты.",
        "required": [
          "id",
          "state",
          "updatedAt",
          "products"
        ],
        "type": "object",
        "properties": {
          "id": {
            "description": "Идентификатор заявки в системе учёта Prodly",
            "type": "string"
          },
          "state": {
            "description": "Состояние заявки",
            "enum": [
              "new",
              "sent",
              "canceled",
              "done",
              "partial"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "description": "Дата обновления данных в формате ISODate",
            "type": "string"
          },
          "message": {
            "description": "Сообщение поставщика для контрагента",
            "type": "string"
          },
          "products": {
            "description": "Товары",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnVendorProduct"
            }
          },
          "conditions": {
            "$ref": "#/components/schemas/ReturnVendorConditions",
            "description": "Информация по забору возвращаемых товаров"
          }
        },
        "example": {
          "id": "weoyt57tgbvcvnkyte",
          "state": "partial",
          "updatedAt": "2024-11-05T11:08:38.587+04:00",
          "message": "Возврат одобрен",
          "products": [
            {
              "productCode": "N1846",
              "qty": 5,
              "state": "done"
            },
            {
              "productCode": "1091846",
              "qty": 1,
              "state": "partial",
              "reason": "Часть товара соответствует требованиям"
            }
          ],
          "conditions": {
            "car": {
              "code": "SM-1094",
              "number": "aa00763rus"
            },
            "forwarder": {
              "code": "SM-00589",
              "phone": "+7956981224",
              "name": "Ильяс Нигматуллин"
            },
            "manager": {
              "code": "SM-00589",
              "phone": "+7956981224",
              "name": "Ильяс Нигматуллин"
            },
            "pickupDate": "2024-12-02"
          }
        }
      },
      "ReturnVendorProduct": {
        "title": "Root Type for ReturnVendorProduct",
        "description": "Элмент массива товаров при ответе поставщика на заявку на возврат",
        "required": [
          "qty",
          "productCode",
          "state"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "description": "Код товара",
            "type": "string"
          },
          "qty": {
            "description": "Количество товара, одобренного к возварту",
            "type": "number"
          },
          "state": {
            "description": "Состояние выполнения заявки на возврат по данному товару: done - выполнено, partial - выполнено частично, canceled - отказано",
            "enum": [
              "done",
              "partial",
              "canceled"
            ],
            "type": "string"
          },
          "reason": {
            "description": "Уведомление о причине отказа",
            "type": "string"
          }
        },
        "example": {
          "productCode": "N1846",
          "qty": 5,
          "state": "partial",
          "reason": "Часть товара соответствует требованиям"
        }
      },
      "Car": {
        "title": "Root Type for Car",
        "description": "Данные машины",
        "required": [
          "code",
          "number"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Код машины в системе учёта поставщика",
            "type": "string"
          },
          "number": {
            "description": "Госномер",
            "type": "string"
          }
        },
        "example": {
          "code": "SM-1094",
          "number": "aa00763rus"
        }
      },
      "Forwarder": {
        "title": "Root Type for Forwarder",
        "description": "Экспедитор",
        "required": [
          "code",
          "name",
          "phone"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Код",
            "type": "string"
          },
          "phone": {
            "description": "Телефон",
            "type": "string"
          },
          "name": {
            "description": "ФИО ",
            "type": "string"
          }
        },
        "example": {
          "code": "SM-00589",
          "phone": "+7956981224",
          "name": "Ильяс Нигматуллин"
        }
      },
      "ReturnVendorConditions": {
        "title": "Root Type for ReturnVendorConditions",
        "description": "Информация от поставщика по возврату товаров",
        "required": [],
        "type": "object",
        "properties": {
          "car": {
            "$ref": "#/components/schemas/Car",
            "description": "Машина",
            "properties": {
              "code": {
                "type": "string"
              },
              "number": {
                "type": "string"
              }
            }
          },
          "forwarder": {
            "$ref": "#/components/schemas/Forwarder",
            "description": "Экспедитор",
            "properties": {
              "code": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "pickupDate": {
            "format": "date",
            "description": "Дата забора",
            "type": "string"
          },
          "manager": {
            "$ref": "#/components/schemas/Forwarder",
            "description": "Менеджер"
          }
        },
        "example": {
          "car": {
            "code": "SM-1094",
            "number": "aa00763rus"
          },
          "forwarder": {
            "code": "SM-00589",
            "phone": "+7956981224",
            "name": "Ильяс Нигматуллин"
          },
          "manager": {
            "code": "SM-00589",
            "phone": "+7956981224",
            "name": "Ильяс Нигматуллин"
          },
          "pickupDate": "2024-12-02"
        }
      },
      "Trader.AgentsCash": {
        "title": "Root Type for Trader.AgentsCash",
        "description": "",
        "type": "object",
        "properties": {
          "id": {
            "description": "GUID, идентификатор документа в Prodly",
            "type": "string"
          },
          "agentCode": {
            "description": "код торгового представителя в УС поставщика",
            "type": "string"
          },
          "branch": {
            "description": "филиал",
            "type": "string"
          },
          "client": {
            "description": "код торговой точки в УС поставщика",
            "type": "string"
          },
          "firm": {
            "description": "код юридического лица поставщика",
            "type": "string"
          },
          "state": {
            "description": "состояние документа",
            "type": "string"
          },
          "docId": {
            "description": "идентификатор оплачиваемого документа в УС поставщика",
            "type": "string"
          },
          "summa": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "description": "Дата и время создания в формате ISO",
            "type": "string"
          },
          "docType": {
            "description": "тип оплачиваемого документа, заполняется непосредственно из документа задолженности",
            "type": "string"
          }
        },
        "example": {
          "id": "72e498b9-22ff-4dc7-b88b-c9dc5d5fd0d1",
          "agentCode": "0000057172",
          "branch": "CH",
          "client": "E11365",
          "firm": "061",
          "state": "new",
          "docId": "CH24324003472",
          "docType": "РН",
          "summa": 84,
          "createdAt": "2024-12-24T06:58:49.716Z"
        }
      },
      "MustList": {
        "title": "Root Type for MustList",
        "description": "маст-лист (обязательный ассортимент клиента) или плакат",
        "required": [
          "plan",
          "docType",
          "endDate",
          "docId",
          "startDate",
          "active",
          "branch"
        ],
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "active": {
            "description": "при получении false документ будет удалён по ID",
            "type": "boolean"
          },
          "date": {
            "description": "дата создания документа",
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "description": "Дата начала действия документа",
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "description": "Дата окончания документа",
            "type": "string"
          },
          "docType": {
            "description": "тип документа: \"mustlist\"|\"plakat\"",
            "type": "string"
          },
          "agentTags": {
            "description": "тэги торговых агентов",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plan": {
            "$ref": "#/components/schemas/MustList.Plan",
            "properties": {
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "startDate": {
                      "type": "string"
                    },
                    "endDate": {
                      "type": "string"
                    },
                    "plan": {
                      "format": "int32",
                      "type": "integer"
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "fact": {
            "$ref": "#/components/schemas/MustList.Fact",
            "properties": {
              "clients": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "fact": {
                            "format": "double",
                            "type": "number"
                          },
                          "products": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "branch": {
            "description": "Филиал",
            "type": "string"
          },
          "docId": {
            "description": "Уникальный идентификатор документа",
            "type": "string"
          },
          "clientTags": {
            "description": "массив тэгов клиентов, которым доступен документ, не предполагающий факта выполнения.\nигнорируется, если заполнена секция fact",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "id": "SM25050008210",
          "number": "0000000018",
          "active": true,
          "date": "2025-02-19",
          "startDate": "2025-02-24",
          "endDate": "2025-03-15",
          "docType": "plakat|mustlist",
          "agentTags": [
            "SM_ЭК_МАК",
            "SM_ЭК_МКР",
            "кто то один из (OR)"
          ],
          "plan": {
            "groups": [
              {
                "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
                "startDate": "24.02.2025",
                "endDate": "15.03.2025",
                "plan": 1,
                "products": [
                  {
                    "code": "Q4896"
                  },
                  {
                    "code": "30892",
                    "plan": 1
                  }
                ]
              },
              {
                "title": "Сыр Альметте творожный в ассортименте 53% 300г HOC",
                "plan": 1,
                "products": [
                  {
                    "code": "G3211"
                  }
                ]
              }
            ]
          },
          "fact": {
            "clients": [
              {
                "code": "С27408",
                "groups": [
                  {
                    "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
                    "fact": 1.5,
                    "products": [
                      {
                        "code": "G3211"
                      },
                      {
                        "code": "Q4896",
                        "fact": 1
                      },
                      {
                        "code": "30892",
                        "fact": 7.42
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "MustList.Plan": {
        "title": "Root Type for MustList.Plan",
        "description": "",
        "required": [
          "groups"
        ],
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MustList.Plan.Group"
            }
          }
        },
        "example": {
          "groups": [
            {
              "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
              "startDate": "24.02.2025",
              "endDate": "15.03.2025",
              "plan": 1,
              "products": [
                {
                  "code": "Q4896"
                },
                {
                  "code": "30892",
                  "plan": 1
                }
              ]
            },
            {
              "title": "Сыр Альметте творожный в ассортименте 53% 300г HOC",
              "plan": 1,
              "products": [
                {
                  "code": "G3211"
                }
              ]
            }
          ]
        }
      },
      "MustList.Plan.Group": {
        "title": "Root Type for MustList.Plan.Group",
        "description": "",
        "required": [
          "plan",
          "products",
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "description": "Название группы. Отображается клиенту, одновременно является идентификатором, связывающим план и факт",
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "type": "string"
          },
          "plan": {
            "format": "double",
            "type": "number"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MustList.Plan.Product"
            }
          }
        },
        "example": {
          "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
          "startDate": "24.02.2025",
          "endDate": "15.03.2025",
          "plan": 1,
          "products": [
            {
              "code": "Q4896"
            },
            {
              "code": "30892",
              "plan": 1
            }
          ]
        }
      },
      "MustList.Plan.Product": {
        "title": "Root Type for MustList.Plan.Product",
        "description": "",
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "plan": {
            "format": "double",
            "type": "number"
          }
        },
        "example": {
          "code": "30892",
          "plan": 1
        }
      },
      "MustList.Fact": {
        "title": "Root Type for MustList.Fact",
        "description": "",
        "required": [
          "clients"
        ],
        "type": "object",
        "properties": {
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MustList.Fact.Client"
            }
          }
        },
        "example": {
          "clients": [
            {
              "code": "С27408",
              "groups": [
                {
                  "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
                  "fact": 1.5,
                  "products": [
                    {
                      "code": "G3211"
                    },
                    {
                      "code": "Q4896",
                      "fact": 1
                    },
                    {
                      "code": "30892",
                      "fact": 7.42
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      "MustList.Fact.Client": {
        "title": "Root Type for MustList.Fact.Client",
        "description": "",
        "required": [
          "code",
          "groups"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "код клиента",
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MustList.Fact.Group"
            }
          }
        },
        "example": {
          "code": "С27408",
          "groups": [
            {
              "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
              "fact": 1.5,
              "products": [
                {
                  "code": "G3211"
                },
                {
                  "code": "Q4896",
                  "fact": 1
                },
                {
                  "code": "30892",
                  "fact": 7.42
                }
              ]
            }
          ]
        }
      },
      "MustList.Fact.Group": {
        "title": "Root Type for MustList.Fact.Group",
        "description": "",
        "required": [
          "title",
          "products"
        ],
        "type": "object",
        "properties": {
          "title": {
            "description": "Название группы. Отображается клиенту, одновременно является идентификатором, связывающим план и факт",
            "type": "string"
          },
          "fact": {
            "format": "double",
            "type": "number"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MustList.Fact.Product"
            }
          }
        },
        "example": {
          "title": "Сыр Альметте творожный в ассортименте 53% 150г HOC",
          "fact": 1.5,
          "products": [
            {
              "code": "G3211"
            },
            {
              "code": "Q4896",
              "fact": 1
            },
            {
              "code": "30892",
              "fact": 7.42
            }
          ]
        }
      },
      "MustList.Fact.Product": {
        "title": "Root Type for MustList.Fact.Product",
        "description": "",
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "код товара",
            "type": "string"
          },
          "fact": {
            "format": "double",
            "type": "number"
          }
        },
        "example": {
          "code": "Q4896",
          "fact": 1
        }
      },
      "Trader.Visit": {
        "title": "Визит торгового агента в ТТ",
        "description": "Визит торгового агента в ТТ",
        "required": [
          "guid"
        ],
        "type": "object",
        "properties": {
          "guid": {
            "description": "уникальный идентификатор визита на платформе",
            "type": "string"
          },
          "vendor": {
            "description": "Код поставщика",
            "type": "string"
          },
          "branch": {
            "description": "код филиала",
            "type": "string"
          },
          "clientCode": {
            "description": "код клиента в УС поставщика",
            "type": "string"
          },
          "clientId": {
            "description": "_id клиента на Prodly",
            "type": "string"
          },
          "agentCode": {
            "description": "код агента в УС поставщика",
            "type": "string"
          },
          "userId": {
            "description": "_id пользователя на Prodly",
            "type": "string"
          },
          "onLocation": {
            "type": "boolean"
          },
          "isRequest": {
            "type": "boolean"
          },
          "isRefund": {
            "type": "boolean"
          },
          "isMoney": {
            "type": "boolean"
          },
          "startedAt": {
            "format": "date",
            "description": "Дата и время начала визита в формате ISO.",
            "type": "string"
          },
          "finishedAt": {
            "format": "date",
            "description": "Дата и время завершения визита в формате ISO",
            "type": "string"
          },
          "delta": {
            "format": "double",
            "type": "number"
          },
          "marginOfError": {
            "format": "double",
            "type": "number"
          },
          "location": {
            "$ref": "#/components/schemas/Trader.Visit.Location",
            "description": "координаты торговой точки"
          },
          "locationTP": {
            "$ref": "#/components/schemas/Trader.Visit.Location",
            "description": "координаты мобильного устройства агента в момент начала визита"
          },
          "state": {
            "description": "Статус",
            "type": "string"
          },
          "request": {
            "$ref": "#/components/schemas/Trader.Visit.Request"
          },
          "photos": {
            "description": "Массив ссылок на фотографии",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "example": [
          {
            "guid": "29bd0f84-b8be-4940-94e9-f4bc1b18ae4b",
            "vendor": "dalimo",
            "branch": "SM",
            "clientCode": "А08100",
            "clientId": "6395b4b87d87d93ea1fac889",
            "agentCode": "0000027759",
            "userId": "2ioM1Gd67DkX1GjWVL3ozAB6u50",
            "onLocation": false,
            "isRequest": false,
            "isRefund": false,
            "isMoney": false,
            "startedAt": "2025-05-05T12:58:09.157+04:00",
            "finishedAt": "2025-05-05T13:23:10.976+04:00",
            "delta": 0,
            "marginOfError": 0,
            "location": {
              "latitude": 52.7926114,
              "longitude": 52.2429645
            },
            "locationTP": {
              "latitude": 52.7926114,
              "longitude": 52.2429645
            },
            "state": "done",
            "request": {
              "total": 0,
              "avgTotal": 0,
              "avgSKUcount": 0,
              "SKUcount": 0,
              "result": ""
            },
            "photos": [
              "https://hb.bizmrg.com/prodly/PRODLY_AGENTS_REPORT/2025-05-05/2ioM1Gd67DkX1GjWVL3ozAB6u50/2wfeHyZoNC2pExkL2deQpp46OQc.jpg"
            ]
          }
        ]
      },
      "PromoLevel": {
        "title": "Root Type for PromoLevel",
        "description": "Уровень скидки s+%",
        "type": "object",
        "properties": {
          "level": {
            "format": "int32",
            "description": "Денежная сумма (для s+%) или кол-во (для nn+%) купленных акционных товаров",
            "type": "integer"
          },
          "discount": {
            "format": "int32",
            "description": "Размер скидки в процентах",
            "type": "integer"
          }
        },
        "example": {
          "level": 500,
          "discount": 5
        }
      },
      "FirmAccount": {
        "title": "Root Type for FirmAccount",
        "description": "реквизиты банковского счёта",
        "type": "object",
        "properties": {
          "code": {
            "description": "Код в УС поставщика",
            "type": "string"
          },
          "title": {
            "description": "Название",
            "type": "string"
          },
          "bankTitle": {
            "description": "Название банка",
            "type": "string"
          },
          "merchantId": {
            "description": "Идентификатор мерчанта (предоставлется банком)",
            "type": "string"
          },
          "bik": {
            "description": "БИК",
            "type": "string"
          },
          "cs": {
            "description": "Корреспондентский счет",
            "type": "string"
          },
          "rs": {
            "description": "Рассчётный счёт",
            "type": "string"
          }
        },
        "example": {
          "code": "0123456789",
          "title": "ООО Ромашка (Сбербанк)",
          "bankTitle": "Поволжский банк ПАО «Сбербанка России»  г. Самара ",
          "merchantId": "dalimo",
          "bik": "043601000",
          "cs": "30101810200000000000",
          "rs": "40702810500000000000"
        }
      },
      "PromoTrigger": {
        "description": "Объект, описывающий триггер для срабатывания акций типа \"Мультикомбо\" (mc+%, mc+1 и mc+p)",
        "required": [
          "type",
          "count",
          "groupCount"
        ],
        "type": "object",
        "properties": {
          "type": {
            "description": "Тип триггера (по какому признаку определяется срабатывание по товарной группе): bySum - по сумме купленных товаров; byCount - по количеству закупленных единиц товаров; bySKU - по определенным товарным позициям (SKU)",
            "enum": [
              "bySum",
              "byCount",
              "bySKU"
            ],
            "type": "string"
          },
          "count": {
            "description": "Пороговые количество или денежная сумма (в зависимости от type), должно быть строго положительным значением!",
            "type": "number"
          },
          "groupCount": {
            "description": "количество групп - обязательных товарных блоков для срабатывания мультикомбо. Допустимые значения: от 2 до 5.",
            "type": "integer"
          }
        }
      }
    },
    "responses": {
      "ApiResponse": {
        "description": "Стандартный ответ"
      },
      "responseOrders": {
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/VendorOrderOUT"
              }
            }
          }
        },
        "description": "Список заказов"
      },
      "RequestResponse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RequestInfo"
            },
            "examples": {
              "RequestResponseExample": {
                "value": {
                  "requestID": "2f6a4728-8449-49a6-ad5e-6e4e70032290"
                }
              }
            }
          }
        },
        "description": "Идентификатор запроса"
      },
      "RequestStatus": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RequestStatus"
            }
          }
        },
        "description": ""
      },
      "messageListResponse": {
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Message"
              }
            }
          }
        },
        "description": ""
      },
      "responseTasks": {
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Trader.Task.Object"
              }
            }
          }
        },
        "description": "список задач"
      },
      "responseVisits": {
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Trader.Visit"
              }
            }
          },
          "application/x-ndjson": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Trader.Visit"
              }
            }
          }
        },
        "description": ""
      },
      "responseReturns": {
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ReturnItem"
              }
            }
          }
        },
        "description": "Массив заявок на возврат поставщику"
      },
      "AgentsCashResponse": {
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Trader.AgentsCash"
              }
            }
          }
        },
        "description": ""
      }
    },
    "securitySchemes": {
      "X-Vendor": {
        "type": "apiKey",
        "description": "slug поставщика",
        "name": "x-vendor",
        "in": "header"
      },
      "X-Secret": {
        "type": "apiKey",
        "description": "Ключ доступа",
        "name": "x-secret",
        "in": "header"
      },
      "branch": {
        "type": "apiKey",
        "description": "Филиал поставщика",
        "name": "branch",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "X-Vendor": [],
      "X-Secret": [],
      "branch": []
    }
  ],
  "tags": [
    {
      "name": "Результат выполнения",
      "description": ""
    },
    {
      "name": "Товары",
      "description": "Загрузка и обновление номенклатуры"
    },
    {
      "name": "Клиенты",
      "description": "Работа с клиентами"
    },
    {
      "name": "Заказы",
      "description": "Работа с заказами"
    },
    {
      "name": "Цены",
      "description": "Обновление персональных цен"
    },
    {
      "name": "Маркетинг",
      "description": "Маркетинговые инструменты"
    },
    {
      "name": "Сообщения",
      "description": "Обмен сообщениями"
    },
    {
      "name": "Резерв",
      "description": "Резерв товаров (Персональные остатки)"
    },
    {
      "name": "Возвраты",
      "description": "Заявка на возврат товара"
    },
    {
      "name": "Валюты",
      "description": "Управление курсом валют"
    },
    {
      "name": "Агенты",
      "description": "Функционал для торговых представитилей"
    }
  ]
}