> For the complete documentation index, see [llms.txt](https://delever.gitbook.io/delever/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://delever.gitbook.io/delever/for-developers/1c-integration/katalog.md). Agents can also search and read this documentation through its [MCP server](https://delever.gitbook.io/delever/~gitbook/mcp).

# Каталог

Импорт меню, цены и остатки (стоп-лист / количества).

## Импорт меню (категории, товары, комбо)

> Создаёт или обновляет сущности каталога для филиала, привязанного к ключу интеграции, и при наличии \`menu\_id\`\
> добавляет новые товары в меню филиала.\
> \
> \*\*Поведение:\*\*\
> \- Определение филиала по \`integration\_key\` в \`Authorization\`.\
> \- Пустые массивы \`categories\` / \`products\` / \`combos\` допустимы.<br>

```json
{"openapi":"3.0.3","info":{"title":"API интеграции Delever с 1C","version":"1.0.0"},"tags":[{"name":"Каталог","description":"Импорт меню, цены и остатки (стоп-лист / количества)."}],"servers":[{"url":"/","description":"Базовый URL шлюза интегратора (добавьте хост, например `https://api.example.com`)"}],"security":[{"oneCIntegrationKey":[]}],"components":{"securitySchemes":{"oneCIntegrationKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Сырой integration_key (не Bearer). Должен соответствовать записи интеграции филиала с типом `1c`.\n"}},"schemas":{"MenuImportRequest":{"type":"object","description":"Тело импорта меню. Передавайте только `categories`, `products` и `combos`;\n","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/MenuCategory"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/MenuProduct"}},"combos":{"type":"array","description":"Комбо передаются отдельным массивом с той же структурой, что и `products` (не через `type=combo` в products).","items":{"$ref":"#/components/schemas/MenuProduct"}}},"required":["categories","products","combos"]},"MenuCategory":{"type":"object","properties":{"id":{"type":"string","description":"Внешний id категории в 1С"},"name":{"type":"string"},"order":{"type":"integer","format":"int64","description":"Порядок сортировки;"},"description":{"type":"string"},"image_link":{"type":"string"},"parent_id":{"type":"string","description":"Id родительской категории; пусто для корня"}},"required":["id","name"]},"MenuProduct":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer","format":"int64"},"description":{"type":"string"},"category_id":{"type":"string"},"type":{"type":"string","description":"Тип товара в каталоге"},"splittable":{"type":"boolean"},"measure_unit":{"type":"string"},"price":{"type":"number","format":"float"},"ikpu":{"type":"string"},"package_code":{"type":"string"},"weight":{"type":"integer","format":"int64"},"size_id":{"type":"string"},"energy":{"type":"number","format":"double"},"proteins":{"type":"number","format":"double"},"fats":{"type":"number","format":"double"},"carbohydrates":{"type":"number","format":"double"},"alcohol_percentage":{"type":"number","format":"double"},"is_marked":{"type":"boolean"},"default":{"type":"boolean"},"is_visible":{"type":"boolean"},"image_links":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/MenuVariant"}},"group_modifiers":{"type":"array","items":{"$ref":"#/components/schemas/MenuGroupModifier"}},"single_modifiers":{"type":"array","items":{"$ref":"#/components/schemas/MenuModifier"}},"combo_groups":{"type":"array","items":{"$ref":"#/components/schemas/MenuComboGroup"}}},"required":["id","name"]},"MenuVariant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer","format":"int32"},"price":{"type":"number","format":"float"},"product_id":{"type":"string"},"size_id":{"type":"string"},"image_url":{"type":"string"},"weight":{"type":"number","format":"double"},"measure_unit":{"type":"string"},"default":{"type":"boolean"},"is_visible":{"type":"boolean"},"ikpu":{"type":"string"},"package_code":{"type":"string"},"group_modifiers":{"type":"array","items":{"$ref":"#/components/schemas/MenuGroupModifier"}},"single_modifiers":{"type":"array","items":{"$ref":"#/components/schemas/MenuModifier"}}}},"MenuGroupModifier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"num_min":{"type":"integer","format":"int32"},"num_max":{"type":"integer","format":"int32"},"ikpu":{"type":"string"},"package_code":{"type":"string"},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/MenuModifier"}}}},"MenuModifier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"float"},"product_id":{"type":"string"},"num_min":{"type":"integer","format":"int32"},"num_max":{"type":"integer","format":"int32"},"default_amount":{"type":"integer","format":"int32"},"image":{"type":"string"},"ikpu":{"type":"string"},"package_code":{"type":"string"}}},"MenuComboGroup":{"type":"object","properties":{"id":{"type":"string"},"variants":{"type":"array","items":{"type":"string"}},"order":{"type":"integer","format":"int32"},"active":{"type":"boolean"},"quantity":{"type":"integer","format":"int32"},"title":{"type":"string"},"default":{"type":"boolean"},"variants_obj":{"type":"array","items":{"$ref":"#/components/schemas/MenuComboVariantAuto"}},"variant_prices":{"type":"object","additionalProperties":{"type":"number","format":"float"}}}},"MenuComboVariantAuto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"float"},"size_id":{"type":"string"}}},"MessageResponse":{"type":"object","description":"Ответ с текстовым сообщением об успехе.","properties":{"message":{"type":"string"}},"required":["message"]},"SimpleError":{"type":"object","description":"Простая ошибка валидации от шлюза.","properties":{"error":{"type":"string"}},"required":["error"]},"ErrorWithDescription":{"type":"object","description":"Стандартный формат ошибки API.","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/1c/menu/import":{"post":{"tags":["Каталог"],"summary":"Импорт меню (категории, товары, комбо)","description":"Создаёт или обновляет сущности каталога для филиала, привязанного к ключу интеграции, и при наличии `menu_id`\nдобавляет новые товары в меню филиала.\n\n**Поведение:**\n- Определение филиала по `integration_key` в `Authorization`.\n- Пустые массивы `categories` / `products` / `combos` допустимы.\n","operationId":"importMenu1c","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuImportRequest"}}}},"responses":{"200":{"description":"Меню принято и обработано.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Невалидный JSON или тело не прочитано.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SimpleError"},{"$ref":"#/components/schemas/ErrorWithDescription"}]}}}},"404":{"description":"Неизвестный integration_key или филиал не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Ошибка обновления каталога или внутренняя ошибка.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## Обновление цен товаров

> Обновляет цены товаров по внешним id из 1С для шиппера, определённого по ключу интеграции.\
> \
> \*\*Сопоставление id:\*\* каждый \`id\_prices\[].id\` — \*\*внешний id 1C товара\*\*.\
> Id без сопоставления в обновление не попадают.<br>

```json
{"openapi":"3.0.3","info":{"title":"API интеграции Delever с 1C","version":"1.0.0"},"tags":[{"name":"Каталог","description":"Импорт меню, цены и остатки (стоп-лист / количества)."}],"servers":[{"url":"/","description":"Базовый URL шлюза интегратора (добавьте хост, например `https://api.example.com`)"}],"security":[{"oneCIntegrationKey":[]}],"components":{"securitySchemes":{"oneCIntegrationKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Сырой integration_key (не Bearer). Должен соответствовать записи интеграции филиала с типом `1c`.\n"}},"schemas":{"UpdateProductPricesRequest":{"type":"object","description":"Обновление цен. Из тела читаются только `id_prices` (и опционально `is_update_aggregators_price`);\n","properties":{"id_prices":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ExternalProductIdPrice"}},"is_update_aggregators_price":{"type":"boolean","description":"Если true — распространить изменение цен на подключённые агрегаторы.","default":false}},"required":["id_prices"]},"ExternalProductIdPrice":{"type":"object","properties":{"id":{"type":"string","description":"Внешний id товара из 1С."},"price":{"type":"number","format":"float"}},"required":["id","price"]},"MessageResponse":{"type":"object","description":"Ответ с текстовым сообщением об успехе.","properties":{"message":{"type":"string"}},"required":["message"]},"SimpleError":{"type":"object","description":"Простая ошибка валидации от шлюза.","properties":{"error":{"type":"string"}},"required":["error"]},"ErrorWithDescription":{"type":"object","description":"Стандартный формат ошибки API.","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/1c/product-prices":{"post":{"tags":["Каталог"],"summary":"Обновление цен товаров","description":"Обновляет цены товаров по внешним id из 1С для шиппера, определённого по ключу интеграции.\n\n**Сопоставление id:** каждый `id_prices[].id` — **внешний id 1C товара**.\nId без сопоставления в обновление не попадают.\n","operationId":"updateProductPrices1c","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductPricesRequest"}}}},"responses":{"200":{"description":"Цены обновлены.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Пустой `id_prices`, невалидный JSON или отклонённый запрос.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SimpleError"},{"$ref":"#/components/schemas/ErrorWithDescription"}]}}}},"404":{"description":"Неизвестный integration_key, филиал не найден или ошибка поиска сопоставления каталога.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Внутренняя ошибка или ошибка каталога.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## Обновление остатков товаров меню (стоп-лист)

> Устанавливает доступные количества товаров в меню филиала.\
> \
> \*\*Требования:\*\*\
> \- У филиала должен быть непустой \`menu\_id\`; иначе HTTP \*\*400\*\* с\
> &#x20; \`{"code":400,"description":"branch menu\_id is empty"}\`.\
> \
> \*\*Сопоставление id:\*\* \`products\[].product\_id\` — \*\*внешние id 1C товаров\*\*.<br>

```json
{"openapi":"3.0.3","info":{"title":"API интеграции Delever с 1C","version":"1.0.0"},"tags":[{"name":"Каталог","description":"Импорт меню, цены и остатки (стоп-лист / количества)."}],"servers":[{"url":"/","description":"Базовый URL шлюза интегратора (добавьте хост, например `https://api.example.com`)"}],"security":[{"oneCIntegrationKey":[]}],"components":{"securitySchemes":{"oneCIntegrationKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Сырой integration_key (не Bearer). Должен соответствовать записи интеграции филиала с типом `1c`.\n"}},"schemas":{"UpdateProductStockRequest":{"type":"object","description":"Обновление остатков в меню. В `product_id` — внешние id 1C.\n","properties":{"products":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProductQuantity"}}},"required":["products"]},"ProductQuantity":{"type":"object","properties":{"product_id":{"type":"string","description":"Внешний id товара из 1С (сопоставление на сервере)."},"quantity":{"type":"number","format":"float","description":"Доступное количество в меню филиала (остаток)."}},"required":["product_id","quantity"]},"MessageResponse":{"type":"object","description":"Ответ с текстовым сообщением об успехе.","properties":{"message":{"type":"string"}},"required":["message"]},"SimpleError":{"type":"object","description":"Простая ошибка валидации от шлюза.","properties":{"error":{"type":"string"}},"required":["error"]},"ErrorWithDescription":{"type":"object","description":"Стандартный формат ошибки API.","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/1c/product-stock":{"post":{"tags":["Каталог"],"summary":"Обновление остатков товаров меню (стоп-лист)","description":"Устанавливает доступные количества товаров в меню филиала.\n\n**Требования:**\n- У филиала должен быть непустой `menu_id`; иначе HTTP **400** с\n  `{\"code\":400,\"description\":\"branch menu_id is empty\"}`.\n\n**Сопоставление id:** `products[].product_id` — **внешние id 1C товаров**.\n","operationId":"updateProductStock1c","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductStockRequest"}}}},"responses":{"200":{"description":"Количества в меню филиала обновлены.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Пустой `products`, отсутствует `меню` или невалидный JSON.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SimpleError"},{"$ref":"#/components/schemas/ErrorWithDescription"}]}}}},"404":{"description":"Неизвестный integration_key или филиал не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Внутренняя ошибка или ошибка обновления остатков.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```
