❗️Order creation
Method for creating an order in Partner’s system.
YandexOrder– order schema for Yango Deli courier delivery.MarketplaceOrder– order schema for Partner courier delivery.PickupOrder– order schema for pickup.
Current request model version – application/vnd.eats.order.v2+json.
Note
Content-type headers in request and response differ.
Request
POST
/order
Headers
|
Name |
Description |
|
Authorization* |
Type: string Token received in response to the |
Body
application/vnd.eats.order.v2+json
{
"brand": "string",
"comment": "Courier code: 4563. Additional order information...",
"deliveryInfo": {
"clientName": "Ivanov Ivan Ivanovich",
"courierArrivementDate": "2024-01-01T00:00:27.870000+00:20",
"isSlotDelivery": false,
"phoneNumber": "+74732006745 ext. 12099",
"realPhoneNumber": "79998887766"
},
"discriminator": "yandex",
"eatsId": "230130-1234567",
"items": [
{
"id": "some-uniq-identifier",
"name": "“Milk Original\"",
"originPrice": 70,
"price": 84,
"quantity": 3.4
}
],
"paymentInfo": {
"itemsCost": 1570,
"paymentType": "CARD"
},
"platform": "YE",
"restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0"
}
|
Name |
Description |
|
...rest |
oneOf YandexOrderCreate Order information with Yandex Eats courier delivery – "yandex". |
|
...rest |
oneOf MarketplaceOrderCreate Order information with Partner courier delivery – "marketplace". |
|
...rest |
oneOf PickupOrderCreate Pickup order information. |
YandexOrderCreate
Order information with Yandex Eats courier delivery – "yandex".
|
Name |
Description |
|
comment* |
Type: string Contains the courier code and additional order information. Example: |
|
deliveryInfo* |
Type: YandexDeliveryInfo Delivery information |
|
discriminator* |
Type: string Schema discriminator. For orders with Yandex Eats courier delivery equals "yandex". Example: |
|
eatsId* |
Type: string End-to-end order identifier on Yandex Eats side in DDDDDD-DDDDDDD format. Example: |
|
items* |
Type: OrderCreateItem[] |
|
paymentInfo* |
Type: YandexOrderPaymentInfo |
|
brand |
Type: string Brand |
|
platform |
Type: Platform Platform identifier, DC – Delivery Club, YE – Yandex Eats, LAVKA – Lavka, VSEAPTEKI – Vseapteki. Example: Enum: |
|
restaurantId |
Type: string Internal unique store identifier in partner system. Free format, UUID4 recommended. Example: |
MarketplaceOrderCreate
Order information with Partner courier delivery – "marketplace".
|
Name |
Description |
|
comment* |
Type: string Additional order information. Example: |
|
deliveryInfo* |
|
|
discriminator* |
Type: string Schema discriminator. For orders with Partner courier delivery it equals "marketplace". Example: |
|
eatsId* |
Type: string End-to-end order identifier on Yandex Eats side in DDDDDD-DDDDDDD format. Example: |
|
items* |
Type: OrderCreateItem[] |
|
paymentInfo* |
|
|
brand |
Type: string Brand |
|
platform |
Type: Platform Platform identifier, DC – Delivery Club, YE – Yandex Eats, LAVKA – Lavka, VSEAPTEKI – Vseapteki. Example: Enum: |
|
restaurantId |
Type: string Internal unique store identifier in partner system. Free format, UUID4 recommended. Example: |
PickupOrderCreate
Pickup order information.
|
Name |
Description |
|
comment* |
Type: string Additional order information. Example: |
|
deliveryInfo* |
Type: PickupDeliveryInfo Delivery information. |
|
discriminator* |
Type: string Schema discriminator. For pickup orders it is equal to "pickup". Example: |
|
eatsId* |
Type: string End-to-end order identifier on Yandex Eats side in DDDDDD-DDDDDDD format. Example: |
|
items* |
Type: OrderCreateItem[] |
|
paymentInfo* |
Type: YandexOrderPaymentInfo |
|
brand |
Type: string Brand |
|
pickupPointId |
Type: string Identifier of the order pickup point from which customer expects to collect the order. Example: |
|
platform |
Type: Platform Platform identifier, DC – Delivery Club, YE – Yandex Eats, LAVKA – Lavka, VSEAPTEKI – Vseapteki. Example: Enum: |
|
restaurantId |
Type: string Internal unique store identifier in partner system. Free format, UUID4 recommended. Example: |
YandexDeliveryInfo
Delivery information
|
Name |
Description |
|
courierArrivementDate* |
Type: string<date-time> Date when the customer will arrive at the store, in RFC3339 format with fractional seconds (Y-m-d\TH:i:s.uP). Fractional seconds part is mandatory. Example: |
|
clientName |
Type: string Customer name in Yandex Eats service. Example: |
|
isSlotDelivery |
Type: boolean Order with slot delivery (timed delivery). |
|
phoneNumber |
Type: string Phone number for customer contact in international format. Consists of parts "+ Example: |
|
realPhoneNumber |
Type: string Сustomer phone number without masking, provided with user consent for data transfer and loyalty card binding. Support required only when integrating the partner’s loyalty program in Yandex Eats. Example: |
OrderCreateItem
|
Name |
Description |
|
id* |
Type: string Unique product identifier in the Partner’s system Example: Max length: |
|
price* |
Type: number<double> Price per unit of item. For catch-weight items price is specified per 1 kg. Example: |
|
quantity* |
Type: number<float> Item quantity in order. For catch-weight items quantity is expressed in kg. Example: |
|
name |
Type: string Product name. Example: |
|
originPrice |
Type: number<double> Original item price before applying recommendations. Example: |
YandexOrderPaymentInfo
|
Name |
Description |
|
itemsCost* |
Type: number<double> Total cost of items in order Example: |
|
paymentType* |
Type: string Payment type information. CARD – order paid by customer on Yandex Eats side, CASH – unpaid order (mainly used for alcohol pickup). Enum: |
Platform
Platform identifier, DC – Delivery Club, YE – Yandex Eats, LAVKA – Lavka, VSEAPTEKI – Vseapteki.
|
Type |
Description |
|
Example: Enum: |
MarketplaceCreateDeliveryInfo
|
Name |
Description |
|
clientName* |
Type: string Customer name in Yandex Eats service. Example: |
|
deliveryAddress* |
Type: DeliveryAddressFull Delivery address information. |
|
deliveryDate* |
Type: string<date-time> Delivery date (when customer expects order delivery), in RFC3339 format with fractional seconds (Y-m-d\TH:i:s.uP). Example: |
|
phoneNumber* |
Type: string Phone number for customer contact in international format. Consists of parts "+ Example: |
|
deliverySlot |
Type: DeliverySlot Delivery slot information. |
|
realPhoneNumber |
Type: string Сustomer phone number without masking, provided with user consent for data transfer and loyalty card binding. Support required only when integrating the partner’s loyalty program in Yandex Eats. Example: |
MarketplaceOrderPaymentInfo
|
Name |
Description |
|
change* |
Type: number<double> Payment amount requiring change. In other words, this is the amount the customer plans to pay with. Usually customer payment occurs by card on Yandex side and this field is transmitted empty to Partners. Example: |
|
deliveryFee* |
Type: number<double> Delivery cost. Example: |
|
itemsCost* |
Type: number<double> Total cost of items in order Example: |
|
paymentType* |
Type: string Payment type information. CARD – order paid by customer on Yandex Eats side, CASH – unpaid order (mainly used for alcohol pickup). Enum: |
|
total |
Type: number<double> Total order cost. Example: |
PickupDeliveryInfo
Delivery information.
|
Name |
Description |
|
clientArrivementDate* |
Type: string<date-time> Date when the courier is expected to arrive at the store, in RFC3339 format with fractional seconds (Y-m-d\TH:i:s.uP). Make sure to include fractional seconds. Example: |
|
clientName* |
Type: string Customer name in Yandex Eats service. Example: |
|
phoneNumber* |
Type: string Phone number for customer contact in international format. Consists of parts "+ Example: |
|
realPhoneNumber |
Type: string Сustomer phone number without masking, provided with user consent for data transfer and loyalty card binding. Support required only when integrating the partner’s loyalty program in Yandex Eats. Example: |
DeliveryAddressFull
Delivery address information.
|
Name |
Description |
|
full* |
Type: string Full address Example: |
|
latitude* |
Type: string Latitude of delivery point Example: |
|
longitude* |
Type: string Longitude of delivery point Example: |
|
city |
Type: string City Example: |
|
entrance |
Type: string Entrance Example: |
|
flat |
Type: string Apartment Example: |
|
floor |
Type: string Floor Example: |
|
house |
Type: string Building Example: |
|
intercom |
Type: string Intercom Example: |
|
region |
Type: string Region Example: |
|
street |
Type: string Street Example: |
DeliverySlot
Delivery slot information.
|
Name |
Description |
|
from* |
Type: string<date-time> Delivery slot start Example: |
|
to* |
Type: string<date-time> Delivery slot end. Example: |
|
slotId |
Type: string Slot ID |
Responses
200 OK
Order successfully created in Partner’s system.
Body
application/json
{
"result": "OK",
"orderId": "03d3b69b-331c-4f84-b2c4-888b30320e63"
}
|
Name |
Description |
|
orderId* |
Type: string Order identifier in the Partner’s system. Free format. UUID4 is recommended. Example: |
|
result* |
Type: string Example: |
400 Bad Request
Request error. The response is expected to contain an array with an object from the error list.
ErrorItem
|
Name |
Description |
|
code* |
Type: integer Numeric error code agreed with Yango Deli. Example: |
|
description* |
Type: string Error description Example: |
401 Unauthorized
Authorisation failed.
Body
application/json
{
"reason": "Access token has been expired. You should request a new one"
}
|
Name |
Description |
|
reason* |
Type: string The reason why authorisation failed. Example: |
500 Internal Server Error
Internal server errors. The response is expected to contain an array with an object from the error list.
No longer supported, please use an alternative and newer version.