# Для интеграторов

С помощью вышеуказанных методов можно получить информацию (филиалы, продукты, категории и т. д.) о бренде, зарегистрированном в Delever, и отправить заказ в Delever.

## Integrator user login

> Returns an access token.\
> \`aggregator\_id\` is required to resolve Source.name.en for integration logging.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"paths":{"/v1/custom-integration/security/oauth/token":{"post":{"tags":["CustomIntegration"],"summary":"Integrator user login","description":"Returns an access token.\n`aggregator_id` is required to resolve Source.name.en for integration logging.\n","parameters":[{"in":"query","name":"aggregator_id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string","description":"base64(username:password)"},"grant_type":{"type":"string"},"scope":{"type":"string"}},"required":["client_secret"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorLoginResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}},"components":{"schemas":{"IntegratorLoginResponse":{"type":"object","properties":{"accessToken":{"type":"string"}},"required":["accessToken"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}}
```

## GET /v1/custom-integration/restaurants

> Get all restaurants

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetAllRestaurants":{"type":"object","properties":{"places":{"type":"array","items":{"$ref":"#/components/schemas/GetRestaurantModel"}}},"required":["places"]},"GetRestaurantModel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"address":{"type":"string"}},"required":["id"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/restaurants":{"get":{"tags":["CustomIntegration"],"summary":"Get all restaurants","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllRestaurants"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## GET /v1/custom-integration/restaurants/availability

> Restaurant availability

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RequestRestaurantAvailability":{"type":"object","properties":{"places":{"type":"array","items":{"$ref":"#/components/schemas/Place"}}},"required":["places"]},"Place":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","enabled"]},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/restaurants/availability":{"get":{"tags":["CustomIntegration"],"summary":"Restaurant availability","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestRestaurantAvailability"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## GET /v1/custom-integration/order/{orderId}/status

> Get order status by ID

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetOrderByStatus":{"type":"object","properties":{"status":{"type":"string"},"comment":{"type":"string"},"updatedAt":{"type":"string"}},"required":["status"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/order/{orderId}/status":{"get":{"tags":["CustomIntegration"],"summary":"Get order status by ID","parameters":[{"in":"path","name":"orderId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderByStatus"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## PUT /v1/custom-integration/order/{orderId}/status

> Update order status

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateOrderStatusRequest":{"type":"object","properties":{"status":{"type":"string","description":"DELIVERED|CANCELLED|TAKEN_BY_COURIER (mapped internally)"},"comment":{"type":"string"}},"required":["status"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}},"paths":{"/v1/custom-integration/order/{orderId}/status":{"put":{"tags":["CustomIntegration"],"summary":"Update order status","parameters":[{"in":"path","name":"orderId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderStatusRequest"}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## GET /v1/custom-integration/order/{orderId}

> Get order by ID

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetOrderByIdResponse":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string"},"eatsId":{"type":"string"},"restaurantId":{"type":"string"},"deliveryInfo":{"$ref":"#/components/schemas/YandexOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/YandexOrderV2PaymentInfo"},"persons":{"type":"integer","format":"int32"},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}},"comment":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number","format":"float"},"price":{"type":"number","format":"double"}}}}},"required":["eatsId","restaurantId"]},"YandexOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string"},"phoneNumber":{"type":"string"},"courierArrivementDate":{"type":"string","format":"date-time"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"]},"DeliveryAddress":{"type":"object","properties":{"street":{"type":"string"},"house":{"type":"string"},"apartment":{"type":"string"},"entrance":{"type":"string"},"floor":{"type":"string"},"doorphone":{"type":"string"},"comment":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}}},"YandexOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"CARD or CASH"},"deliveryFee":{"type":"number","format":"float"}},"required":["itemsCost","paymentType"]},"YandexOrderV2Promo":{"type":"object","properties":{"type":{"type":"string"},"discount":{"type":"number","format":"double"},"partner_discount":{"type":"number","format":"double"},"yandex_discount":{"type":"number","format":"double"}},"required":["type"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/order/{orderId}":{"get":{"tags":["CustomIntegration"],"summary":"Get order by ID","parameters":[{"in":"path","name":"orderId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/vnd.eats.order.v2+json":{"schema":{"$ref":"#/components/schemas/GetOrderByIdResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## PUT /v1/custom-integration/order/{orderId}

> Update order

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomIntegrationOrderV2":{"allOf":[{"$ref":"#/components/schemas/YandexOrderV2"},{"type":"object","properties":{"preOrderTime":{"type":"string","description":"Pre-order time, format: YYYY-MM-DD HH:MM:SS"},"kitchenSentTime":{"type":"string","description":"Kitchen sent time, format: YYYY-MM-DD HH:MM:SS"}}}]},"YandexOrderV2":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Delivery type: aggregator|delivery|self-pickup|hall","enum":["aggregator","delivery","self-pickup","hall"]},"eatsId":{"type":"string"},"restaurantId":{"type":"string"},"deliveryInfo":{"$ref":"#/components/schemas/YandexOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/YandexOrderV2PaymentInfo"},"items":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Item"}},"persons":{"type":"integer","format":"int32"},"comment":{"type":"string"},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}}}},"YandexOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string"},"phoneNumber":{"type":"string"},"courierArrivementDate":{"type":"string","format":"date-time"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"]},"DeliveryAddress":{"type":"object","properties":{"street":{"type":"string"},"house":{"type":"string"},"apartment":{"type":"string"},"entrance":{"type":"string"},"floor":{"type":"string"},"doorphone":{"type":"string"},"comment":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}}},"YandexOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"CARD or CASH"},"deliveryFee":{"type":"number","format":"float"}},"required":["itemsCost","paymentType"]},"YandexOrderV2Item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number","format":"float"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Modification"}},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}}},"required":["id","quantity","price"]},"YandexOrderV2Modification":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"]},"YandexOrderV2Promo":{"type":"object","properties":{"type":{"type":"string"},"discount":{"type":"number","format":"double"},"partner_discount":{"type":"number","format":"double"},"yandex_discount":{"type":"number","format":"double"}},"required":["type"]},"ResponseResult":{"type":"object","properties":{"result":{"type":"string"}},"required":["result"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}},"paths":{"/v1/custom-integration/order/{orderId}":{"put":{"tags":["CustomIntegration"],"summary":"Update order","parameters":[{"in":"path","name":"orderId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/vnd.eats.order.v2+json":{"schema":{"$ref":"#/components/schemas/CustomIntegrationOrderV2"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## DELETE /v1/custom-integration/order/{orderId}

> Cancel order

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrderCancellation":{"type":"object","properties":{"comment":{"type":"string"}}},"ResponseOK":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}},"paths":{"/v1/custom-integration/order/{orderId}":{"delete":{"tags":["CustomIntegration"],"summary":"Cancel order","parameters":[{"in":"path","name":"orderId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancellation"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOK"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## POST /v1/custom-integration/order

> Create order

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomIntegrationOrderV2":{"allOf":[{"$ref":"#/components/schemas/YandexOrderV2"},{"type":"object","properties":{"preOrderTime":{"type":"string","description":"Pre-order time, format: YYYY-MM-DD HH:MM:SS"},"kitchenSentTime":{"type":"string","description":"Kitchen sent time, format: YYYY-MM-DD HH:MM:SS"}}}]},"YandexOrderV2":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Delivery type: aggregator|delivery|self-pickup|hall","enum":["aggregator","delivery","self-pickup","hall"]},"eatsId":{"type":"string"},"restaurantId":{"type":"string"},"deliveryInfo":{"$ref":"#/components/schemas/YandexOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/YandexOrderV2PaymentInfo"},"items":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Item"}},"persons":{"type":"integer","format":"int32"},"comment":{"type":"string"},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}}}},"YandexOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string"},"phoneNumber":{"type":"string"},"courierArrivementDate":{"type":"string","format":"date-time"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"]},"DeliveryAddress":{"type":"object","properties":{"street":{"type":"string"},"house":{"type":"string"},"apartment":{"type":"string"},"entrance":{"type":"string"},"floor":{"type":"string"},"doorphone":{"type":"string"},"comment":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}}},"YandexOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"CARD or CASH"},"deliveryFee":{"type":"number","format":"float"}},"required":["itemsCost","paymentType"]},"YandexOrderV2Item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number","format":"float"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Modification"}},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}}},"required":["id","quantity","price"]},"YandexOrderV2Modification":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"]},"YandexOrderV2Promo":{"type":"object","properties":{"type":{"type":"string"},"discount":{"type":"number","format":"double"},"partner_discount":{"type":"number","format":"double"},"yandex_discount":{"type":"number","format":"double"}},"required":["type"]},"CreateOrderResponse":{"type":"object","properties":{"result":{"type":"string"},"orderId":{"type":"string"}},"required":["result"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}},"paths":{"/v1/custom-integration/order":{"post":{"tags":["CustomIntegration"],"summary":"Create order","requestBody":{"required":true,"content":{"application/vnd.eats.order.v2+json":{"schema":{"$ref":"#/components/schemas/CustomIntegrationOrderV2"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## GET /v1/custom-integration/menu/{restaurantId}/composition

> Menu composition

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomIntegrationMenuCompositionV2":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"sortOrder":{"type":"integer","format":"int32"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}}},"schedules":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"categoryId":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"description":{"type":"string"},"price":{"type":"number","format":"double"},"vat":{"type":"number","format":"double","description":"НДС, включенный в стоимость, в процентах (если не указан — 0)"},"isCatchweight":{"type":"boolean","description":"Флаг того, что позиция весовая"},"measure":{"type":"integer","format":"int32"},"weightQuantum":{"type":"number","format":"float","description":"Минимальное количество продукта (квант) для весовых позиций"},"measureUnit":{"type":"string"},"nutrients":{"$ref":"#/components/schemas/MenuCompositionV2Nutrients"},"sortOrder":{"type":"integer","format":"int32"},"images":{"type":"array","items":{"$ref":"#/components/schemas/MenuCompositionV2Images1"}},"serviceCodesUz":{"$ref":"#/components/schemas/MenuCompositionV2ServiceCodesUz1"},"adult_info":{"$ref":"#/components/schemas/AdultInfo"},"needMarking":{"type":"boolean","description":"Требуется маркировка"},"modifierGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"minSelectedModifiers":{"type":"integer","format":"int32"},"maxSelectedModifiers":{"type":"integer","format":"int32"},"sortOrder":{"type":"integer","format":"int32"},"modifiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"price":{"type":"number","format":"double"},"vat":{"type":"integer","format":"int32","description":"НДС, включенный в стоимость, в процентах (если не указан — 0)"},"minAmount":{"type":"integer","format":"int32"},"maxAmount":{"type":"integer","format":"int32"},"serviceCodesUz":{"$ref":"#/components/schemas/MenuCompositionV2ServiceCodesUz"},"needMarking":{"type":"boolean","description":"Требуется маркировка"}},"required":["id","name","minAmount","maxAmount"]}}},"required":["id","name","minSelectedModifiers","maxSelectedModifiers"]}}},"required":["id","name","price","measure","measureUnit","sortOrder"]}},"lastChange":{"type":"string","format":"date-time"},"schedules":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"till":{"type":"string"},"weekdays":{"type":"array","items":{"type":"string"}}}}}}}},"CustomIntegrationLanguage":{"type":"object","properties":{"ru":{"type":"string"},"en":{"type":"string"},"uz":{"type":"string"}}},"MenuCompositionV2Nutrients":{"type":"object","properties":{"calories":{"type":"number","format":"double","description":"Калории"},"proteins":{"type":"number","format":"double","description":"Белки"},"fats":{"type":"number","format":"double","description":"Жиры"},"carbohydrates":{"type":"number","format":"double","description":"Углеводы"},"is_deactivated":{"type":"boolean","description":"Признак отключения невалидных данных КБЖУ"}}},"MenuCompositionV2Images1":{"type":"object","properties":{"hash":{"type":"string","description":"SHA1-хэш от содержимого файла изображения"},"url":{"type":"string","description":"Ссылка на изображение для скачивания"}},"required":["hash","url"]},"MenuCompositionV2ServiceCodesUz1":{"type":"object","description":"Специальные коды для Узбекистана. Обязательно для всех блюд в UZ.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код блюда"},"packageCodeUz":{"type":"string","description":"Код упаковки"}},"required":["mxikCodeUz"]},"AdultInfo":{"type":"object","properties":{"age_group":{"type":"integer","description":"Возрастная группа, например 18 или 21"},"alcohol_percentage":{"type":"string","description":"Процент алкоголя в напитке, если применимо"}}},"MenuCompositionV2ServiceCodesUz":{"type":"object","description":"Специальные коды для Узбекистана. Для опций не является обязательным.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код опции"},"packageCodeUz":{"type":"string","description":"Код упаковки"}}},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/menu/{restaurantId}/composition":{"get":{"tags":["CustomIntegration"],"summary":"Menu composition","parameters":[{"in":"path","name":"restaurantId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/vnd.eats.menu.composition.v2+json":{"schema":{"$ref":"#/components/schemas/CustomIntegrationMenuCompositionV2"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## GET /v1/custom-integration/menu/{restaurantId}/availability

> Menu availability

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MenuAvailabilityV2":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"stock":{"type":"integer","format":"int32"}},"required":["itemId"]}},"modifiers":{"type":"array","items":{"type":"object","properties":{"modifierId":{"type":"string"},"stock":{"type":"integer","format":"int32"}},"required":["modifierId"]}}},"required":["items","modifiers"]},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/menu/{restaurantId}/availability":{"get":{"tags":["CustomIntegration"],"summary":"Menu availability","parameters":[{"in":"path","name":"restaurantId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/vnd.eats.menu.availability.v2+json":{"schema":{"$ref":"#/components/schemas/MenuAvailabilityV2"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## GET /v1/custom-integration/menu/{restaurantId}/promos

> Menu promos

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"CustomIntegration","description":"Custom integration (Yandex-eats-like) endpoints."}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PromoItems":{"type":"object","properties":{"promoItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"promoId":{"type":"string"}},"required":["id","promoId"]}}},"required":["promoItems"]},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}},"paths":{"/v1/custom-integration/menu/{restaurantId}/promos":{"get":{"tags":["CustomIntegration"],"summary":"Menu promos","parameters":[{"in":"path","name":"restaurantId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoItems"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}}}}}}}
```

## The ErrorWithDescription object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"]}}}}
```

## The ErrorReason object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}}
```

## The UnauthorizedError object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}}
```

## The IntegratorLoginResponse object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"IntegratorLoginResponse":{"type":"object","properties":{"accessToken":{"type":"string"}},"required":["accessToken"]}}}}
```

## The ResponseOK object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"ResponseOK":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}
```

## The ResponseResult object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"ResponseResult":{"type":"object","properties":{"result":{"type":"string"}},"required":["result"]}}}}
```

## The EmptyResponse object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"EmptyResponse":{"type":"object","description":"Empty response body."}}}}
```

## The GetRestaurantModel object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"GetRestaurantModel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"address":{"type":"string"}},"required":["id"]}}}}
```

## The GetAllRestaurants object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"GetAllRestaurants":{"type":"object","properties":{"places":{"type":"array","items":{"$ref":"#/components/schemas/GetRestaurantModel"}}},"required":["places"]},"GetRestaurantModel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"address":{"type":"string"}},"required":["id"]}}}}
```

## The Place object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"Place":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","enabled"]}}}}
```

## The RequestRestaurantAvailability object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"RequestRestaurantAvailability":{"type":"object","properties":{"places":{"type":"array","items":{"$ref":"#/components/schemas/Place"}}},"required":["places"]},"Place":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","enabled"]}}}}
```

## The DeliveryAddress object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"DeliveryAddress":{"type":"object","properties":{"street":{"type":"string"},"house":{"type":"string"},"apartment":{"type":"string"},"entrance":{"type":"string"},"floor":{"type":"string"},"doorphone":{"type":"string"},"comment":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}}}}}}
```

## The GetOrderByStatus object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"GetOrderByStatus":{"type":"object","properties":{"status":{"type":"string"},"comment":{"type":"string"},"updatedAt":{"type":"string"}},"required":["status"]}}}}
```

## The CustomIntegrationOrderV2 object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"CustomIntegrationOrderV2":{"allOf":[{"$ref":"#/components/schemas/YandexOrderV2"},{"type":"object","properties":{"preOrderTime":{"type":"string","description":"Pre-order time, format: YYYY-MM-DD HH:MM:SS"},"kitchenSentTime":{"type":"string","description":"Kitchen sent time, format: YYYY-MM-DD HH:MM:SS"}}}]},"YandexOrderV2":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Delivery type: aggregator|delivery|self-pickup|hall","enum":["aggregator","delivery","self-pickup","hall"]},"eatsId":{"type":"string"},"restaurantId":{"type":"string"},"deliveryInfo":{"$ref":"#/components/schemas/YandexOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/YandexOrderV2PaymentInfo"},"items":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Item"}},"persons":{"type":"integer","format":"int32"},"comment":{"type":"string"},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}}}},"YandexOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string"},"phoneNumber":{"type":"string"},"courierArrivementDate":{"type":"string","format":"date-time"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"]},"DeliveryAddress":{"type":"object","properties":{"street":{"type":"string"},"house":{"type":"string"},"apartment":{"type":"string"},"entrance":{"type":"string"},"floor":{"type":"string"},"doorphone":{"type":"string"},"comment":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}}},"YandexOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"CARD or CASH"},"deliveryFee":{"type":"number","format":"float"}},"required":["itemsCost","paymentType"]},"YandexOrderV2Item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number","format":"float"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Modification"}},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}}},"required":["id","quantity","price"]},"YandexOrderV2Modification":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"]},"YandexOrderV2Promo":{"type":"object","properties":{"type":{"type":"string"},"discount":{"type":"number","format":"double"},"partner_discount":{"type":"number","format":"double"},"yandex_discount":{"type":"number","format":"double"}},"required":["type"]}}}}
```

## The GetOrderByIdResponse object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"GetOrderByIdResponse":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string"},"eatsId":{"type":"string"},"restaurantId":{"type":"string"},"deliveryInfo":{"$ref":"#/components/schemas/YandexOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/YandexOrderV2PaymentInfo"},"persons":{"type":"integer","format":"int32"},"promos":{"type":"array","items":{"$ref":"#/components/schemas/YandexOrderV2Promo"}},"comment":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number","format":"float"},"price":{"type":"number","format":"double"}}}}},"required":["eatsId","restaurantId"]},"YandexOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string"},"phoneNumber":{"type":"string"},"courierArrivementDate":{"type":"string","format":"date-time"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"]},"DeliveryAddress":{"type":"object","properties":{"street":{"type":"string"},"house":{"type":"string"},"apartment":{"type":"string"},"entrance":{"type":"string"},"floor":{"type":"string"},"doorphone":{"type":"string"},"comment":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}}},"YandexOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"CARD or CASH"},"deliveryFee":{"type":"number","format":"float"}},"required":["itemsCost","paymentType"]},"YandexOrderV2Promo":{"type":"object","properties":{"type":{"type":"string"},"discount":{"type":"number","format":"double"},"partner_discount":{"type":"number","format":"double"},"yandex_discount":{"type":"number","format":"double"}},"required":["type"]}}}}
```

## The CreateOrderResponse object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"CreateOrderResponse":{"type":"object","properties":{"result":{"type":"string"},"orderId":{"type":"string"}},"required":["result"]}}}}
```

## The OrderCancellation object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"OrderCancellation":{"type":"object","properties":{"comment":{"type":"string"}}}}}}
```

## The UpdateOrderStatusRequest object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"UpdateOrderStatusRequest":{"type":"object","properties":{"status":{"type":"string","description":"DELIVERED|CANCELLED|TAKEN_BY_COURIER (mapped internally)"},"comment":{"type":"string"}},"required":["status"]}}}}
```

## The MenuAvailabilityV2 object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"MenuAvailabilityV2":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"stock":{"type":"integer","format":"int32"}},"required":["itemId"]}},"modifiers":{"type":"array","items":{"type":"object","properties":{"modifierId":{"type":"string"},"stock":{"type":"integer","format":"int32"}},"required":["modifierId"]}}},"required":["items","modifiers"]}}}}
```

## The PromoItems object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"PromoItems":{"type":"object","properties":{"promoItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"promoId":{"type":"string"}},"required":["id","promoId"]}}},"required":["promoItems"]}}}}
```

## The CustomIntegrationLanguage object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"CustomIntegrationLanguage":{"type":"object","properties":{"ru":{"type":"string"},"en":{"type":"string"},"uz":{"type":"string"}}}}}}
```

## The CustomIntegrationMenuCompositionV2 object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"CustomIntegrationMenuCompositionV2":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"sortOrder":{"type":"integer","format":"int32"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}}},"schedules":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"categoryId":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"description":{"type":"string"},"price":{"type":"number","format":"double"},"vat":{"type":"number","format":"double","description":"НДС, включенный в стоимость, в процентах (если не указан — 0)"},"isCatchweight":{"type":"boolean","description":"Флаг того, что позиция весовая"},"measure":{"type":"integer","format":"int32"},"weightQuantum":{"type":"number","format":"float","description":"Минимальное количество продукта (квант) для весовых позиций"},"measureUnit":{"type":"string"},"nutrients":{"$ref":"#/components/schemas/MenuCompositionV2Nutrients"},"sortOrder":{"type":"integer","format":"int32"},"images":{"type":"array","items":{"$ref":"#/components/schemas/MenuCompositionV2Images1"}},"serviceCodesUz":{"$ref":"#/components/schemas/MenuCompositionV2ServiceCodesUz1"},"adult_info":{"$ref":"#/components/schemas/AdultInfo"},"needMarking":{"type":"boolean","description":"Требуется маркировка"},"modifierGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"minSelectedModifiers":{"type":"integer","format":"int32"},"maxSelectedModifiers":{"type":"integer","format":"int32"},"sortOrder":{"type":"integer","format":"int32"},"modifiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"price":{"type":"number","format":"double"},"vat":{"type":"integer","format":"int32","description":"НДС, включенный в стоимость, в процентах (если не указан — 0)"},"minAmount":{"type":"integer","format":"int32"},"maxAmount":{"type":"integer","format":"int32"},"serviceCodesUz":{"$ref":"#/components/schemas/MenuCompositionV2ServiceCodesUz"},"needMarking":{"type":"boolean","description":"Требуется маркировка"}},"required":["id","name","minAmount","maxAmount"]}}},"required":["id","name","minSelectedModifiers","maxSelectedModifiers"]}}},"required":["id","name","price","measure","measureUnit","sortOrder"]}},"lastChange":{"type":"string","format":"date-time"},"schedules":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"till":{"type":"string"},"weekdays":{"type":"array","items":{"type":"string"}}}}}}}},"CustomIntegrationLanguage":{"type":"object","properties":{"ru":{"type":"string"},"en":{"type":"string"},"uz":{"type":"string"}}},"MenuCompositionV2Nutrients":{"type":"object","properties":{"calories":{"type":"number","format":"double","description":"Калории"},"proteins":{"type":"number","format":"double","description":"Белки"},"fats":{"type":"number","format":"double","description":"Жиры"},"carbohydrates":{"type":"number","format":"double","description":"Углеводы"},"is_deactivated":{"type":"boolean","description":"Признак отключения невалидных данных КБЖУ"}}},"MenuCompositionV2Images1":{"type":"object","properties":{"hash":{"type":"string","description":"SHA1-хэш от содержимого файла изображения"},"url":{"type":"string","description":"Ссылка на изображение для скачивания"}},"required":["hash","url"]},"MenuCompositionV2ServiceCodesUz1":{"type":"object","description":"Специальные коды для Узбекистана. Обязательно для всех блюд в UZ.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код блюда"},"packageCodeUz":{"type":"string","description":"Код упаковки"}},"required":["mxikCodeUz"]},"AdultInfo":{"type":"object","properties":{"age_group":{"type":"integer","description":"Возрастная группа, например 18 или 21"},"alcohol_percentage":{"type":"string","description":"Процент алкоголя в напитке, если применимо"}}},"MenuCompositionV2ServiceCodesUz":{"type":"object","description":"Специальные коды для Узбекистана. Для опций не является обязательным.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код опции"},"packageCodeUz":{"type":"string","description":"Код упаковки"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://delever.gitbook.io/delever/for-developers/dlya-integratorov.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
