> 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/dlya-integratorov.md).

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

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

## Integrator user login

> Returns an access token.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Integrator user login"}],"servers":[{"url":"/"}],"paths":{"/v1/custom-integration/security/oauth/token":{"post":{"tags":["Integrator user login"],"summary":"Integrator user login","description":"Returns an access token.\n","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":{"access_token":{"type":"string"}},"required":["access_token"],"title":"IntegratorLoginResponse"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"}}}}
```

## Get all restaurants

> Возвращает список всех ресторанов.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Get all restaurants"}],"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"],"title":"GetAllRestaurants"},"GetRestaurantModel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"address":{"type":"string"},"location":{"$ref":"#/components/schemas/Location"}},"required":["id"],"title":"GetRestaurantModel"},"Location":{"type":"object","properties":{"long":{"type":"number","format":"double"},"lat":{"type":"number","format":"double"}},"title":"Location"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"}}},"paths":{"/v1/custom-integration/restaurants":{"get":{"tags":["Get all restaurants"],"summary":"Get all restaurants","description":"Возвращает список всех ресторанов.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllRestaurants"}}}},"401":{"description":"Unauthorized (invalid/missing token, or aggregator_id missing from JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"403":{"description":"Forbidden (token has no permission)","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"}}}}}}}}}
```

## Restaurant availability

> Возвращает статус доступности всех ресторанов.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Restaurant availability"}],"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"],"title":"RequestRestaurantAvailability"},"Place":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","enabled"],"title":"Place"},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"UnauthorizedError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"}}},"paths":{"/v1/custom-integration/restaurants/availability":{"get":{"tags":["Restaurant availability"],"summary":"Restaurant availability","description":"Возвращает статус доступности всех ресторанов.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestRestaurantAvailability"}}}},"401":{"description":"Unauthorized (handler returns UnauthorizedError; missing aggregator_id returns ErrorReason)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/ErrorReason"}]}}}},"403":{"description":"Forbidden (token has no permission)","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 order status by ID

> Возвращает статус заказа по ID.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Get order status by ID"}],"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"],"title":"GetOrderByStatus"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"}}},"paths":{"/v1/custom-integration/order/{orderId}/status":{"get":{"tags":["Get order status by ID"],"summary":"Get order status by ID","description":"Возвращает статус заказа по ID.\n","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 (invalid/missing token, or aggregator_id missing from JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"403":{"description":"Forbidden (token has no permission)","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"}}}}}}}}}
```

## Update order status

> Обновляет статус заказа.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Update order status"}],"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"],"title":"UpdateOrderStatusRequest"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"UnauthorizedError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"CustomIntegrationError":{"type":"object","properties":{"code":{"type":"integer","format":"int64"},"description":{"type":"string"}},"required":["code","description"],"title":"CustomIntegrationError"}}},"paths":{"/v1/custom-integration/order/{orderId}/status":{"put":{"tags":["Update order status"],"summary":"Update order status","description":"Обновляет статус заказа.\n","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 (handler returns UnauthorizedError; missing aggregator_id returns ErrorReason)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/ErrorReason"}]}}}},"403":{"description":"Forbidden (token has no permission)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIntegrationError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIntegrationError"}}}}}}}}}
```

## Get order by ID

> Возвращает заказ по ID.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Get order by ID"}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GetOrderByIdResponse":{"type":"object","description":"Order payload as returned by GET /order/{orderId}. Several fields may be empty or defaulted by the handler (platform, discriminator, promos).","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Тип доставки"},"eatsId":{"type":"string","description":"Сквозной идентификатор заказа"},"restaurantId":{"type":"string","description":"Внутренний идентификатор заведения в системе"},"deliveryInfo":{"$ref":"#/components/schemas/GetOrderDeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/GetOrderPaymentInfo"},"persons":{"type":"integer","format":"int32","description":"Количество персон, на которых делается заказ."},"promos":{"type":"array","description":"Список акций, действующих на весь заказ","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comment":{"type":"string","description":"Дополнительная информация о заказе"},"items":{"type":"array","items":{"$ref":"#/components/schemas/GetOrderItem"}}},"required":["eatsId","restaurantId"],"title":"GetOrderByIdResponse"},"GetOrderDeliveryInfo":{"type":"object","description":"Sparse delivery info returned by GET order (handler runtime).","properties":{"clientName":{"type":"string","description":"Имя клиента"},"phoneNumber":{"type":"string","description":"Номер телефона для связи с клиентом в международном формате. Состоит из частей \"+<код страны><номер>\".\""},"courierArrivementDate":{"type":"string","description":"Дата, когда придет курьер в ресторан, в формате RFC3339 с дробной частью секунд (Y-m-d\\TH:i:s.uP)"}},"title":"GetOrderDeliveryInfo"},"GetOrderPaymentInfo":{"type":"object","description":"Sparse payment info returned by GET order (handler runtime).","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"Информация о типе оплаты. CARD — уже оплаченный заказ, CASH — неоплаченный заказ. Handler currently hardcodes CARD."}},"title":"GetOrderPaymentInfo"},"CustomIntegrationOrderV2Promo":{"type":"object","properties":{"type":{"type":"string","description":"Тип акции. Может быть подарок \"GIFT\", процентная скидка \"PERCENTAGE\", фиксированная скидка \"FIXED\""},"discount":{"type":"number","format":"double","description":"Сумма скидки в валюте"},"partner_discount":{"type":"number","format":"double"}},"required":["type"],"title":"CustomIntegrationOrderV2Promo"},"GetOrderItem":{"type":"object","description":"Sparse item fields populated by GET order.","properties":{"id":{"type":"string","description":"ID позиции меню в системе"},"name":{"type":"string","description":"Наименование позиции меню"},"quantity":{"type":"number","format":"float","description":"Количество позиции в заказе"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Modification"}},"promos":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comboInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2ComboInfo"}},"title":"GetOrderItem"},"CustomIntegrationOrderV2Modification":{"type":"object","properties":{"id":{"type":"string","description":"ID модификатора в системе"},"name":{"type":"string","description":"Наименование модификатора"},"quantity":{"type":"integer","format":"int32","description":"Количество в заказе"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Modification"},"CustomIntegrationOrderV2ComboInfo":{"type":"object","properties":{"id":{"type":"string","description":"Идентификатор комбо"},"componentId":{"type":"string","description":"Идентификатор компонента комбо"}},"title":"CustomIntegrationOrderV2ComboInfo"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"}}},"paths":{"/v1/custom-integration/order/{orderId}":{"get":{"tags":["Get order by ID"],"summary":"Get order by ID","description":"Возвращает заказ по ID.\n","parameters":[{"in":"path","name":"orderId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderByIdResponse"}}}},"401":{"description":"Unauthorized (invalid/missing token, or aggregator_id missing from JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"403":{"description":"Forbidden (token has no permission)","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"}}}}}}}}}
```

## Update order

> Обновляет заказ.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Update order"}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomIntegrationOrderV2":{"allOf":[{"$ref":"#/components/schemas/CustomIntegrationOrderV2Base"},{"type":"object","properties":{"preOrderTime":{"type":"string","description":"Время предварительного заказа, формат YYYY-MM-DD HH:MM:SS"},"kitchenSentTime":{"type":"string","description":"Время отправки заказа на кухню, формат YYYY-MM-DD HH:MM:SS"}}}],"title":"CustomIntegrationOrderV2"},"CustomIntegrationOrderV2Base":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Delivery type accepted by the handler: aggregator|delivery|takeaway. delivery => Это когда от вас к рестотану приходит заказ и ресторам сам доставляет заказ. aggregator => Это когда от вас к рестотану приходит заказ и вы сами доставляете заказ. takeaway  => это когда клиент сам забирает заказ в ресторане.","enum":["aggregator","delivery","takeaway"]},"eatsId":{"type":"string","description":"Сквозной идентификатор заказа"},"restaurantId":{"type":"string","description":"Внутренний идентификатор заведения в системе"},"deliveryInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2PaymentInfo"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Item"}},"persons":{"type":"integer","format":"int32","description":"Количество персон, на которых делается заказ. Может влиять на количество комплектов приборов"},"comment":{"type":"string","description":"Дополнительная информация о заказе"},"promos":{"type":"array","description":"Список акций, действующих на весь заказ. Если у заказа объект \"promos\" не пустой, значит на него действует акция в системе партнера. Если пустой — на заказ не действуют никакие акции","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}}},"title":"CustomIntegrationOrderV2Base"},"CustomIntegrationOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string","description":"Имя клиента"},"phoneNumber":{"type":"string","description":"Номер телефона для связи с клиентом в международном формате. Состоит из частей \"+<код страны><номер>\".\""},"courierArrivementDate":{"type":"string","format":"date-time","description":"Дата, когда придет курьер в ресторан, в формате RFC3339 с дробной частью секунд (Y-m-d\\TH:i:s.uP)"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"],"title":"CustomIntegrationOrderV2DeliveryInfo"},"DeliveryAddress":{"type":"object","properties":{"full":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}},"title":"DeliveryAddress"},"CustomIntegrationOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double","description":"Полная стоимость блюд в заказе"},"paymentType":{"type":"string","description":"Информация о типе оплаты. CARD — уже оплаченный заказ, CASH — неоплаченный заказ"},"deliveryFee":{"type":"number","format":"float","description":"Стоимость доставки"}},"required":["itemsCost","paymentType"],"title":"CustomIntegrationOrderV2PaymentInfo"},"CustomIntegrationOrderV2Item":{"type":"object","properties":{"id":{"type":"string","description":"ID позиции меню в системе"},"name":{"type":"string","description":"Наименование позиции меню"},"quantity":{"type":"number","format":"float","description":"Количество позиции в заказе"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","description":"Список выбранных модификаций. Может быть пустым, передаётся явно, для каждой отдельной позиции в заказе. При заказе двух позиций одного и того же блюда с разным набором модификаций — передаются разные позиции, с разными списками \"modifications\"","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Modification"}},"promos":{"type":"array","description":"Список акций, действующих на текущее блюдо. Если у блюда объект \"promos\" не пустой, значит на него действует акция в системе партнера. Если пустой — на блюдо не действуют никакие акции","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comboInfo":{"description":"Информация о комбо, к которому относится данная позиция. Заполнено только для позиций, которые были выбраны в составе комбо","allOf":[{"$ref":"#/components/schemas/CustomIntegrationOrderV2ComboInfo"}]}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Item"},"CustomIntegrationOrderV2Modification":{"type":"object","properties":{"id":{"type":"string","description":"ID модификатора в системе"},"name":{"type":"string","description":"Наименование модификатора"},"quantity":{"type":"integer","format":"int32","description":"Количество в заказе"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Modification"},"CustomIntegrationOrderV2Promo":{"type":"object","properties":{"type":{"type":"string","description":"Тип акции. Может быть подарок \"GIFT\", процентная скидка \"PERCENTAGE\", фиксированная скидка \"FIXED\""},"discount":{"type":"number","format":"double","description":"Сумма скидки в валюте"},"partner_discount":{"type":"number","format":"double"}},"required":["type"],"title":"CustomIntegrationOrderV2Promo"},"CustomIntegrationOrderV2ComboInfo":{"type":"object","properties":{"id":{"type":"string","description":"Идентификатор комбо"},"componentId":{"type":"string","description":"Идентификатор компонента комбо"}},"title":"CustomIntegrationOrderV2ComboInfo"},"ResponseResult":{"type":"object","properties":{"result":{"type":"string"}},"required":["result"],"title":"ResponseResult"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"},"ResponseError":{"type":"object","description":"Generic error envelope used by some create/update order bind failures.","properties":{"error":{}},"title":"ResponseError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"}}},"paths":{"/v1/custom-integration/order/{orderId}":{"put":{"tags":["Update order"],"summary":"Update order","description":"Обновляет заказ.\n","parameters":[{"in":"path","name":"orderId","required":true,"description":"Delever order UUID","schema":{"type":"string","format":"uuid"}}],"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 (ErrorWithDescription for validation; ResponseError for bind / missing deliveryInfo|paymentInfo)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorWithDescription"},{"$ref":"#/components/schemas/ResponseError"}]}}}},"401":{"description":"Unauthorized (invalid/missing token, or aggregator_id missing from JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"403":{"description":"Forbidden (token has no permission)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error (ErrorWithDescription or ResponseError depending on failure path)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorWithDescription"},{"$ref":"#/components/schemas/ResponseError"}]}}}}}}}}}
```

## Cancel order

> Отменяет заказ.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Cancel order"}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrderCancellation":{"type":"object","properties":{"eatsId":{"type":"string","description":"Present in the request model; unused by the cancel handler."},"comment":{"type":"string"}},"title":"OrderCancellation"},"ResponseOK":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"title":"ResponseOK"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"}}},"paths":{"/v1/custom-integration/order/{orderId}":{"delete":{"tags":["Cancel order"],"summary":"Cancel order","description":"Отменяет заказ.\n","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 (invalid/missing token, or aggregator_id missing from JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"403":{"description":"Forbidden (token has no permission)","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"}}}}}}}}}
```

## Create order

> Создает заказ.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Create order"}],"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomIntegrationOrderV2":{"allOf":[{"$ref":"#/components/schemas/CustomIntegrationOrderV2Base"},{"type":"object","properties":{"preOrderTime":{"type":"string","description":"Время предварительного заказа, формат YYYY-MM-DD HH:MM:SS"},"kitchenSentTime":{"type":"string","description":"Время отправки заказа на кухню, формат YYYY-MM-DD HH:MM:SS"}}}],"title":"CustomIntegrationOrderV2"},"CustomIntegrationOrderV2Base":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Delivery type accepted by the handler: aggregator|delivery|takeaway. delivery => Это когда от вас к рестотану приходит заказ и ресторам сам доставляет заказ. aggregator => Это когда от вас к рестотану приходит заказ и вы сами доставляете заказ. takeaway  => это когда клиент сам забирает заказ в ресторане.","enum":["aggregator","delivery","takeaway"]},"eatsId":{"type":"string","description":"Сквозной идентификатор заказа"},"restaurantId":{"type":"string","description":"Внутренний идентификатор заведения в системе"},"deliveryInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2PaymentInfo"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Item"}},"persons":{"type":"integer","format":"int32","description":"Количество персон, на которых делается заказ. Может влиять на количество комплектов приборов"},"comment":{"type":"string","description":"Дополнительная информация о заказе"},"promos":{"type":"array","description":"Список акций, действующих на весь заказ. Если у заказа объект \"promos\" не пустой, значит на него действует акция в системе партнера. Если пустой — на заказ не действуют никакие акции","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}}},"title":"CustomIntegrationOrderV2Base"},"CustomIntegrationOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string","description":"Имя клиента"},"phoneNumber":{"type":"string","description":"Номер телефона для связи с клиентом в международном формате. Состоит из частей \"+<код страны><номер>\".\""},"courierArrivementDate":{"type":"string","format":"date-time","description":"Дата, когда придет курьер в ресторан, в формате RFC3339 с дробной частью секунд (Y-m-d\\TH:i:s.uP)"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"],"title":"CustomIntegrationOrderV2DeliveryInfo"},"DeliveryAddress":{"type":"object","properties":{"full":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}},"title":"DeliveryAddress"},"CustomIntegrationOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double","description":"Полная стоимость блюд в заказе"},"paymentType":{"type":"string","description":"Информация о типе оплаты. CARD — уже оплаченный заказ, CASH — неоплаченный заказ"},"deliveryFee":{"type":"number","format":"float","description":"Стоимость доставки"}},"required":["itemsCost","paymentType"],"title":"CustomIntegrationOrderV2PaymentInfo"},"CustomIntegrationOrderV2Item":{"type":"object","properties":{"id":{"type":"string","description":"ID позиции меню в системе"},"name":{"type":"string","description":"Наименование позиции меню"},"quantity":{"type":"number","format":"float","description":"Количество позиции в заказе"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","description":"Список выбранных модификаций. Может быть пустым, передаётся явно, для каждой отдельной позиции в заказе. При заказе двух позиций одного и того же блюда с разным набором модификаций — передаются разные позиции, с разными списками \"modifications\"","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Modification"}},"promos":{"type":"array","description":"Список акций, действующих на текущее блюдо. Если у блюда объект \"promos\" не пустой, значит на него действует акция в системе партнера. Если пустой — на блюдо не действуют никакие акции","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comboInfo":{"description":"Информация о комбо, к которому относится данная позиция. Заполнено только для позиций, которые были выбраны в составе комбо","allOf":[{"$ref":"#/components/schemas/CustomIntegrationOrderV2ComboInfo"}]}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Item"},"CustomIntegrationOrderV2Modification":{"type":"object","properties":{"id":{"type":"string","description":"ID модификатора в системе"},"name":{"type":"string","description":"Наименование модификатора"},"quantity":{"type":"integer","format":"int32","description":"Количество в заказе"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Modification"},"CustomIntegrationOrderV2Promo":{"type":"object","properties":{"type":{"type":"string","description":"Тип акции. Может быть подарок \"GIFT\", процентная скидка \"PERCENTAGE\", фиксированная скидка \"FIXED\""},"discount":{"type":"number","format":"double","description":"Сумма скидки в валюте"},"partner_discount":{"type":"number","format":"double"}},"required":["type"],"title":"CustomIntegrationOrderV2Promo"},"CustomIntegrationOrderV2ComboInfo":{"type":"object","properties":{"id":{"type":"string","description":"Идентификатор комбо"},"componentId":{"type":"string","description":"Идентификатор компонента комбо"}},"title":"CustomIntegrationOrderV2ComboInfo"},"CreateOrderResponse":{"type":"object","properties":{"result":{"type":"string"},"orderId":{"type":"string"}},"required":["result"],"title":"CreateOrderResponse"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"},"ResponseError":{"type":"object","description":"Generic error envelope used by some create/update order bind failures.","properties":{"error":{}},"title":"ResponseError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"}}},"paths":{"/v1/custom-integration/order":{"post":{"tags":["Create order"],"summary":"Create order","description":"Создает заказ.\n","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 (ErrorWithDescription for business validation; ResponseError for JSON bind failures)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorWithDescription"},{"$ref":"#/components/schemas/ResponseError"}]}}}},"401":{"description":"Unauthorized (invalid/missing token, or aggregator_id missing from JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"403":{"description":"Forbidden (token has no permission)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error (ErrorWithDescription or ResponseError depending on failure path)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorWithDescription"},{"$ref":"#/components/schemas/ResponseError"}]}}}}}}}}}
```

## Menu composition

> Возвращает меню ресторана.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Menu composition"}],"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"},"descriptionV2":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"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"}}}}}}},"title":"CustomIntegrationMenuCompositionV2"},"CustomIntegrationLanguage":{"type":"object","properties":{"ru":{"type":"string"},"en":{"type":"string"},"uz":{"type":"string"}},"title":"CustomIntegrationLanguage"},"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":"Признак отключения невалидных данных КБЖУ"}},"title":"MenuCompositionV2Nutrients"},"MenuCompositionV2Images1":{"type":"object","properties":{"hash":{"type":"string","description":"SHA1-хэш от содержимого файла изображения"},"url":{"type":"string","description":"Ссылка на изображение для скачивания"}},"required":["hash","url"],"title":"MenuCompositionV2Images1"},"MenuCompositionV2ServiceCodesUz1":{"type":"object","description":"Специальные коды для Узбекистана. Обязательно для всех блюд в UZ.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код блюда"},"packageCodeUz":{"type":"string","description":"Код упаковки"}},"required":["mxikCodeUz"],"title":"MenuCompositionV2ServiceCodesUz1"},"AdultInfo":{"type":"object","properties":{"age_group":{"type":"integer","description":"Возрастная группа, например 18 или 21"},"alcohol_percentage":{"type":"string","description":"Процент алкоголя в напитке, если применимо"}},"title":"AdultInfo"},"MenuCompositionV2ServiceCodesUz":{"type":"object","description":"Специальные коды для Узбекистана. Для опций не является обязательным.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код опции"},"packageCodeUz":{"type":"string","description":"Код упаковки"}},"title":"MenuCompositionV2ServiceCodesUz"},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"UnauthorizedError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"CustomIntegrationError":{"type":"object","properties":{"code":{"type":"integer","format":"int64"},"description":{"type":"string"}},"required":["code","description"],"title":"CustomIntegrationError"}}},"paths":{"/v1/custom-integration/menu/{restaurantId}/composition":{"get":{"tags":["Menu composition"],"summary":"Menu composition","description":"Возвращает меню ресторана.\n","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 (handler returns UnauthorizedError; missing aggregator_id returns ErrorReason)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/ErrorReason"}]}}}},"403":{"description":"Forbidden (token has no permission)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found (array of CustomIntegrationError)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationError"}}}}},"500":{"description":"Internal error (array of CustomIntegrationError)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationError"}}}}}}}}}}
```

## Menu availability

> Возвращает статус доступности меню ресторана.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Menu availability"}],"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"],"title":"MenuAvailabilityV2"},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"UnauthorizedError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"CustomIntegrationError":{"type":"object","properties":{"code":{"type":"integer","format":"int64"},"description":{"type":"string"}},"required":["code","description"],"title":"CustomIntegrationError"}}},"paths":{"/v1/custom-integration/menu/{restaurantId}/availability":{"get":{"tags":["Menu availability"],"summary":"Menu availability","description":"Возвращает статус доступности меню ресторана.\n","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 (handler returns UnauthorizedError; missing aggregator_id returns ErrorReason)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/ErrorReason"}]}}}},"403":{"description":"Forbidden (token has no permission)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found (array of CustomIntegrationError)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationError"}}}}},"500":{"description":"Internal error (array of CustomIntegrationError)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationError"}}}}}}}}}}
```

## Menu promos

> Возвращает акционные позиции меню ресторана.<br>

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"tags":[{"name":"Menu promos"}],"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"],"title":"PromoItems"},"UnauthorizedError":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"UnauthorizedError"},"ErrorReason":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"ErrorReason"},"ErrorWithDescription":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"description":{"type":"string"}},"required":["code","description"],"title":"ErrorWithDescription"},"CustomIntegrationError":{"type":"object","properties":{"code":{"type":"integer","format":"int64"},"description":{"type":"string"}},"required":["code","description"],"title":"CustomIntegrationError"}}},"paths":{"/v1/custom-integration/menu/{restaurantId}/promos":{"get":{"tags":["Menu promos"],"summary":"Menu promos","description":"Возвращает акционные позиции меню ресторана.\n","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 (handler returns UnauthorizedError; missing aggregator_id returns ErrorReason)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/ErrorReason"}]}}}},"403":{"description":"Forbidden (token has no permission)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorReason"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWithDescription"}}}},"500":{"description":"Internal error (single CustomIntegrationError object)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIntegrationError"}}}}}}}}}
```

## 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"],"title":"ErrorWithDescription"}}}}
```

## 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"],"title":"ErrorReason"}}}}
```

## 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"],"title":"UnauthorizedError"}}}}
```

## The IntegratorLoginResponse object

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

## 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"],"title":"ResponseOK"}}}}
```

## 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"],"title":"ResponseResult"}}}}
```

## 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.","title":"EmptyResponse"}}}}
```

## 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"},"location":{"$ref":"#/components/schemas/Location"}},"required":["id"],"title":"GetRestaurantModel"},"Location":{"type":"object","properties":{"long":{"type":"number","format":"double"},"lat":{"type":"number","format":"double"}},"title":"Location"}}}}
```

## 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"],"title":"GetAllRestaurants"},"GetRestaurantModel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"address":{"type":"string"},"location":{"$ref":"#/components/schemas/Location"}},"required":["id"],"title":"GetRestaurantModel"},"Location":{"type":"object","properties":{"long":{"type":"number","format":"double"},"lat":{"type":"number","format":"double"}},"title":"Location"}}}}
```

## 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"],"title":"Place"}}}}
```

## 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"],"title":"RequestRestaurantAvailability"},"Place":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","enabled"],"title":"Place"}}}}
```

## The DeliveryAddress object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"DeliveryAddress":{"type":"object","properties":{"full":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}},"title":"DeliveryAddress"}}}}
```

## 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"],"title":"GetOrderByStatus"}}}}
```

## 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/CustomIntegrationOrderV2Base"},{"type":"object","properties":{"preOrderTime":{"type":"string","description":"Время предварительного заказа, формат YYYY-MM-DD HH:MM:SS"},"kitchenSentTime":{"type":"string","description":"Время отправки заказа на кухню, формат YYYY-MM-DD HH:MM:SS"}}}],"title":"CustomIntegrationOrderV2"},"CustomIntegrationOrderV2Base":{"type":"object","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Delivery type accepted by the handler: aggregator|delivery|takeaway. delivery => Это когда от вас к рестотану приходит заказ и ресторам сам доставляет заказ. aggregator => Это когда от вас к рестотану приходит заказ и вы сами доставляете заказ. takeaway  => это когда клиент сам забирает заказ в ресторане.","enum":["aggregator","delivery","takeaway"]},"eatsId":{"type":"string","description":"Сквозной идентификатор заказа"},"restaurantId":{"type":"string","description":"Внутренний идентификатор заведения в системе"},"deliveryInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2DeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2PaymentInfo"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Item"}},"persons":{"type":"integer","format":"int32","description":"Количество персон, на которых делается заказ. Может влиять на количество комплектов приборов"},"comment":{"type":"string","description":"Дополнительная информация о заказе"},"promos":{"type":"array","description":"Список акций, действующих на весь заказ. Если у заказа объект \"promos\" не пустой, значит на него действует акция в системе партнера. Если пустой — на заказ не действуют никакие акции","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}}},"title":"CustomIntegrationOrderV2Base"},"CustomIntegrationOrderV2DeliveryInfo":{"type":"object","properties":{"clientName":{"type":"string","description":"Имя клиента"},"phoneNumber":{"type":"string","description":"Номер телефона для связи с клиентом в международном формате. Состоит из частей \"+<код страны><номер>\".\""},"courierArrivementDate":{"type":"string","format":"date-time","description":"Дата, когда придет курьер в ресторан, в формате RFC3339 с дробной частью секунд (Y-m-d\\TH:i:s.uP)"},"deliveryAddress":{"$ref":"#/components/schemas/DeliveryAddress"}},"required":["phoneNumber","deliveryAddress"],"title":"CustomIntegrationOrderV2DeliveryInfo"},"DeliveryAddress":{"type":"object","properties":{"full":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"}},"title":"DeliveryAddress"},"CustomIntegrationOrderV2PaymentInfo":{"type":"object","properties":{"itemsCost":{"type":"number","format":"double","description":"Полная стоимость блюд в заказе"},"paymentType":{"type":"string","description":"Информация о типе оплаты. CARD — уже оплаченный заказ, CASH — неоплаченный заказ"},"deliveryFee":{"type":"number","format":"float","description":"Стоимость доставки"}},"required":["itemsCost","paymentType"],"title":"CustomIntegrationOrderV2PaymentInfo"},"CustomIntegrationOrderV2Item":{"type":"object","properties":{"id":{"type":"string","description":"ID позиции меню в системе"},"name":{"type":"string","description":"Наименование позиции меню"},"quantity":{"type":"number","format":"float","description":"Количество позиции в заказе"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","description":"Список выбранных модификаций. Может быть пустым, передаётся явно, для каждой отдельной позиции в заказе. При заказе двух позиций одного и того же блюда с разным набором модификаций — передаются разные позиции, с разными списками \"modifications\"","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Modification"}},"promos":{"type":"array","description":"Список акций, действующих на текущее блюдо. Если у блюда объект \"promos\" не пустой, значит на него действует акция в системе партнера. Если пустой — на блюдо не действуют никакие акции","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comboInfo":{"description":"Информация о комбо, к которому относится данная позиция. Заполнено только для позиций, которые были выбраны в составе комбо","allOf":[{"$ref":"#/components/schemas/CustomIntegrationOrderV2ComboInfo"}]}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Item"},"CustomIntegrationOrderV2Modification":{"type":"object","properties":{"id":{"type":"string","description":"ID модификатора в системе"},"name":{"type":"string","description":"Наименование модификатора"},"quantity":{"type":"integer","format":"int32","description":"Количество в заказе"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Modification"},"CustomIntegrationOrderV2Promo":{"type":"object","properties":{"type":{"type":"string","description":"Тип акции. Может быть подарок \"GIFT\", процентная скидка \"PERCENTAGE\", фиксированная скидка \"FIXED\""},"discount":{"type":"number","format":"double","description":"Сумма скидки в валюте"},"partner_discount":{"type":"number","format":"double"}},"required":["type"],"title":"CustomIntegrationOrderV2Promo"},"CustomIntegrationOrderV2ComboInfo":{"type":"object","properties":{"id":{"type":"string","description":"Идентификатор комбо"},"componentId":{"type":"string","description":"Идентификатор компонента комбо"}},"title":"CustomIntegrationOrderV2ComboInfo"}}}}
```

## The GetOrderByIdResponse object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"GetOrderByIdResponse":{"type":"object","description":"Order payload as returned by GET /order/{orderId}. Several fields may be empty or defaulted by the handler (platform, discriminator, promos).","properties":{"platform":{"type":"string"},"discriminator":{"type":"string","description":"Тип доставки"},"eatsId":{"type":"string","description":"Сквозной идентификатор заказа"},"restaurantId":{"type":"string","description":"Внутренний идентификатор заведения в системе"},"deliveryInfo":{"$ref":"#/components/schemas/GetOrderDeliveryInfo"},"paymentInfo":{"$ref":"#/components/schemas/GetOrderPaymentInfo"},"persons":{"type":"integer","format":"int32","description":"Количество персон, на которых делается заказ."},"promos":{"type":"array","description":"Список акций, действующих на весь заказ","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comment":{"type":"string","description":"Дополнительная информация о заказе"},"items":{"type":"array","items":{"$ref":"#/components/schemas/GetOrderItem"}}},"required":["eatsId","restaurantId"],"title":"GetOrderByIdResponse"},"GetOrderDeliveryInfo":{"type":"object","description":"Sparse delivery info returned by GET order (handler runtime).","properties":{"clientName":{"type":"string","description":"Имя клиента"},"phoneNumber":{"type":"string","description":"Номер телефона для связи с клиентом в международном формате. Состоит из частей \"+<код страны><номер>\".\""},"courierArrivementDate":{"type":"string","description":"Дата, когда придет курьер в ресторан, в формате RFC3339 с дробной частью секунд (Y-m-d\\TH:i:s.uP)"}},"title":"GetOrderDeliveryInfo"},"GetOrderPaymentInfo":{"type":"object","description":"Sparse payment info returned by GET order (handler runtime).","properties":{"itemsCost":{"type":"number","format":"double"},"paymentType":{"type":"string","description":"Информация о типе оплаты. CARD — уже оплаченный заказ, CASH — неоплаченный заказ. Handler currently hardcodes CARD."}},"title":"GetOrderPaymentInfo"},"CustomIntegrationOrderV2Promo":{"type":"object","properties":{"type":{"type":"string","description":"Тип акции. Может быть подарок \"GIFT\", процентная скидка \"PERCENTAGE\", фиксированная скидка \"FIXED\""},"discount":{"type":"number","format":"double","description":"Сумма скидки в валюте"},"partner_discount":{"type":"number","format":"double"}},"required":["type"],"title":"CustomIntegrationOrderV2Promo"},"GetOrderItem":{"type":"object","description":"Sparse item fields populated by GET order.","properties":{"id":{"type":"string","description":"ID позиции меню в системе"},"name":{"type":"string","description":"Наименование позиции меню"},"quantity":{"type":"number","format":"float","description":"Количество позиции в заказе"},"price":{"type":"number","format":"double"},"modifications":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Modification"}},"promos":{"type":"array","items":{"$ref":"#/components/schemas/CustomIntegrationOrderV2Promo"}},"comboInfo":{"$ref":"#/components/schemas/CustomIntegrationOrderV2ComboInfo"}},"title":"GetOrderItem"},"CustomIntegrationOrderV2Modification":{"type":"object","properties":{"id":{"type":"string","description":"ID модификатора в системе"},"name":{"type":"string","description":"Наименование модификатора"},"quantity":{"type":"integer","format":"int32","description":"Количество в заказе"},"price":{"type":"number","format":"double"}},"required":["id","quantity","price"],"title":"CustomIntegrationOrderV2Modification"},"CustomIntegrationOrderV2ComboInfo":{"type":"object","properties":{"id":{"type":"string","description":"Идентификатор комбо"},"componentId":{"type":"string","description":"Идентификатор компонента комбо"}},"title":"CustomIntegrationOrderV2ComboInfo"}}}}
```

## 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"],"title":"CreateOrderResponse"}}}}
```

## The OrderCancellation object

```json
{"openapi":"3.0.3","info":{"title":"Delever Custom Integration API","version":"1.0.0"},"components":{"schemas":{"OrderCancellation":{"type":"object","properties":{"eatsId":{"type":"string","description":"Present in the request model; unused by the cancel handler."},"comment":{"type":"string"}},"title":"OrderCancellation"}}}}
```

## 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"],"title":"UpdateOrderStatusRequest"}}}}
```

## 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"],"title":"MenuAvailabilityV2"}}}}
```

## 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"],"title":"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"}},"title":"CustomIntegrationLanguage"}}}}
```

## 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"},"descriptionV2":{"$ref":"#/components/schemas/CustomIntegrationLanguage"},"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"}}}}}}},"title":"CustomIntegrationMenuCompositionV2"},"CustomIntegrationLanguage":{"type":"object","properties":{"ru":{"type":"string"},"en":{"type":"string"},"uz":{"type":"string"}},"title":"CustomIntegrationLanguage"},"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":"Признак отключения невалидных данных КБЖУ"}},"title":"MenuCompositionV2Nutrients"},"MenuCompositionV2Images1":{"type":"object","properties":{"hash":{"type":"string","description":"SHA1-хэш от содержимого файла изображения"},"url":{"type":"string","description":"Ссылка на изображение для скачивания"}},"required":["hash","url"],"title":"MenuCompositionV2Images1"},"MenuCompositionV2ServiceCodesUz1":{"type":"object","description":"Специальные коды для Узбекистана. Обязательно для всех блюд в UZ.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код блюда"},"packageCodeUz":{"type":"string","description":"Код упаковки"}},"required":["mxikCodeUz"],"title":"MenuCompositionV2ServiceCodesUz1"},"AdultInfo":{"type":"object","properties":{"age_group":{"type":"integer","description":"Возрастная группа, например 18 или 21"},"alcohol_percentage":{"type":"string","description":"Процент алкоголя в напитке, если применимо"}},"title":"AdultInfo"},"MenuCompositionV2ServiceCodesUz":{"type":"object","description":"Специальные коды для Узбекистана. Для опций не является обязательным.","properties":{"mxikCodeUz":{"type":"string","description":"mxik код опции"},"packageCodeUz":{"type":"string","description":"Код упаковки"}},"title":"MenuCompositionV2ServiceCodesUz"}}}}
```
