Загрузка данных
{
"openapi": "3.0.3",
"info": {
"title": "Yandex Commercial Protocol",
"description": "API для интеграции с YCP чекаутом.\n\nЭто API должно быть реализовано на стороне интернет-магазина, чтобы обеспечить работу чекаута.\n\nСервер интернет-магазина должен отвечать на запрос не дольше 5 секунд.\n\n## Авторизация\n\nВсе запросы будут подписаны токеном. Укажите токен в ЛК YCP-чекаута, в котором вы проходили онбординг.\n```\nAuthorization: Bearer YOUR_TOKEN\n```\n\n## Принцип работы\n\n- Каждый раз, когда чекаут открывается или меняется состав корзины, мы будем вызывать **/checkout/basket/check**, чтобы узнать актуальные цены и остатки. Если вы делегируете создание доставки на сторону Яндекса, необходимо передать распределение стоков по складам (чтобы было понятно, с какого склада товар).\n- Когда покупатель выберет адрес доставки, мы рассчитаем опции — через API служб доставки или через YCP, метод **/checkout/delivery/options** (зависит от настроек конкретной интеграции).\n- Когда пользователь перейдет к оплате, мы вызовем метод **/checkout**. Это необходимо, чтобы вы еще раз проверили цены, а также зарезервировали остатки в своей системе.\n- После создания сессии чекаута, она либо отменится методом **/checkout/cancel** (в случае, если заказ так и не был оплачен), либо мы вызовем **/checkout/placed** (это будет означать, что заказ оформлен).\n\nТовары будут продаваться по верной цене, только при их наличии на складе и с достоверной информацией о сроках и стоимости доставки. Вся информация о покупателе из чекаута передается на сторону интернет-магазина в момент вызова **/checkout**.\n",
"version": "0.0.14"
},
"servers": [
{
"url": "/api/v1"
}
],
"paths": {
"/warehouses": {
"get": {
"summary": "Получить список складов и магазинов",
"description": "Метод должен возвращать список складов магазина и точек самовывоза.\n\nМетод обязателен, если чекаут получает опции от служб доставки напрямую\n(важен адрес отправления товара), либо если на чекауте будут показываться опции самовывоза.\n\nМетод поддерживает пагинацию. Порядок, в котором возвращаются склады, определяется магазином.\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "limit",
"in": "query",
"required": true,
"description": "Максимально допустимое количество складов в ответе",
"schema": {
"type": "integer"
},
"example": 1000
},
{
"name": "offset",
"in": "query",
"required": true,
"description": "Количество складов, которые нужно пропустить",
"schema": {
"type": "integer"
},
"example": 0
}
],
"responses": {
"200": {
"description": "Список складов",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"warehouses",
"total_count"
],
"properties": {
"warehouses": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"title",
"address",
"phone"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"title": {
"type": "string",
"description": "Название склада",
"example": "Основной склад"
},
"address": {
"type": "string",
"description": "Полный адрес склада",
"example": "Москва, улица Примерная, 1"
},
"phone": {
"type": "string",
"description": "Телефон склада",
"example": "+7 (495) 123-45-67"
},
"description": {
"type": "string",
"description": "Описание склада",
"example": "Главный склад компании"
},
"self_pickup_options": {
"description": "Настройки самовывоза для склада. \nЕсли передано значение self_pickup_options.enabled = true, то обязательно должен быть заполнен график в поле schedule.\nЕсли enabled = false, то склад не будет доступен для самовывоза, schedule передавать не нужно.\n",
"example": {
"enabled": true,
"schedule": {
"restrictions": [
{
"day": 1,
"time_from": "10:00",
"time_to": "22:00",
"time_zone": 3
}
]
}
},
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Признак доступности самовывоза для склада"
},
"schedule": {
"description": "График самовывоза (рабочие дни и часы). Поле обязательно для заполнения, если включен самовывоз для склада.",
"type": "object",
"required": [
"restrictions"
],
"properties": {
"restrictions": {
"type": "array",
"description": "Интервалы по дням недели.\n\nДля круглосуточной работы нужно передавать значения time_from=\"00:00\" и time_to=\"23:59\".\n",
"minItems": 1,
"items": {
"type": "object",
"required": [
"day",
"time_from",
"time_to",
"time_zone"
],
"properties": {
"day": {
"type": "integer",
"description": "Номер дня недели (1=понедельник, …, 7=воскресенье)",
"minimum": 1,
"maximum": 7,
"example": 1
},
"time_from": {
"type": "string",
"description": "Начало интервала рабочего времени в формате HH:mm",
"example": "10:00"
},
"time_to": {
"type": "string",
"description": "Конец интервала рабочего времени в формате HH:mm",
"example": "22:00"
},
"time_zone": {
"type": "integer",
"description": "Часовой пояс в виде смещения в часах относительно UTC (например, 3 для UTC+3)",
"example": 3
}
}
}
}
}
}
}
},
"ycp_delivery_options": {
"description": "Настройки доставки YCP для склада.\n\nYCP доставка будет включена для склада в следующих случаях:\n - если передано значение ycp_delivery_options.enabled = true и доставка по YCP протоколу включена в разделе \"Склады и логистика\" настроек\n - если это поле не передано и доставка по YCP протоколу включена в разделе \"Склады и логистика\" настроек\n",
"example": {
"enabled": true
},
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Флаг, указывающий, включена ли доставка YCP для склада",
"example": true
}
}
}
},
"example": {
"id": "1",
"title": "Основной склад",
"address": "Москва, улица Примерная, 1",
"phone": "+7 (495) 123-45-67",
"description": "Главный склад компании",
"self_pickup_options": {
"enabled": true,
"schedule": {
"restrictions": [
{
"day": 1,
"time_from": "10:00",
"time_to": "22:00",
"time_zone": 3
}
]
}
},
"ycp_delivery_options": {
"enabled": true
}
}
}
},
"total_count": {
"type": "integer",
"description": "Общее количество складов",
"example": 10
}
}
},
"examples": {
"success": {
"value": {
"warehouses": [
{
"id": "1",
"title": "Основной склад",
"address": "Москва, улица Примерная, 1",
"phone": "+7 (495) 123-45-67",
"self_pickup_options": {
"enabled": true,
"schedule": {
"restrictions": [
{
"day": 1,
"time_from": "10:00",
"time_to": "22:00",
"time_zone": 3
}
]
}
},
"ycp_delivery_options": {
"enabled": true
}
}
],
"total_count": 10
}
}
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/checkout/basket/check": {
"post": {
"summary": "Проверить текущую корзину",
"description": "Обязательный метод.\n\nПроверяет наличие товаров на складах и возвращает актуальные цены.\n\nВ каждом запросе передается список товаров для проверки, регион, а также флаги:\n- is_health_check\nФлаг, указывающий, выполняется ли запрос в рамках фоновой проверки работоспособности магазина. В ходе проверки отправляются валидные запросы не чаще одного раза в 10 секунд.\n- offers_id_from_merchant_center\nПри первом переходе к покупке мы передаем в качестве ID товаров offerID из фида. При повторных запросах будут использоваться ID товара, переданные в ответе на данный запрос. Флаг нужен, чтобы различать эти два случая. При значении true передаются ID оффера, false - ID товара.\n\nДля каждого товара возвращаются:\n- ID товара (его SKU).\n- Актуальные цены (regular_price, final_price).\n- Наличие на складах (available_quantity) — задает количество товаров, которое покупатель сможет купить в текущий момент.\n- Изображение товара.\n- URL товара.\n- Габариты и вес.\n- Список характеристик товара (может быть пустым).\n- Список вариантов товара (может быть пустым; элементы содержат такой же набор полей, как и основной товар).\n\nЕсли интернет-магазин сам рассчитывает методы доставки, возвращайте только склад (id можно указать произвольным).\n\nОсобенности характеристик и вариантов товара:\n- Значение display_type определяет, какой объект будет содержаться в properties – цвет или текст. Для каждого из типов надо передавать соответствующие объекты.\n- Код (code) должен совпадать у характеристик, которые подлежат группировке. Это позволит отображать варианты товара с альтернативными значениями характеристики.\n- Набор вариантов товара должен быть неизменным: если в ответе для товара #1 указаны варианты #2 и #3, то при запросе товара #3 в списке должны присутствовать #1 и #2.\n\nПример заполнения характеристик и вариантов товара:\n```json\n{\n \"id\": \"50\",\n // все поля товара\n \"characteristics\": [\n {\n \"display_type\": \"text\",\n \"code\": \"SIZES_CLOTHES\",\n \"name\": \"Размер\",\n \"properties\": {\n \"value\": \"XXL\"\n }\n }\n ],\n \"variations\": [\n {\n \"id\": \"51\",\n // все поля товара\n \"characteristics\": [\n {\n \"display_type\": \"text\",\n \"code\": \"SIZES_CLOTHES\",\n \"name\": \"Размер\",\n \"properties\": {\n \"value\": \"M\"\n }\n }\n ]\n }\n ]\n}\n```\nТовар № 50 с размером XXL имеет альтернативный вариант с размером M — у них общая характеристика с кодом `SIZES_CLOTHES`.\n",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"items",
"offers_id_from_merchant_center",
"locality",
"is_health_check"
],
"properties": {
"items": {
"type": "array",
"description": "Список товаров для проверки.",
"items": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара (SKU)",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Запрашиваемое количество.",
"example": 2
}
},
"example": {
"id": "50",
"quantity": 2
}
},
"example": [
{
"id": "50",
"quantity": 2
}
]
},
"offers_id_from_merchant_center": {
"type": "boolean",
"description": "Флаг, указывающий, являются ли id элементов списка items идентификаторами офферов из Merchant Center. Если значение true – это ID оффера, если false - ID товара.",
"example": true
},
"locality": {
"type": "string",
"description": "Регион\n\nДля товаров предоставляются региональные цены и остатки — только по складам соответствующего региона.\n",
"example": "Москва"
},
"is_health_check": {
"type": "boolean",
"description": "Флаг, указывающий, выполняется ли запрос в рамках проверки доступности интеграции, а не при реальном запросе пользователя",
"example": false
}
},
"example": {
"items": [
{
"id": "50",
"quantity": 2
}
],
"offers_id_from_merchant_center": true,
"locality": "Москва",
"is_health_check": false
}
},
"examples": {
"basic": {
"value": {
"items": [
{
"id": "50",
"quantity": 2
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Результат проверки корзины",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"regular_price",
"final_price",
"warehouses",
"dimensions",
"characteristics",
"variations"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"name": {
"type": "string",
"description": "Название товара",
"example": "Футболка хлопковая"
},
"regular_price": {
"type": "integer",
"description": "Обычная цена",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена (с учетом скидок)",
"example": 1799
},
"vat": {
"type": "integer",
"description": "НДС, по умолчанию 22%",
"example": 22
},
"img": {
"type": "string",
"format": "uri",
"description": "URL изображения товара",
"example": "https://example.com/image.jpg"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL страницы товара",
"example": "https://example.com/product/50"
},
"warehouses": {
"type": "array",
"description": "Наличие на складах",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"available_quantity": {
"type": "integer",
"description": "Доступное количество",
"example": 10
}
}
},
"example": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
]
},
"dimensions": {
"type": "object",
"description": "Габариты и вес товара",
"properties": {
"width": {
"type": "integer",
"description": "Ширина (мм)",
"example": 100
},
"height": {
"type": "integer",
"description": "Высота (мм)",
"example": 200
},
"depth": {
"type": "integer",
"description": "Глубина (мм)",
"example": 50
},
"weight": {
"type": "integer",
"description": "Вес (г)",
"example": 500
}
},
"example": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
}
},
"characteristics": {
"type": "array",
"description": "Характеристики товара",
"items": {
"type": "object",
"description": "Характеристика товара",
"required": [
"display_type",
"code",
"name",
"properties"
],
"properties": {
"display_type": {
"type": "string",
"enum": [
"color",
"text"
],
"example": "text"
},
"code": {
"type": "string",
"description": "Группирующий код характеристики",
"example": "SIZES_CLOTHES"
},
"name": {
"type": "string",
"description": "Название характеристики",
"example": "Размер"
},
"properties": {
"oneOf": [
{
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
}
]
}
},
"example": {
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
}
},
"example": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
},
"variations": {
"type": "array",
"description": "Варианты товара",
"items": {
"type": "object",
"required": [
"id",
"name",
"regular_price",
"final_price",
"warehouses",
"dimensions",
"characteristics"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "51"
},
"name": {
"type": "string",
"description": "Название товара",
"example": "Футболка хлопковая"
},
"regular_price": {
"type": "integer",
"description": "Обычная цена",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена (с учетом скидок)",
"example": 1799
},
"vat": {
"type": "integer",
"description": "НДС, по умолчанию 22%",
"example": 22
},
"img": {
"type": "string",
"format": "uri",
"description": "URL изображения товара",
"example": "https://example.com/image1.jpg"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL страницы товара",
"example": "https://example.com/product/51"
},
"warehouses": {
"type": "array",
"description": "Наличие на складах",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"available_quantity": {
"type": "integer",
"description": "Доступное количество",
"example": 10
}
}
},
"example": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
]
},
"dimensions": {
"type": "object",
"description": "Габариты и вес товара",
"properties": {
"width": {
"type": "integer",
"description": "Ширина (мм)",
"example": 100
},
"height": {
"type": "integer",
"description": "Высота (мм)",
"example": 200
},
"depth": {
"type": "integer",
"description": "Глубина (мм)",
"example": 50
},
"weight": {
"type": "integer",
"description": "Вес (г)",
"example": 500
}
},
"example": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
}
},
"characteristics": {
"type": "array",
"description": "Характеристики товара",
"items": {
"type": "object",
"description": "Характеристика товара",
"required": [
"display_type",
"code",
"name",
"properties"
],
"properties": {
"display_type": {
"type": "string",
"enum": [
"color",
"text"
],
"example": "text"
},
"code": {
"type": "string",
"description": "Группирующий код характеристики",
"example": "SIZES_CLOTHES"
},
"name": {
"type": "string",
"description": "Название характеристики",
"example": "Размер"
},
"properties": {
"oneOf": [
{
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
}
]
}
},
"example": {
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
}
},
"example": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
},
"example": {
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
},
"example": [
{
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
},
{
"id": "52",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image2.jpg",
"url": "https://example.com/product/52",
"warehouses": [
{
"id": "1",
"available_quantity": 3
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "S"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Белый",
"hex": "#FFFFFF"
}
}
]
}
]
}
},
"example": {
"id": "50",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image.jpg",
"url": "https://example.com/product/50",
"warehouses": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
],
"variations": [
{
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
},
{
"id": "52",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image2.jpg",
"url": "https://example.com/product/52",
"warehouses": [
{
"id": "1",
"available_quantity": 3
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "S"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Белый",
"hex": "#FFFFFF"
}
}
]
}
]
}
}
}
}
},
"examples": {
"success": {
"value": {
"items": [
{
"id": "50",
"name": "Товар 1",
"regular_price": 1999,
"final_price": 1999,
"img": "https://example.com/image.jpg",
"url": "https://example.com/product/50",
"warehouses": [
{
"id": "1",
"available_quantity": 10
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
],
"variations": [
{
"id": "51",
"name": "Товар 1",
"regular_price": 2000,
"final_price": 2000,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 10
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
]
}
]
}
}
}
}
}
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"404": {
"description": "Товары не найдены",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/checkout": {
"post": {
"summary": "Создать новую сессию чекаута",
"description": "Обязательный метод.\n\nПри создании сессии мы рекомендуем:\n- Финально проверить наличие товаров и актуальность цен.\n- Зарезервировать стоки товаров.\n- Создать или найти пользователя по email/телефону.\n",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"session_id",
"items",
"warehouse_id",
"customer",
"delivery"
],
"properties": {
"session_id": {
"type": "string",
"description": "ID сессии чекаута",
"example": "019c18f6-cb3c-7f31-9395-53925a6b0e28"
},
"warehouse_id": {
"type": "string",
"description": "ID склада отгрузки",
"example": "1"
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"quantity",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 2
},
"regular_price": {
"type": "integer",
"description": "Обычная цена товара",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена товара (с учетом скидок)",
"example": 1799
}
},
"example": {
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
}
},
"example": [
{
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
},
{
"id": "51",
"quantity": 1,
"regular_price": 2499,
"final_price": 2499
}
]
},
"customer": {
"type": "object",
"required": [
"full_name",
"phone",
"email"
],
"properties": {
"full_name": {
"type": "string",
"description": "Полное имя покупателя",
"example": "Иван Иванов"
},
"phone": {
"type": "string",
"description": "Телефон покупателя",
"example": "+79991234567"
},
"email": {
"type": "string",
"format": "email",
"description": "Email покупателя",
"example": "ivan@example.com"
}
},
"example": {
"full_name": "Иван Иванов",
"phone": "+79991234567",
"email": "ivan@example.com"
}
},
"delivery": {
"type": "object",
"required": [
"delivery_method",
"service_type",
"price",
"address",
"delivery_date_interval"
],
"properties": {
"delivery_method": {
"type": "string",
"enum": [
"courier",
"pickup_point",
"self_pickup"
],
"description": "Метод доставки",
"example": "courier"
},
"service_type": {
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"pecom",
"russian_post",
"dalli",
"self_pickup",
"merchant_ship",
"ycp"
],
"description": "Служба доставки",
"example": "yandex_delivery"
},
"service_display_name": {
"type": "string",
"description": "Отображаемое название службы доставки",
"example": "Яндекс.Доставка"
},
"price": {
"type": "number",
"format": "float",
"description": "Стоимость доставки для покупателя",
"example": 100
},
"address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
},
"delivery_date_interval": {
"description": "Интервал даты доставки",
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"ycp_delivery_option_id": {
"type": "string",
"description": "Если для доставки заказа используется вариант, полученный через метод /api/v1/delivery/options, передается идентификатор (ID) этого варианта.",
"example": "option-12345"
}
},
"example": {
"delivery_method": "courier",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"locality": "Москва",
"address": "ул. Тестовая, д. 1"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
},
"time_zone": 3
}
}
}
},
"example": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"warehouse_id": "1",
"items": [
{
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
},
{
"id": "51",
"quantity": 1,
"regular_price": 2499,
"final_price": 2499
}
],
"customer": {
"full_name": "Иван Иванов",
"phone": "+79991234567",
"email": "ivan@example.com"
},
"delivery": {
"delivery_method": "courier",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"locality": "Москва",
"address": "ул. Тестовая, д. 1"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
},
"time_zone": 3
}
}
}
},
"examples": {
"courier": {
"summary": "Доставка курьером",
"description": "Пример создания сессии чекаута с доставкой курьером",
"value": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"warehouse_id": "1",
"items": [
{
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1999
}
],
"customer": {
"full_name": "Иван Иванов",
"phone": "+79991234567",
"email": "ivan@example.com"
},
"delivery": {
"delivery_method": "courier",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"locality": "Москва",
"address": "ул. Тестовая, д. 1",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "1234"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
}
}
}
}
},
"pickup": {
"summary": "Доставка в ПВЗ",
"description": "Пример создания сессии чекаута с доставкой в ПВЗ",
"value": {
"session_id": "018c18f6-cb3c-7f31-9395-53925a6b0e28",
"warehouse_id": "1",
"items": [
{
"id": "50",
"quantity": 1,
"regular_price": 1999,
"final_price": 1999
}
],
"customer": {
"full_name": "Петр Петров",
"phone": "+79997654321",
"email": "petr@example.com"
},
"delivery": {
"delivery_method": "pickup_point",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"pickup_point_id": "PP_12345",
"locality": "Москва",
"address": "ул. Тестовая, д. 1"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-15",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-15",
"time": "14:00:00"
}
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "Сессия успешно создана",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"order_number": {
"type": "string",
"description": "Номер заказа в системе магазина, который будет показан покупателю.\nЕсли не передан — YCP использует собственный порядковый номер заказа.\n",
"example": "order1234"
}
}
}
}
}
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"409": {
"description": "Конфликт (сессия уже существует или изменились цены/наличие)",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"actual_inventory": {
"type": "object",
"description": "Актуальные данные о наличии и ценах",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"warehouses",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string"
},
"regular_price": {
"type": "integer"
},
"final_price": {
"type": "integer"
},
"warehouses": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string"
},
"available_quantity": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"checkout_canceled": {
"type": "boolean",
"description": "Флаг, указывающий, была ли чекаутная сессия уже отменена"
}
},
"example": {
"error": "Цены изменились или товары закончились",
"actual_inventory": {
"items": [
{
"id": "50",
"warehouses": [
{
"id": "1",
"available_quantity": 5,
"regular_price": 2000,
"final_price": 1900
}
]
}
]
}
}
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/checkout/placed": {
"post": {
"summary": "Оформить заказ",
"description": "Обязательный метод.\n\nМетод вызывается после оформления заказа пользователем.\n\nЗначение параметра payment_method показывает, был ли заказ оплачен онлайн.\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "session_id",
"in": "query",
"required": true,
"description": "ID сессии чекаута",
"schema": {
"type": "string"
},
"example": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"deprecated": true
},
{
"name": "order_id",
"in": "query",
"required": true,
"description": "ID заказа",
"schema": {
"type": "string"
},
"example": "01996fd7-9a16-44aa-89ae-25cab68e0790",
"deprecated": true
},
{
"name": "payment_method",
"in": "query",
"required": true,
"description": "Метод оплаты. Если указан online — заказ уже оплачен. on_delivery — будет оплачен при доставке.",
"schema": {
"type": "string",
"enum": [
"on_delivery",
"online"
]
},
"deprecated": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"session_id",
"order_id",
"order_number",
"payment_method"
],
"properties": {
"session_id": {
"type": "string",
"description": "ID сессии чекаута",
"example": "019c18f6-cb3c-7f31-9395-53925a6b0e28"
},
"order_id": {
"type": "string",
"description": "ID заказа",
"example": "01996fd7-9a16-44aa-89ae-25cab68e0790"
},
"order_number": {
"type": "integer",
"description": "Номер заказа в системе YCP.\nУникален в рамках всех заказов данного магазина через YCP-чекаут.\n",
"example": 1234
},
"payment_method": {
"type": "string",
"enum": [
"online",
"on_delivery"
],
"description": "Метод оплаты. online — заказ уже оплачен, on_delivery — заказ будет оплачен при доставке.",
"example": "online"
},
"online_payment_method": {
"type": "string",
"enum": [
"card",
"sbp",
"split",
"split_sbp"
],
"description": "Как оплачен онлайн заказ",
"example": "split"
},
"acquiring_id": {
"type": "string",
"description": "Уникальный идентификатор транзакции оплаты. Заполняется при payment_method = online.\n",
"example": "019b56d1-89a5-7a78-849f-4e8b174d0c77"
}
},
"example": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"order_id": "01996fd7-9a16-44aa-89ae-25cab68e0790",
"order_number": 1234,
"payment_method": "online",
"online_payment_method": "split"
}
},
"examples": {
"online": {
"value": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"order_id": "01996fd7-9a16-44aa-89ae-25cab68e0790",
"order_number": 1234,
"payment_method": "online",
"online_payment_method": "split",
"acquiring_id": "019b56d1-89a5-7a78-849f-4e8b174d0c77"
}
},
"on_delivery": {
"value": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"order_id": "01996fd7-9a16-44aa-89ae-25cab68e0790",
"order_number": 1234,
"payment_method": "on_delivery"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Заказ успешно размещен"
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"404": {
"description": "Заказ не найден",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"409": {
"description": "Заказ уже отменен",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/checkout/cancel": {
"post": {
"summary": "Отменить сессию",
"description": "Обязательный метод.\n\nМетод вызывается, если заказ не был оформлен до конца (прошел час с момента создания сессии или покупатель вернулся к редактированию корзины).\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "session_id",
"in": "query",
"required": true,
"description": "ID сессии чекаута",
"schema": {
"type": "string"
},
"example": "019c18f6-cb3c-7f31-9395-53925a6b0e28"
}
],
"responses": {
"200": {
"description": "Сессия успешно отменена"
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"404": {
"description": "Сессия не найдена",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/order/delivered": {
"post": {
"summary": "Отметить заказ как доставленный",
"description": "Метод обязателен, если управление доставкой оставлено на стороне Яндекс.\n\nМетод вызывается после доставки заказа покупателю. При частичном выкупе система передает данные о товарах, которые были выкуплены.\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "order_id",
"in": "query",
"required": true,
"description": "ID заказа",
"schema": {
"type": "string"
},
"example": "01996fd7-9a16-44aa-89ae-25cab68e0790"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"purchased_items"
],
"properties": {
"purchased_items": {
"type": "array",
"description": "Список фактически доставленных товаров.",
"items": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 2
}
},
"example": {
"id": "50",
"quantity": 2
}
},
"example": [
{
"id": "50",
"quantity": 2
}
]
}
},
"example": {
"purchased_items": [
{
"id": "50",
"quantity": 2
}
]
}
},
"example": {
"purchased_items": [
{
"id": "50",
"quantity": 2
}
]
}
}
}
},
"responses": {
"200": {
"description": "Заказ успешно отмечен как доставленный"
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"404": {
"description": "Заказ или товар не найден",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"409": {
"description": "Конфликт (заказ отменен)",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/order/cancel": {
"post": {
"summary": "Отменить заказ",
"description": "Обязательный метод.\n\nИспользуется для отмены заказа после его оформления.\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "order_id",
"in": "query",
"required": true,
"description": "ID заказа",
"schema": {
"type": "string"
},
"example": "01996fd7-9a16-44aa-89ae-25cab68e0790"
}
],
"responses": {
"200": {
"description": "Заказ успешно отменен"
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"404": {
"description": "Заказ не найден",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/checkout/delivery/pickup_points": {
"get": {
"summary": "Получить список пунктов выдачи (ПВЗ)",
"description": "Метод обязателен, если доставкой управляете вы сами и у вас есть ПВЗ служб доставки,\nкоторые не поддерживаются «из коробки».\n\nМетод возвращает список пунктов выдачи, поддерживаемых магазином.\n\nПорядок, в котором возвращаются ПВЗ при пагинации — определяется магазином.\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "limit",
"in": "query",
"required": true,
"description": "Максимально допустимое количество ПВЗ в ответе.",
"schema": {
"type": "integer"
},
"example": 1000
},
{
"name": "offset",
"in": "query",
"required": true,
"description": "Количество ПВЗ, которые нужно пропустить.",
"schema": {
"type": "integer"
},
"example": 0
}
],
"responses": {
"200": {
"description": "Список пунктов выдачи",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"pickup_points",
"total_count"
],
"properties": {
"pickup_points": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"address",
"is_cash_available",
"is_card_available",
"working_hours",
"coordinates",
"time_zone"
],
"properties": {
"id": {
"type": "string",
"description": "Уникальный идентификатор ПВЗ",
"example": "PP001"
},
"name": {
"type": "string",
"description": "Название ПВЗ",
"example": "ПВЗ на Примерной 10"
},
"address": {
"type": "string",
"description": "Полный адрес ПВЗ",
"example": "Москва, улица Примерная, 10"
},
"has_fitting": {
"type": "boolean",
"description": "Есть ли возможность примерки в ПВЗ",
"example": true
},
"is_cash_available": {
"type": "boolean",
"description": "Есть ли возможность оплаты наличными в ПВЗ",
"example": true
},
"is_card_available": {
"type": "boolean",
"description": "Есть ли возможность оплаты картой в ПВЗ",
"example": true
},
"working_hours": {
"description": "Время работы ПВЗ по дням недели",
"type": "object",
"properties": {
"mon": {
"type": "string",
"description": "Время работы в понедельник",
"example": "09:00-21:00"
},
"tue": {
"type": "string",
"description": "Время работы во вторник",
"example": "09:00-21:00"
},
"wed": {
"type": "string",
"description": "Время работы в среду",
"example": "09:00-21:00"
},
"thu": {
"type": "string",
"description": "Время работы в четверг",
"example": "09:00-21:00"
},
"fri": {
"type": "string",
"description": "Время работы в пятницу",
"example": "09:00-21:00"
},
"sat": {
"type": "string",
"description": "Время работы в субботу",
"example": "10:00-18:00"
},
"sun": {
"type": "string",
"description": "Время работы в воскресенье",
"example": "10:00-18:00"
}
},
"example": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
}
},
"coordinates": {
"description": "Координаты ПВЗ",
"type": "object",
"required": [
"lat",
"lon"
],
"properties": {
"lat": {
"type": "number",
"format": "float",
"description": "Широта",
"example": 55.755814
},
"lon": {
"type": "number",
"format": "float",
"description": "Долгота",
"example": 37.617635
}
},
"example": {
"lat": 55.755814,
"lon": 37.617635
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона ПВЗ; смещение в часах от UTC",
"example": 3
},
"description": {
"type": "string",
"description": "Текстовое описание (как добраться до ПВЗ, доп. информация)",
"example": "Вход с торца здания, рядом с вывеской 'Магазин'"
},
"display_service_type": {
"description": "Определяет какая служба доставки будет указана для данного ПВЗ покупателю",
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"dalli",
"russian_post",
"pecom",
"ozon",
"ycp_delivery",
"5post",
"yandex_market"
]
}
},
"example": {
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"working_hours": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
},
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3,
"description": "Вход с торца здания, рядом с вывеской 'Магазин'",
"display_service_type": "yandex_delivery"
}
},
"example": [
{
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3
},
{
"id": "PP002",
"name": "ПВЗ на Центральной 5",
"address": "Москва, улица Центральная, 5",
"has_fitting": false,
"is_cash_available": false,
"is_card_available": true,
"coordinates": {
"lat": 55.76,
"lon": 37.62
},
"time_zone": 3
}
]
},
"total_count": {
"type": "integer",
"description": "Общее количество ПВЗ.",
"example": 42
}
},
"example": {
"pickup_points": [
{
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3
},
{
"id": "PP002",
"name": "ПВЗ на Центральной 5",
"address": "Москва, улица Центральная, 5",
"has_fitting": false,
"is_cash_available": false,
"is_card_available": true,
"coordinates": {
"lat": 55.76,
"lon": 37.62
},
"time_zone": 3
}
],
"total_count": 42
}
},
"examples": {
"success": {
"value": {
"pickup_points": [
{
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"working_hours": {
"mon": "09:00–21:00",
"tue": "09:00–21:00",
"wed": "09:00–21:00",
"thu": "09:00–21:00",
"fri": "09:00–21:00",
"sat": "10:00–18:00",
"sun": "10:00–18:00"
},
"time_zone": 3,
"coordinates": {
"lat": 55.751244,
"lon": 37.618423
},
"description": "Вход с торца здания, рядом с вывеской 'Магазин'"
}
]
}
}
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/checkout/delivery/options": {
"post": {
"summary": "Рассчитать опции доставки для текущей корзины",
"description": "Метод обязателен, если вы сами управляете доставкой.\n\nМетод рассчитывает доступные варианты доставки для товаров из корзины\nс учетом выбранного адреса или пункта выдачи.\n\nВ ответ возвращается список опций доставки:\n- дата доставки;\n- временной интервал (если применимо);\n- стоимость для покупателя.\n",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"items",
"delivery_target"
],
"properties": {
"items": {
"type": "array",
"description": "Список товаров из корзины",
"items": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара (SKU)",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Запрашиваемое количество",
"example": 2
}
}
},
"example": [
{
"id": "50",
"quantity": 2
},
{
"id": "51",
"quantity": 1
}
]
},
"delivery_target": {
"type": "object",
"required": [
"delivery_method",
"address"
],
"description": "Адрес доставки",
"properties": {
"delivery_method": {
"type": "string",
"enum": [
"pickup_point",
"courier"
],
"description": "Тип доставки",
"example": "courier"
},
"address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
}
},
"example": {
"delivery_method": "courier",
"address": {
"locality": "Москва",
"address": "улица Примерная, 10с2"
}
}
}
},
"example": {
"items": [
{
"id": "50",
"quantity": 2
},
{
"id": "51",
"quantity": 1
}
],
"delivery_target": {
"delivery_method": "courier",
"address": {
"locality": "Москва",
"address": "улица Примерная, 10с2"
}
}
}
},
"examples": {
"courier": {
"summary": "Варианты доставки курьером",
"description": "Пример получения вариантов доставки курьером",
"value": {
"items": [
{
"id": "50",
"quantity": 2
}
],
"delivery_target": {
"delivery_method": "courier",
"address": {
"locality": "Москва",
"address": "улица Примерная, 10"
}
}
}
},
"pickup": {
"summary": "Варианты доставки в ПВЗ",
"description": "Пример получения вариантов доставки в ПВЗ",
"value": {
"items": [
{
"id": "50",
"quantity": 2
}
],
"delivery_target": {
"delivery_method": "pickup_point",
"address": {
"pickup_point_id": "PP_12345"
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Список опций доставки",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"delivery_options"
],
"properties": {
"delivery_options": {
"type": "array",
"description": "Список доступных вариантов доставки",
"items": {
"type": "object",
"required": [
"delivery_date_interval",
"cost"
],
"properties": {
"delivery_date_interval": {
"description": "Интервал дат доставки",
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"cost": {
"type": "number",
"format": "float",
"description": "Стоимость доставки для покупателя",
"example": 300
},
"id": {
"type": "string",
"description": "ID варианта доставки",
"example": "option-12345"
}
},
"example": {
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
}
},
"example": [
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
},
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-17"
},
"end_interval": {
"date": "2025-04-18"
},
"time_zone": 3
},
"cost": 200,
"id": "option-12346"
}
]
}
},
"example": {
"delivery_options": [
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
},
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-17"
},
"end_interval": {
"date": "2025-04-18"
},
"time_zone": 3
},
"cost": 200,
"id": "option-12346"
}
]
}
},
"examples": {
"success": {
"value": {
"options": [
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-15",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-15",
"time": "14:00:00"
}
},
"cost": 300,
"id": "option-12345"
},
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
}
},
"cost": 200,
"id": "option-12346"
}
]
}
}
}
}
}
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
},
"/order": {
"get": {
"summary": "Получить информацию о доставке заказа",
"description": "Обязательный метод.\n\nВозвращается история статусов доставки заказа, информация о товарах и ссылка на отслеживание заказа при наличии.\n",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "order_id",
"in": "query",
"required": true,
"description": "ID заказа",
"schema": {
"type": "string"
},
"example": "01996fd7-9a16-44aa-89ae-25cab68e0790"
}
],
"responses": {
"200": {
"description": "Информация о заказе",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"items",
"delivery_statuses"
],
"properties": {
"items": {
"type": "array",
"description": "Список товаров в заказе.",
"items": {
"type": "object",
"required": [
"id",
"quantity",
"refused_count"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 3
},
"refused_count": {
"type": "integer",
"description": "Количество отмененных товаров — значение меньше или равно **quantity**.",
"example": 1
}
},
"example": {
"id": "50",
"quantity": 3,
"refused_count": 1
}
},
"example": [
{
"id": "50",
"quantity": 3,
"refused_count": 1
},
{
"id": "51",
"quantity": 1,
"refused_count": 0
}
]
},
"delivery_statuses": {
"type": "array",
"description": "История статусов доставки. Статус **new** обязателен для истории.",
"items": {
"type": "object",
"required": [
"status",
"timestamp"
],
"properties": {
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"arrived_to_pickup_point",
"delivered",
"cancelled"
],
"description": "Статус доставки, delivered означает что доставка завершена",
"example": "in_progress"
},
"timestamp": {
"type": "integer",
"format": "uint32",
"description": "Временная метка статуса доставки UNIX",
"example": 1767232800
}
},
"example": {
"status": "in_progress",
"timestamp": 1767232800
}
},
"example": [
{
"status": "new",
"timestamp": 1767222800
},
{
"status": "in_progress",
"timestamp": 1767232800
},
{
"status": "arrived_to_pickup_point",
"timestamp": 1767243600
},
{
"status": "delivered",
"timestamp": 1767252800
}
]
},
"tracking_url": {
"type": "string",
"description": "URL для отслеживания посылки",
"example": "https://tracking.com/1234567890"
}
}
},
"examples": {
"success": {
"value": {
"items": [
{
"id": "50",
"quantity": 2,
"refused_count": 0
}
],
"delivery_statuses": [
{
"status": "in_progress",
"timestamp": 1767243600
}
],
"tracking_url": "https://tracking.com/1234567890"
}
}
}
}
}
},
"400": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"401": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"500": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"description": "Bearer токен для авторизации. Токен настраивается в админ-панели модуля.\nФормат: `Bearer YOUR_TOKEN`.\n"
}
},
"schemas": {
"Address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
},
"DeliveryTarget": {
"type": "object",
"required": [
"delivery_method",
"address"
],
"description": "Адрес доставки",
"properties": {
"delivery_method": {
"type": "string",
"enum": [
"pickup_point",
"courier"
],
"description": "Тип доставки",
"example": "courier"
},
"address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
}
},
"example": {
"delivery_method": "courier",
"address": {
"locality": "Москва",
"address": "улица Примерная, 10с2"
}
}
},
"DeliveryStatus": {
"type": "object",
"required": [
"status",
"timestamp"
],
"properties": {
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"arrived_to_pickup_point",
"delivered",
"cancelled"
],
"description": "Статус доставки, delivered означает что доставка завершена",
"example": "in_progress"
},
"timestamp": {
"type": "integer",
"format": "uint32",
"description": "Временная метка статуса доставки UNIX",
"example": 1767232800
}
},
"example": {
"status": "in_progress",
"timestamp": 1767232800
}
},
"OrderItem": {
"type": "object",
"required": [
"id",
"quantity",
"refused_count"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 3
},
"refused_count": {
"type": "integer",
"description": "Количество отмененных товаров — значение меньше или равно **quantity**.",
"example": 1
}
},
"example": {
"id": "50",
"quantity": 3,
"refused_count": 1
}
},
"Order": {
"type": "object",
"required": [
"items",
"delivery_statuses"
],
"properties": {
"items": {
"type": "array",
"description": "Список товаров в заказе.",
"items": {
"type": "object",
"required": [
"id",
"quantity",
"refused_count"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 3
},
"refused_count": {
"type": "integer",
"description": "Количество отмененных товаров — значение меньше или равно **quantity**.",
"example": 1
}
},
"example": {
"id": "50",
"quantity": 3,
"refused_count": 1
}
},
"example": [
{
"id": "50",
"quantity": 3,
"refused_count": 1
},
{
"id": "51",
"quantity": 1,
"refused_count": 0
}
]
},
"delivery_statuses": {
"type": "array",
"description": "История статусов доставки. Статус **new** обязателен для истории.",
"items": {
"type": "object",
"required": [
"status",
"timestamp"
],
"properties": {
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"arrived_to_pickup_point",
"delivered",
"cancelled"
],
"description": "Статус доставки, delivered означает что доставка завершена",
"example": "in_progress"
},
"timestamp": {
"type": "integer",
"format": "uint32",
"description": "Временная метка статуса доставки UNIX",
"example": 1767232800
}
},
"example": {
"status": "in_progress",
"timestamp": 1767232800
}
},
"example": [
{
"status": "new",
"timestamp": 1767222800
},
{
"status": "in_progress",
"timestamp": 1767232800
},
{
"status": "arrived_to_pickup_point",
"timestamp": 1767243600
},
{
"status": "delivered",
"timestamp": 1767252800
}
]
},
"tracking_url": {
"type": "string",
"description": "URL для отслеживания посылки",
"example": "https://tracking.com/1234567890"
}
}
},
"DeliveryOptionsItem": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара (SKU)",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Запрашиваемое количество",
"example": 2
}
}
},
"GetDeliveryOptionsRequest": {
"type": "object",
"required": [
"items",
"delivery_target"
],
"properties": {
"items": {
"type": "array",
"description": "Список товаров из корзины",
"items": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара (SKU)",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Запрашиваемое количество",
"example": 2
}
}
},
"example": [
{
"id": "50",
"quantity": 2
},
{
"id": "51",
"quantity": 1
}
]
},
"delivery_target": {
"type": "object",
"required": [
"delivery_method",
"address"
],
"description": "Адрес доставки",
"properties": {
"delivery_method": {
"type": "string",
"enum": [
"pickup_point",
"courier"
],
"description": "Тип доставки",
"example": "courier"
},
"address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
}
},
"example": {
"delivery_method": "courier",
"address": {
"locality": "Москва",
"address": "улица Примерная, 10с2"
}
}
}
},
"example": {
"items": [
{
"id": "50",
"quantity": 2
},
{
"id": "51",
"quantity": 1
}
],
"delivery_target": {
"delivery_method": "courier",
"address": {
"locality": "Москва",
"address": "улица Примерная, 10с2"
}
}
}
},
"DeliveryInterval": {
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"DeliveryDateInterval": {
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"DeliveryOption": {
"type": "object",
"required": [
"delivery_date_interval",
"cost"
],
"properties": {
"delivery_date_interval": {
"description": "Интервал дат доставки",
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"cost": {
"type": "number",
"format": "float",
"description": "Стоимость доставки для покупателя",
"example": 300
},
"id": {
"type": "string",
"description": "ID варианта доставки",
"example": "option-12345"
}
},
"example": {
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
}
},
"GetDeliveryOptionsResponse": {
"type": "object",
"required": [
"delivery_options"
],
"properties": {
"delivery_options": {
"type": "array",
"description": "Список доступных вариантов доставки",
"items": {
"type": "object",
"required": [
"delivery_date_interval",
"cost"
],
"properties": {
"delivery_date_interval": {
"description": "Интервал дат доставки",
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"cost": {
"type": "number",
"format": "float",
"description": "Стоимость доставки для покупателя",
"example": 300
},
"id": {
"type": "string",
"description": "ID варианта доставки",
"example": "option-12345"
}
},
"example": {
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
}
},
"example": [
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
},
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-17"
},
"end_interval": {
"date": "2025-04-18"
},
"time_zone": 3
},
"cost": 200,
"id": "option-12346"
}
]
}
},
"example": {
"delivery_options": [
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
},
"cost": 300,
"id": "option-12345"
},
{
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-17"
},
"end_interval": {
"date": "2025-04-18"
},
"time_zone": 3
},
"cost": 200,
"id": "option-12346"
}
]
}
},
"Warehouse": {
"type": "object",
"required": [
"id",
"title",
"address",
"phone"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"title": {
"type": "string",
"description": "Название склада",
"example": "Основной склад"
},
"address": {
"type": "string",
"description": "Полный адрес склада",
"example": "Москва, улица Примерная, 1"
},
"phone": {
"type": "string",
"description": "Телефон склада",
"example": "+7 (495) 123-45-67"
},
"description": {
"type": "string",
"description": "Описание склада",
"example": "Главный склад компании"
},
"self_pickup_options": {
"description": "Настройки самовывоза для склада. \nЕсли передано значение self_pickup_options.enabled = true, то обязательно должен быть заполнен график в поле schedule.\nЕсли enabled = false, то склад не будет доступен для самовывоза, schedule передавать не нужно.\n",
"example": {
"enabled": true,
"schedule": {
"restrictions": [
{
"day": 1,
"time_from": "10:00",
"time_to": "22:00",
"time_zone": 3
}
]
}
},
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Признак доступности самовывоза для склада"
},
"schedule": {
"description": "График самовывоза (рабочие дни и часы). Поле обязательно для заполнения, если включен самовывоз для склада.",
"type": "object",
"required": [
"restrictions"
],
"properties": {
"restrictions": {
"type": "array",
"description": "Интервалы по дням недели.\n\nДля круглосуточной работы нужно передавать значения time_from=\"00:00\" и time_to=\"23:59\".\n",
"minItems": 1,
"items": {
"type": "object",
"required": [
"day",
"time_from",
"time_to",
"time_zone"
],
"properties": {
"day": {
"type": "integer",
"description": "Номер дня недели (1=понедельник, …, 7=воскресенье)",
"minimum": 1,
"maximum": 7,
"example": 1
},
"time_from": {
"type": "string",
"description": "Начало интервала рабочего времени в формате HH:mm",
"example": "10:00"
},
"time_to": {
"type": "string",
"description": "Конец интервала рабочего времени в формате HH:mm",
"example": "22:00"
},
"time_zone": {
"type": "integer",
"description": "Часовой пояс в виде смещения в часах относительно UTC (например, 3 для UTC+3)",
"example": 3
}
}
}
}
}
}
}
},
"ycp_delivery_options": {
"description": "Настройки доставки YCP для склада.\n\nYCP доставка будет включена для склада в следующих случаях:\n - если передано значение ycp_delivery_options.enabled = true и доставка по YCP протоколу включена в разделе \"Склады и логистика\" настроек\n - если это поле не передано и доставка по YCP протоколу включена в разделе \"Склады и логистика\" настроек\n",
"example": {
"enabled": true
},
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Флаг, указывающий, включена ли доставка YCP для склада",
"example": true
}
}
}
},
"example": {
"id": "1",
"title": "Основной склад",
"address": "Москва, улица Примерная, 1",
"phone": "+7 (495) 123-45-67",
"description": "Главный склад компании",
"self_pickup_options": {
"enabled": true,
"schedule": {
"restrictions": [
{
"day": 1,
"time_from": "10:00",
"time_to": "22:00",
"time_zone": 3
}
]
}
},
"ycp_delivery_options": {
"enabled": true
}
}
},
"WarehouseSelfPickupOptions": {
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Признак доступности самовывоза для склада"
},
"schedule": {
"description": "График самовывоза (рабочие дни и часы). Поле обязательно для заполнения, если включен самовывоз для склада.",
"type": "object",
"required": [
"restrictions"
],
"properties": {
"restrictions": {
"type": "array",
"description": "Интервалы по дням недели.\n\nДля круглосуточной работы нужно передавать значения time_from=\"00:00\" и time_to=\"23:59\".\n",
"minItems": 1,
"items": {
"type": "object",
"required": [
"day",
"time_from",
"time_to",
"time_zone"
],
"properties": {
"day": {
"type": "integer",
"description": "Номер дня недели (1=понедельник, …, 7=воскресенье)",
"minimum": 1,
"maximum": 7,
"example": 1
},
"time_from": {
"type": "string",
"description": "Начало интервала рабочего времени в формате HH:mm",
"example": "10:00"
},
"time_to": {
"type": "string",
"description": "Конец интервала рабочего времени в формате HH:mm",
"example": "22:00"
},
"time_zone": {
"type": "integer",
"description": "Часовой пояс в виде смещения в часах относительно UTC (например, 3 для UTC+3)",
"example": 3
}
}
}
}
}
}
}
},
"WarehouseYCPDeliveryOptions": {
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Флаг, указывающий, включена ли доставка YCP для склада",
"example": true
}
}
},
"WarehouseSelfPickupSchedule": {
"type": "object",
"required": [
"restrictions"
],
"properties": {
"restrictions": {
"type": "array",
"description": "Интервалы по дням недели.\n\nДля круглосуточной работы нужно передавать значения time_from=\"00:00\" и time_to=\"23:59\".\n",
"minItems": 1,
"items": {
"type": "object",
"required": [
"day",
"time_from",
"time_to",
"time_zone"
],
"properties": {
"day": {
"type": "integer",
"description": "Номер дня недели (1=понедельник, …, 7=воскресенье)",
"minimum": 1,
"maximum": 7,
"example": 1
},
"time_from": {
"type": "string",
"description": "Начало интервала рабочего времени в формате HH:mm",
"example": "10:00"
},
"time_to": {
"type": "string",
"description": "Конец интервала рабочего времени в формате HH:mm",
"example": "22:00"
},
"time_zone": {
"type": "integer",
"description": "Часовой пояс в виде смещения в часах относительно UTC (например, 3 для UTC+3)",
"example": 3
}
}
}
}
}
},
"WarehouseSelfPickupScheduleRestriction": {
"type": "object",
"required": [
"day",
"time_from",
"time_to",
"time_zone"
],
"properties": {
"day": {
"type": "integer",
"description": "Номер дня недели (1=понедельник, …, 7=воскресенье)",
"minimum": 1,
"maximum": 7,
"example": 1
},
"time_from": {
"type": "string",
"description": "Начало интервала рабочего времени в формате HH:mm",
"example": "10:00"
},
"time_to": {
"type": "string",
"description": "Конец интервала рабочего времени в формате HH:mm",
"example": "22:00"
},
"time_zone": {
"type": "integer",
"description": "Часовой пояс в виде смещения в часах относительно UTC (например, 3 для UTC+3)",
"example": 3
}
}
},
"BasketItem": {
"type": "object",
"required": [
"id",
"name",
"regular_price",
"final_price",
"warehouses",
"dimensions",
"characteristics",
"variations"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"name": {
"type": "string",
"description": "Название товара",
"example": "Футболка хлопковая"
},
"regular_price": {
"type": "integer",
"description": "Обычная цена",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена (с учетом скидок)",
"example": 1799
},
"vat": {
"type": "integer",
"description": "НДС, по умолчанию 22%",
"example": 22
},
"img": {
"type": "string",
"format": "uri",
"description": "URL изображения товара",
"example": "https://example.com/image.jpg"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL страницы товара",
"example": "https://example.com/product/50"
},
"warehouses": {
"type": "array",
"description": "Наличие на складах",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"available_quantity": {
"type": "integer",
"description": "Доступное количество",
"example": 10
}
}
},
"example": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
]
},
"dimensions": {
"type": "object",
"description": "Габариты и вес товара",
"properties": {
"width": {
"type": "integer",
"description": "Ширина (мм)",
"example": 100
},
"height": {
"type": "integer",
"description": "Высота (мм)",
"example": 200
},
"depth": {
"type": "integer",
"description": "Глубина (мм)",
"example": 50
},
"weight": {
"type": "integer",
"description": "Вес (г)",
"example": 500
}
},
"example": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
}
},
"characteristics": {
"type": "array",
"description": "Характеристики товара",
"items": {
"type": "object",
"description": "Характеристика товара",
"required": [
"display_type",
"code",
"name",
"properties"
],
"properties": {
"display_type": {
"type": "string",
"enum": [
"color",
"text"
],
"example": "text"
},
"code": {
"type": "string",
"description": "Группирующий код характеристики",
"example": "SIZES_CLOTHES"
},
"name": {
"type": "string",
"description": "Название характеристики",
"example": "Размер"
},
"properties": {
"oneOf": [
{
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
}
]
}
},
"example": {
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
}
},
"example": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
},
"variations": {
"type": "array",
"description": "Варианты товара",
"items": {
"type": "object",
"required": [
"id",
"name",
"regular_price",
"final_price",
"warehouses",
"dimensions",
"characteristics"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "51"
},
"name": {
"type": "string",
"description": "Название товара",
"example": "Футболка хлопковая"
},
"regular_price": {
"type": "integer",
"description": "Обычная цена",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена (с учетом скидок)",
"example": 1799
},
"vat": {
"type": "integer",
"description": "НДС, по умолчанию 22%",
"example": 22
},
"img": {
"type": "string",
"format": "uri",
"description": "URL изображения товара",
"example": "https://example.com/image1.jpg"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL страницы товара",
"example": "https://example.com/product/51"
},
"warehouses": {
"type": "array",
"description": "Наличие на складах",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"available_quantity": {
"type": "integer",
"description": "Доступное количество",
"example": 10
}
}
},
"example": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
]
},
"dimensions": {
"type": "object",
"description": "Габариты и вес товара",
"properties": {
"width": {
"type": "integer",
"description": "Ширина (мм)",
"example": 100
},
"height": {
"type": "integer",
"description": "Высота (мм)",
"example": 200
},
"depth": {
"type": "integer",
"description": "Глубина (мм)",
"example": 50
},
"weight": {
"type": "integer",
"description": "Вес (г)",
"example": 500
}
},
"example": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
}
},
"characteristics": {
"type": "array",
"description": "Характеристики товара",
"items": {
"type": "object",
"description": "Характеристика товара",
"required": [
"display_type",
"code",
"name",
"properties"
],
"properties": {
"display_type": {
"type": "string",
"enum": [
"color",
"text"
],
"example": "text"
},
"code": {
"type": "string",
"description": "Группирующий код характеристики",
"example": "SIZES_CLOTHES"
},
"name": {
"type": "string",
"description": "Название характеристики",
"example": "Размер"
},
"properties": {
"oneOf": [
{
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
}
]
}
},
"example": {
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
}
},
"example": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
},
"example": {
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
},
"example": [
{
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
},
{
"id": "52",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image2.jpg",
"url": "https://example.com/product/52",
"warehouses": [
{
"id": "1",
"available_quantity": 3
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "S"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Белый",
"hex": "#FFFFFF"
}
}
]
}
]
}
},
"example": {
"id": "50",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image.jpg",
"url": "https://example.com/product/50",
"warehouses": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
],
"variations": [
{
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
},
{
"id": "52",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image2.jpg",
"url": "https://example.com/product/52",
"warehouses": [
{
"id": "1",
"available_quantity": 3
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "S"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Белый",
"hex": "#FFFFFF"
}
}
]
}
]
}
},
"BasketItemVariation": {
"type": "object",
"required": [
"id",
"name",
"regular_price",
"final_price",
"warehouses",
"dimensions",
"characteristics"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "51"
},
"name": {
"type": "string",
"description": "Название товара",
"example": "Футболка хлопковая"
},
"regular_price": {
"type": "integer",
"description": "Обычная цена",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена (с учетом скидок)",
"example": 1799
},
"vat": {
"type": "integer",
"description": "НДС, по умолчанию 22%",
"example": 22
},
"img": {
"type": "string",
"format": "uri",
"description": "URL изображения товара",
"example": "https://example.com/image1.jpg"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL страницы товара",
"example": "https://example.com/product/51"
},
"warehouses": {
"type": "array",
"description": "Наличие на складах",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID склада",
"example": "1"
},
"available_quantity": {
"type": "integer",
"description": "Доступное количество",
"example": 10
}
}
},
"example": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
]
},
"dimensions": {
"type": "object",
"description": "Габариты и вес товара",
"properties": {
"width": {
"type": "integer",
"description": "Ширина (мм)",
"example": 100
},
"height": {
"type": "integer",
"description": "Высота (мм)",
"example": 200
},
"depth": {
"type": "integer",
"description": "Глубина (мм)",
"example": 50
},
"weight": {
"type": "integer",
"description": "Вес (г)",
"example": 500
}
},
"example": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
}
},
"characteristics": {
"type": "array",
"description": "Характеристики товара",
"items": {
"type": "object",
"description": "Характеристика товара",
"required": [
"display_type",
"code",
"name",
"properties"
],
"properties": {
"display_type": {
"type": "string",
"enum": [
"color",
"text"
],
"example": "text"
},
"code": {
"type": "string",
"description": "Группирующий код характеристики",
"example": "SIZES_CLOTHES"
},
"name": {
"type": "string",
"description": "Название характеристики",
"example": "Размер"
},
"properties": {
"oneOf": [
{
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
}
]
}
},
"example": {
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
}
},
"example": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
},
"example": {
"id": "51",
"name": "Футболка хлопковая",
"regular_price": 1999,
"final_price": 1799,
"img": "https://example.com/image1.jpg",
"url": "https://example.com/product/51",
"warehouses": [
{
"id": "1",
"available_quantity": 10
},
{
"id": "2",
"available_quantity": 5
}
],
"dimensions": {
"width": 100,
"height": 200,
"depth": 50,
"weight": 500
},
"characteristics": [
{
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "M"
}
},
{
"display_type": "color",
"code": "COLOR_REF",
"name": "Цвет",
"properties": {
"value": "Черный",
"hex": "#000000"
}
}
]
}
},
"Characteristic": {
"type": "object",
"description": "Характеристика товара",
"required": [
"display_type",
"code",
"name",
"properties"
],
"properties": {
"display_type": {
"type": "string",
"enum": [
"color",
"text"
],
"example": "text"
},
"code": {
"type": "string",
"description": "Группирующий код характеристики",
"example": "SIZES_CLOTHES"
},
"name": {
"type": "string",
"description": "Название характеристики",
"example": "Размер"
},
"properties": {
"oneOf": [
{
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
}
]
}
},
"example": {
"display_type": "text",
"code": "SIZES_CLOTHES",
"name": "Размер",
"properties": {
"value": "XXL"
}
}
},
"CharacteristicColor": {
"type": "object",
"required": [
"value",
"hex"
],
"properties": {
"value": {
"type": "string",
"description": "Название цвета",
"example": "Черный"
},
"hex": {
"type": "string",
"description": "Цветовой код (hex)",
"example": "#000000"
}
},
"example": {
"value": "Черный",
"hex": "#000000"
}
},
"CharacteristicText": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "Значение характеристики",
"example": "XXL"
}
},
"example": {
"value": "XXL"
}
},
"CheckoutPlacedRequest": {
"type": "object",
"required": [
"session_id",
"order_id",
"order_number",
"payment_method"
],
"properties": {
"session_id": {
"type": "string",
"description": "ID сессии чекаута",
"example": "019c18f6-cb3c-7f31-9395-53925a6b0e28"
},
"order_id": {
"type": "string",
"description": "ID заказа",
"example": "01996fd7-9a16-44aa-89ae-25cab68e0790"
},
"order_number": {
"type": "integer",
"description": "Номер заказа в системе YCP.\nУникален в рамках всех заказов данного магазина через YCP-чекаут.\n",
"example": 1234
},
"payment_method": {
"type": "string",
"enum": [
"online",
"on_delivery"
],
"description": "Метод оплаты. online — заказ уже оплачен, on_delivery — заказ будет оплачен при доставке.",
"example": "online"
},
"online_payment_method": {
"type": "string",
"enum": [
"card",
"sbp",
"split",
"split_sbp"
],
"description": "Как оплачен онлайн заказ",
"example": "split"
},
"acquiring_id": {
"type": "string",
"description": "Уникальный идентификатор транзакции оплаты. Заполняется при payment_method = online.\n",
"example": "019b56d1-89a5-7a78-849f-4e8b174d0c77"
}
},
"example": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"order_id": "01996fd7-9a16-44aa-89ae-25cab68e0790",
"order_number": 1234,
"payment_method": "online",
"online_payment_method": "split"
}
},
"ActualInventoryItem": {
"type": "object",
"required": [
"id",
"warehouses",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string"
},
"regular_price": {
"type": "integer"
},
"final_price": {
"type": "integer"
},
"warehouses": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string"
},
"available_quantity": {
"type": "integer"
}
}
}
}
}
},
"ActualInventory": {
"type": "object",
"description": "Актуальные данные о наличии и ценах",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"warehouses",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string"
},
"regular_price": {
"type": "integer"
},
"final_price": {
"type": "integer"
},
"warehouses": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string"
},
"available_quantity": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"CreateCheckoutSessionConflictResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"actual_inventory": {
"type": "object",
"description": "Актуальные данные о наличии и ценах",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"warehouses",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string"
},
"regular_price": {
"type": "integer"
},
"final_price": {
"type": "integer"
},
"warehouses": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"available_quantity"
],
"properties": {
"id": {
"type": "string"
},
"available_quantity": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"checkout_canceled": {
"type": "boolean",
"description": "Флаг, указывающий, была ли чекаутная сессия уже отменена"
}
},
"example": {
"error": "Цены изменились или товары закончились",
"actual_inventory": {
"items": [
{
"id": "50",
"warehouses": [
{
"id": "1",
"available_quantity": 5,
"regular_price": 2000,
"final_price": 1900
}
]
}
]
}
}
},
"CreateCheckoutResponse": {
"type": "object",
"properties": {
"order_number": {
"type": "string",
"description": "Номер заказа в системе магазина, который будет показан покупателю.\nЕсли не передан — YCP использует собственный порядковый номер заказа.\n",
"example": "order1234"
}
}
},
"Item": {
"type": "object",
"required": [
"id",
"quantity",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 2
},
"regular_price": {
"type": "integer",
"description": "Обычная цена товара",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена товара (с учетом скидок)",
"example": 1799
}
},
"example": {
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
}
},
"CreateCheckoutRequest": {
"type": "object",
"required": [
"session_id",
"items",
"warehouse_id",
"customer",
"delivery"
],
"properties": {
"session_id": {
"type": "string",
"description": "ID сессии чекаута",
"example": "019c18f6-cb3c-7f31-9395-53925a6b0e28"
},
"warehouse_id": {
"type": "string",
"description": "ID склада отгрузки",
"example": "1"
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"quantity",
"regular_price",
"final_price"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 2
},
"regular_price": {
"type": "integer",
"description": "Обычная цена товара",
"example": 1999
},
"final_price": {
"type": "integer",
"description": "Финальная цена товара (с учетом скидок)",
"example": 1799
}
},
"example": {
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
}
},
"example": [
{
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
},
{
"id": "51",
"quantity": 1,
"regular_price": 2499,
"final_price": 2499
}
]
},
"customer": {
"type": "object",
"required": [
"full_name",
"phone",
"email"
],
"properties": {
"full_name": {
"type": "string",
"description": "Полное имя покупателя",
"example": "Иван Иванов"
},
"phone": {
"type": "string",
"description": "Телефон покупателя",
"example": "+79991234567"
},
"email": {
"type": "string",
"format": "email",
"description": "Email покупателя",
"example": "ivan@example.com"
}
},
"example": {
"full_name": "Иван Иванов",
"phone": "+79991234567",
"email": "ivan@example.com"
}
},
"delivery": {
"type": "object",
"required": [
"delivery_method",
"service_type",
"price",
"address",
"delivery_date_interval"
],
"properties": {
"delivery_method": {
"type": "string",
"enum": [
"courier",
"pickup_point",
"self_pickup"
],
"description": "Метод доставки",
"example": "courier"
},
"service_type": {
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"pecom",
"russian_post",
"dalli",
"self_pickup",
"merchant_ship",
"ycp"
],
"description": "Служба доставки",
"example": "yandex_delivery"
},
"service_display_name": {
"type": "string",
"description": "Отображаемое название службы доставки",
"example": "Яндекс.Доставка"
},
"price": {
"type": "number",
"format": "float",
"description": "Стоимость доставки для покупателя",
"example": 100
},
"address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
},
"delivery_date_interval": {
"description": "Интервал даты доставки",
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"ycp_delivery_option_id": {
"type": "string",
"description": "Если для доставки заказа используется вариант, полученный через метод /api/v1/delivery/options, передается идентификатор (ID) этого варианта.",
"example": "option-12345"
}
},
"example": {
"delivery_method": "courier",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"locality": "Москва",
"address": "ул. Тестовая, д. 1"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
},
"time_zone": 3
}
}
}
},
"example": {
"session_id": "019c18f6-cb3c-7f31-9395-53925a6b0e28",
"warehouse_id": "1",
"items": [
{
"id": "50",
"quantity": 2,
"regular_price": 1999,
"final_price": 1799
},
{
"id": "51",
"quantity": 1,
"regular_price": 2499,
"final_price": 2499
}
],
"customer": {
"full_name": "Иван Иванов",
"phone": "+79991234567",
"email": "ivan@example.com"
},
"delivery": {
"delivery_method": "courier",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"locality": "Москва",
"address": "ул. Тестовая, д. 1"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
},
"time_zone": 3
}
}
}
},
"Customer": {
"type": "object",
"required": [
"full_name",
"phone",
"email"
],
"properties": {
"full_name": {
"type": "string",
"description": "Полное имя покупателя",
"example": "Иван Иванов"
},
"phone": {
"type": "string",
"description": "Телефон покупателя",
"example": "+79991234567"
},
"email": {
"type": "string",
"format": "email",
"description": "Email покупателя",
"example": "ivan@example.com"
}
},
"example": {
"full_name": "Иван Иванов",
"phone": "+79991234567",
"email": "ivan@example.com"
}
},
"DeliveryInfo": {
"type": "object",
"required": [
"delivery_method",
"service_type",
"price",
"address",
"delivery_date_interval"
],
"properties": {
"delivery_method": {
"type": "string",
"enum": [
"courier",
"pickup_point",
"self_pickup"
],
"description": "Метод доставки",
"example": "courier"
},
"service_type": {
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"pecom",
"russian_post",
"dalli",
"self_pickup",
"merchant_ship",
"ycp"
],
"description": "Служба доставки",
"example": "yandex_delivery"
},
"service_display_name": {
"type": "string",
"description": "Отображаемое название службы доставки",
"example": "Яндекс.Доставка"
},
"price": {
"type": "number",
"format": "float",
"description": "Стоимость доставки для покупателя",
"example": 100
},
"address": {
"type": "object",
"description": "Обязательны адрес доставки, локалити (для courier и self_pickup) или айди ПВЗ (для pickup_point)",
"properties": {
"locality": {
"type": "string",
"description": "Регион",
"example": "Москва"
},
"address": {
"type": "string",
"description": "Полный адрес доставки после региона (улица, дом, корпус, строение)",
"example": "улица Примерная, 10с2"
},
"apartment": {
"type": "string",
"description": "Квартира",
"example": "10"
},
"entrance": {
"type": "string",
"description": "Подъезд",
"example": "2"
},
"floor": {
"type": "string",
"description": "Этаж",
"example": "3"
},
"intercom": {
"type": "string",
"description": "Домофон",
"example": "10"
},
"pickup_point_id": {
"type": "string",
"description": "ID пункта выдачи (для pickup_point)",
"example": "PP_12345"
}
},
"example": {
"locality": "Москва",
"address": "улица Примерная, 10с2",
"apartment": "10",
"entrance": "2",
"floor": "3",
"intercom": "10"
}
},
"delivery_date_interval": {
"description": "Интервал даты доставки",
"type": "object",
"required": [
"start_interval",
"end_interval",
"time_zone"
],
"properties": {
"start_interval": {
"description": "Начало интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"end_interval": {
"description": "Конец интервала доставки",
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Дата доставки",
"example": "2025-04-16"
},
"time": {
"type": "string",
"format": "time",
"description": "Время доставки",
"example": "10:00:00"
}
},
"example": {
"date": "2025-04-16",
"time": "10:00:00"
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона; смещение в часах от UTC",
"example": 3
}
},
"example": {
"start_interval": {
"date": "2025-04-16",
"time": "10:00:00"
},
"end_interval": {
"date": "2025-04-16",
"time": "14:00:00"
},
"time_zone": 3
}
},
"ycp_delivery_option_id": {
"type": "string",
"description": "Если для доставки заказа используется вариант, полученный через метод /api/v1/delivery/options, передается идентификатор (ID) этого варианта.",
"example": "option-12345"
}
},
"example": {
"delivery_method": "courier",
"service_type": "yandex_delivery",
"service_display_name": "Яндекс.Доставка",
"price": 100,
"address": {
"locality": "Москва",
"address": "ул. Тестовая, д. 1"
},
"delivery_date_interval": {
"start_interval": {
"date": "2025-04-16"
},
"end_interval": {
"date": "2025-04-17"
},
"time_zone": 3
}
}
},
"Error": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"WorkingHours": {
"type": "object",
"description": "Время работы ПВЗ по дням недели.\n\nДля круглосуточной работы нужно передавать \"00:00-23:59\".\n\nЕсли ПВЗ не работает в какой-то день недели - не надо передавать поле отвечающее за время работы в этот день.\n",
"properties": {
"mon": {
"type": "string",
"description": "Время работы в понедельник",
"example": "09:00-21:00"
},
"tue": {
"type": "string",
"description": "Время работы во вторник",
"example": "09:00-21:00"
},
"wed": {
"type": "string",
"description": "Время работы в среду",
"example": "09:00-21:00"
},
"thu": {
"type": "string",
"description": "Время работы в четверг",
"example": "09:00-21:00"
},
"fri": {
"type": "string",
"description": "Время работы в пятницу",
"example": "09:00-21:00"
},
"sat": {
"type": "string",
"description": "Время работы в субботу",
"example": "10:00-18:00"
},
"sun": {
"type": "string",
"description": "Время работы в воскресенье",
"example": "10:00-18:00"
}
},
"example": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
}
},
"Coordinates": {
"type": "object",
"description": "Координаты ПВЗ",
"required": [
"lat",
"lon"
],
"properties": {
"lat": {
"type": "number",
"format": "float",
"description": "Широта",
"example": 55.755814
},
"lon": {
"type": "number",
"format": "float",
"description": "Долгота",
"example": 37.617635
}
},
"example": {
"lat": 55.755814,
"lon": 37.617635
}
},
"PickupPointServiceType": {
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"dalli",
"russian_post",
"pecom",
"ozon",
"ycp_delivery",
"5post",
"yandex_market"
]
},
"PickupPoint": {
"type": "object",
"required": [
"id",
"name",
"address",
"is_cash_available",
"is_card_available",
"working_hours",
"coordinates",
"time_zone"
],
"properties": {
"id": {
"type": "string",
"description": "Уникальный идентификатор ПВЗ",
"example": "PP001"
},
"name": {
"type": "string",
"description": "Название ПВЗ",
"example": "ПВЗ на Примерной 10"
},
"address": {
"type": "string",
"description": "Полный адрес ПВЗ",
"example": "Москва, улица Примерная, 10"
},
"has_fitting": {
"type": "boolean",
"description": "Есть ли возможность примерки в ПВЗ",
"example": true
},
"is_cash_available": {
"type": "boolean",
"description": "Есть ли возможность оплаты наличными в ПВЗ",
"example": true
},
"is_card_available": {
"type": "boolean",
"description": "Есть ли возможность оплаты картой в ПВЗ",
"example": true
},
"working_hours": {
"description": "Время работы ПВЗ по дням недели",
"type": "object",
"properties": {
"mon": {
"type": "string",
"description": "Время работы в понедельник",
"example": "09:00-21:00"
},
"tue": {
"type": "string",
"description": "Время работы во вторник",
"example": "09:00-21:00"
},
"wed": {
"type": "string",
"description": "Время работы в среду",
"example": "09:00-21:00"
},
"thu": {
"type": "string",
"description": "Время работы в четверг",
"example": "09:00-21:00"
},
"fri": {
"type": "string",
"description": "Время работы в пятницу",
"example": "09:00-21:00"
},
"sat": {
"type": "string",
"description": "Время работы в субботу",
"example": "10:00-18:00"
},
"sun": {
"type": "string",
"description": "Время работы в воскресенье",
"example": "10:00-18:00"
}
},
"example": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
}
},
"coordinates": {
"description": "Координаты ПВЗ",
"type": "object",
"required": [
"lat",
"lon"
],
"properties": {
"lat": {
"type": "number",
"format": "float",
"description": "Широта",
"example": 55.755814
},
"lon": {
"type": "number",
"format": "float",
"description": "Долгота",
"example": 37.617635
}
},
"example": {
"lat": 55.755814,
"lon": 37.617635
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона ПВЗ; смещение в часах от UTC",
"example": 3
},
"description": {
"type": "string",
"description": "Текстовое описание (как добраться до ПВЗ, доп. информация)",
"example": "Вход с торца здания, рядом с вывеской 'Магазин'"
},
"display_service_type": {
"description": "Определяет какая служба доставки будет указана для данного ПВЗ покупателю",
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"dalli",
"russian_post",
"pecom",
"ozon",
"ycp_delivery",
"5post",
"yandex_market"
]
}
},
"example": {
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"working_hours": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
},
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3,
"description": "Вход с торца здания, рядом с вывеской 'Магазин'",
"display_service_type": "yandex_delivery"
}
},
"GetPickupPointsResponse": {
"type": "object",
"required": [
"pickup_points",
"total_count"
],
"properties": {
"pickup_points": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"address",
"is_cash_available",
"is_card_available",
"working_hours",
"coordinates",
"time_zone"
],
"properties": {
"id": {
"type": "string",
"description": "Уникальный идентификатор ПВЗ",
"example": "PP001"
},
"name": {
"type": "string",
"description": "Название ПВЗ",
"example": "ПВЗ на Примерной 10"
},
"address": {
"type": "string",
"description": "Полный адрес ПВЗ",
"example": "Москва, улица Примерная, 10"
},
"has_fitting": {
"type": "boolean",
"description": "Есть ли возможность примерки в ПВЗ",
"example": true
},
"is_cash_available": {
"type": "boolean",
"description": "Есть ли возможность оплаты наличными в ПВЗ",
"example": true
},
"is_card_available": {
"type": "boolean",
"description": "Есть ли возможность оплаты картой в ПВЗ",
"example": true
},
"working_hours": {
"description": "Время работы ПВЗ по дням недели",
"type": "object",
"properties": {
"mon": {
"type": "string",
"description": "Время работы в понедельник",
"example": "09:00-21:00"
},
"tue": {
"type": "string",
"description": "Время работы во вторник",
"example": "09:00-21:00"
},
"wed": {
"type": "string",
"description": "Время работы в среду",
"example": "09:00-21:00"
},
"thu": {
"type": "string",
"description": "Время работы в четверг",
"example": "09:00-21:00"
},
"fri": {
"type": "string",
"description": "Время работы в пятницу",
"example": "09:00-21:00"
},
"sat": {
"type": "string",
"description": "Время работы в субботу",
"example": "10:00-18:00"
},
"sun": {
"type": "string",
"description": "Время работы в воскресенье",
"example": "10:00-18:00"
}
},
"example": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
}
},
"coordinates": {
"description": "Координаты ПВЗ",
"type": "object",
"required": [
"lat",
"lon"
],
"properties": {
"lat": {
"type": "number",
"format": "float",
"description": "Широта",
"example": 55.755814
},
"lon": {
"type": "number",
"format": "float",
"description": "Долгота",
"example": 37.617635
}
},
"example": {
"lat": 55.755814,
"lon": 37.617635
}
},
"time_zone": {
"type": "integer",
"description": "Временная зона ПВЗ; смещение в часах от UTC",
"example": 3
},
"description": {
"type": "string",
"description": "Текстовое описание (как добраться до ПВЗ, доп. информация)",
"example": "Вход с торца здания, рядом с вывеской 'Магазин'"
},
"display_service_type": {
"description": "Определяет какая служба доставки будет указана для данного ПВЗ покупателю",
"type": "string",
"enum": [
"yandex_delivery",
"cdek",
"dalli",
"russian_post",
"pecom",
"ozon",
"ycp_delivery",
"5post",
"yandex_market"
]
}
},
"example": {
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"working_hours": {
"mon": "09:00-21:00",
"tue": "09:00-21:00",
"wed": "09:00-21:00",
"thu": "09:00-21:00",
"fri": "09:00-21:00",
"sat": "10:00-18:00",
"sun": "10:00-18:00"
},
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3,
"description": "Вход с торца здания, рядом с вывеской 'Магазин'",
"display_service_type": "yandex_delivery"
}
},
"example": [
{
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3
},
{
"id": "PP002",
"name": "ПВЗ на Центральной 5",
"address": "Москва, улица Центральная, 5",
"has_fitting": false,
"is_cash_available": false,
"is_card_available": true,
"coordinates": {
"lat": 55.76,
"lon": 37.62
},
"time_zone": 3
}
]
},
"total_count": {
"type": "integer",
"description": "Общее количество ПВЗ.",
"example": 42
}
},
"example": {
"pickup_points": [
{
"id": "PP001",
"name": "ПВЗ на Примерной 10",
"address": "Москва, улица Примерная, 10",
"has_fitting": true,
"is_cash_available": true,
"is_card_available": true,
"coordinates": {
"lat": 55.755814,
"lon": 37.617635
},
"time_zone": 3
},
{
"id": "PP002",
"name": "ПВЗ на Центральной 5",
"address": "Москва, улица Центральная, 5",
"has_fitting": false,
"is_cash_available": false,
"is_card_available": true,
"coordinates": {
"lat": 55.76,
"lon": 37.62
},
"time_zone": 3
}
],
"total_count": 42
}
},
"BasketCheckItemRequest": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара (SKU)",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Запрашиваемое количество.",
"example": 2
}
},
"example": {
"id": "50",
"quantity": 2
}
},
"BasketCheckRequest": {
"type": "object",
"required": [
"items",
"offers_id_from_merchant_center",
"locality",
"is_health_check"
],
"properties": {
"items": {
"type": "array",
"description": "Список товаров для проверки.",
"items": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара (SKU)",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Запрашиваемое количество.",
"example": 2
}
},
"example": {
"id": "50",
"quantity": 2
}
},
"example": [
{
"id": "50",
"quantity": 2
}
]
},
"offers_id_from_merchant_center": {
"type": "boolean",
"description": "Флаг, указывающий, являются ли id элементов списка items идентификаторами офферов из Merchant Center. Если значение true – это ID оффера, если false - ID товара.",
"example": true
},
"locality": {
"type": "string",
"description": "Регион\n\nДля товаров предоставляются региональные цены и остатки — только по складам соответствующего региона.\n",
"example": "Москва"
},
"is_health_check": {
"type": "boolean",
"description": "Флаг, указывающий, выполняется ли запрос в рамках проверки доступности интеграции, а не при реальном запросе пользователя",
"example": false
}
},
"example": {
"items": [
{
"id": "50",
"quantity": 2
}
],
"offers_id_from_merchant_center": true,
"locality": "Москва",
"is_health_check": false
}
},
"MarkAsDeliveredRequest": {
"type": "object",
"required": [
"purchased_items"
],
"properties": {
"purchased_items": {
"type": "array",
"description": "Список фактически доставленных товаров.",
"items": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 2
}
},
"example": {
"id": "50",
"quantity": 2
}
},
"example": [
{
"id": "50",
"quantity": 2
}
]
}
},
"example": {
"purchased_items": [
{
"id": "50",
"quantity": 2
}
]
}
},
"PurchasedItem": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"description": "ID товара",
"example": "50"
},
"quantity": {
"type": "integer",
"description": "Количество",
"example": 2
}
},
"example": {
"id": "50",
"quantity": 2
}
}
},
"responses": {
"BadRequest": {
"description": "Неверный формат запроса",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Invalid request format: required fields are missing"
}
}
}
},
"Unauthorized": {
"description": "Не авторизован",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Unauthorized"
}
}
}
},
"ServerError": {
"description": "Внутренняя ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Сообщение об ошибке.",
"example": "Произошла ошибка"
}
},
"example": {
"error": "Произошла ошибка"
}
},
"example": {
"error": "Failed to process request"
}
}
}
}
}
}
}