Create an order in the restaurant system

  • YandexOrder – order schema for Yandex delivery.
  • MarketplaceOrder – order schema for partner delivery.
  • PickupOrder – order schema for pickup orders by customer.

Current version of the request model – application/vnd.eats.order.v2+json.

Request

POST

/order

Body

application/vnd.eats.order.v2+json
{
  "platform": "YE",
  "discriminator": "yandex",
  "eatsId": "190330-12345678",
  "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
  "deliveryInfo": {
    "clientName": "John Cena",
    "phoneNumber": "+79031111111 ext. 4432",
    "additionalPhoneNumbers": [
      null
    ],
    "courierArrivementDate": "1937-01-01T12:00:27.870000+00:20",
    "realPhoneNumber": "+79031111111",
    "pickupCode": "123"
  },
  "paymentInfo": {
    "itemsCost": 100,
    "paymentType": "CARD"
  },
  "items": [
    {
      "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "name": "Pepperoni Pizza",
      "quantity": 3.5,
      "price": 100,
      "modifications": [
        {}
      ],
      "promos": [
        {}
      ]
    }
  ],
  "persons": 2,
  "comment": "Additional order information: ...",
  "promos": [
    {}
  ]
}
One of 3 types
  • Type: YandexOrderV2

    Current version of the order model for "Yandex" delivery scheme.

    Example
    {
      "platform": "YE",
      "discriminator": "yandex",
      "eatsId": "190330-12345678",
      "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "deliveryInfo": {
        "clientName": "John Cena",
        "phoneNumber": "+79031111111 ext. 4432",
        "additionalPhoneNumbers": [
          null
        ],
        "courierArrivementDate": "1937-01-01T12:00:27.870000+00:20",
        "realPhoneNumber": "+79031111111",
        "pickupCode": "123"
      },
      "paymentInfo": {
        "itemsCost": 100,
        "paymentType": "CARD"
      },
      "items": [
        {
          "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
          "name": "Pepperoni Pizza",
          "quantity": 3.5,
          "price": 100,
          "modifications": [
            {
              "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
              "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
              "name": "utensils",
              "quantity": 3,
              "price": 100
            }
          ],
          "promos": [
            {
              "type": "GIFT",
              "discount": 200,
              "partner_discount": 100,
              "yandex_discount": 100
            }
          ]
        }
      ],
      "persons": 2,
      "comment": "Additional order information: ...",
      "promos": [
        {}
      ]
    }
    
  • Type: MarketplaceOrderV2

    Current version of the order model for "Marketplace" delivery scheme

    Example
    {
      "platform": "YE",
      "discriminator": "marketplace",
      "eatsId": "190330-12345678",
      "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "deliveryInfo": {
        "clientName": "John Cena",
        "phoneNumber": "+79031111111 ext. 4432",
        "additionalPhoneNumbers": [
          null
        ],
        "deliveryDate": "1937-01-01T12:00:27.870000+00:20",
        "deliveryAddress": {
          "full": "Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567",
          "latitude": "55.756994",
          "longitude": "37.614006"
        }
      },
      "paymentInfo": {
        "paymentType": "CARD",
        "itemsCost": 100,
        "deliveryFee": 100,
        "total": 200,
        "change": 500
      },
      "items": [
        {
          "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
          "name": "Pepperoni Pizza",
          "quantity": 3.5,
          "price": 100,
          "modifications": [
            {
              "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
              "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
              "name": "utensils",
              "quantity": 3,
              "price": 100
            }
          ],
          "promos": [
            {
              "type": "GIFT",
              "discount": 200,
              "partner_discount": 100,
              "yandex_discount": 100
            }
          ]
        }
      ],
      "persons": 2,
      "comment": "Additional order information: ...",
      "promos": [
        null
      ]
    }
    
  • Type: PickupOrderV1

    Current version of the order model for "pickup" delivery scheme

    Example
    {
      "platform": "YE",
      "discriminator": "pickup",
      "eatsId": "190330-123456",
      "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "deliveryInfo": {
        "clientName": "John Cena",
        "phoneNumber": "+79031111111 ext. 4432",
        "additionalPhoneNumbers": [
          null
        ],
        "clientArrivementDate": "1937-01-01T12:00:27.870000+00:20"
      },
      "paymentInfo": {
        "paymentType": "CARD",
        "itemsCost": 100,
        "total": 200,
        "change": 500
      },
      "items": [
        {
          "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
          "name": "Pepperoni Pizza",
          "quantity": 3.5,
          "price": 100,
          "modifications": [
            {
              "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
              "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
              "name": "utensils",
              "quantity": 3,
              "price": 100
            }
          ],
          "promos": [
            {
              "type": "GIFT",
              "discount": 200,
              "partner_discount": 100,
              "yandex_discount": 100
            }
          ]
        }
      ],
      "persons": 2,
      "comment": "Additional order information: ...",
      "promos": [
        {}
      ]
    }
    

PhoneNumber

Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Type: string

Example: +79031111111 ext. 4432

YandexOrderDeliveryInfo

Name

Description

courierArrivementDate

Type: string<date-time>

The date when the courier arrives at the restaurant, in RFC 3339 format with fractional part of seconds (Y-m-d\TH:i:s.uP).

Example: 1937-01-01T12:00:27.870000+00:20

additionalPhoneNumbers

Type: PhoneNumber[]

A list of additional numbers for contacting the client.

Example
[
  "+79031111111 ext. 4432"
]

clientName

Type: string

The customer's name in the Yandex service

Example: John Cena

phoneNumber

Type: PhoneNumber

Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Example: +79031111111 ext. 4432

pickupCode

Type: string

Courier identification code

Example: 123

realPhoneNumber

Type: string

The phone number for contacting the client in an international format. It consists of the parts "+". It is indicated if the client consents to the processing of his personal data

Example: +79031111111

Example
{
  "clientName": "John Cena",
  "phoneNumber": "+79031111111 ext. 4432",
  "additionalPhoneNumbers": [
    null
  ],
  "courierArrivementDate": "1937-01-01T12:00:27.870000+00:20",
  "realPhoneNumber": "+79031111111",
  "pickupCode": "123"
}

YandexOrderPaymentInfo

Name

Description

itemsCost

Type: number

The full cost of the dishes in the order.

paymentType

Type: string

Information about the payment type. CARD – paid order, CASH – unpaid order.

Enum: CARD, CASH

Example
{
  "itemsCost": 100,
  "paymentType": "CARD"
}

OrdersModificationItem

Name

Description

id

Type: string

ID of the modifier in the partner system

Example: 937c57f6-4508-4858-be7f-20691a16fbb0

price

Type: number

Price of the modifier for the menu item (e.g., additional sauce)

quantity

Type: integer

Quantity in the order

group_id

Type: string

Unique identifier for a group within a partner system. The Partner Group ID is linked to a specific modifier, which is a component that can be duplicated.

Example: 937c57f6-4508-4858-be7f-20691a16fbb1

name

Type: string

Modifier name

Example: utensils

Example
{
  "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
  "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
  "name": "utensils",
  "quantity": 3,
  "price": 100
}

OrdersPromoItem

Name

Description

discount

Type: number

Discount amount in currency paid by the partner

type

Type: string

Promotion type. Can be a gift "GIFT", percentage discount "PERCENTAGE", co-financed discount "COFINANCE" and "FIXED"

Enum: GIFT, FIXED, PERCENTAGE, COFINANCE

partner_discount

Type: number

Part of the discount amount in currency paid by the partner

yandex_discount

Type: number

Part of the discount amount in currency paid by Yandex

Example
{
  "type": "GIFT",
  "discount": 200,
  "partner_discount": 100,
  "yandex_discount": 100
}

OrdersItem

Name

Description

id

Type: string

ID of the menu item in the partner system

Example: 937c57f6-4508-4858-be7f-20691a16fbb0

modifications

Type: OrdersModificationItem[]

List of selected modifications. Can be empty, explicitly transmitted for each individual item in the order. When ordering two items of the same dish with different modifications, different positions with different "modifications" lists are transmitted.

Example
[
  {
    "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
    "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
    "name": "utensils",
    "quantity": 3,
    "price": 100
  }
]

price

Type: number

Price of one item including modification costs.

promos

Type: OrdersPromoItem[]

List of promotions applied to the current dish. If the dish has a non-empty "promos" object, it means that a promotion is active in the partner system. If empty, it means no promotions apply to the dish.

Example
[
  {
    "type": "GIFT",
    "discount": 200,
    "partner_discount": 100,
    "yandex_discount": 100
  }
]

quantity

Type: number

Quantity of the item in the order

name

Type: string

Menu item name

Example: Pepperoni Pizza

Example
{
  "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
  "name": "Pepperoni Pizza",
  "quantity": 3.5,
  "price": 100,
  "modifications": [
    {
      "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
      "name": "utensils",
      "quantity": 3,
      "price": 100
    }
  ],
  "promos": [
    {
      "type": "GIFT",
      "discount": 200,
      "partner_discount": 100,
      "yandex_discount": 100
    }
  ]
}

YandexOrderV2

Current version of the order model for "Yandex" delivery scheme.

Name

Description

comment

Type: string

Additional order information

Example: Additional order information: ...

deliveryInfo

Type: YandexOrderDeliveryInfo

Delivery information.

Example
{
  "clientName": "John Cena",
  "phoneNumber": "+79031111111 ext. 4432",
  "additionalPhoneNumbers": [
    null
  ],
  "courierArrivementDate": "1937-01-01T12:00:27.870000+00:20",
  "realPhoneNumber": "+79031111111",
  "pickupCode": "123"
}

discriminator

Type: string

Schema discriminator object. For YandexOrder, it is "yandex".

Example: yandex

eatsId

Type: string

End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD

Example: 190330-12345678

items

Type: OrdersItem[]

Example
[
  {
    "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
    "name": "Pepperoni Pizza",
    "quantity": 3.5,
    "price": 100,
    "modifications": [
      {
        "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
        "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
        "name": "utensils",
        "quantity": 3,
        "price": 100
      }
    ],
    "promos": [
      {
        "type": "GIFT",
        "discount": 200,
        "partner_discount": 100,
        "yandex_discount": 100
      }
    ]
  }
]

paymentInfo

Type: YandexOrderPaymentInfo

Example
{
  "itemsCost": 100,
  "paymentType": "CARD"
}

promos

Type: OrdersPromoItem[]

List of promotions applied to the entire order. If the order has a non-empty "promos" object, it means that a promotion is active in the partner system. If empty, it means no promotions apply to the order.

Example
[
  {
    "type": "GIFT",
    "discount": 200,
    "partner_discount": 100,
    "yandex_discount": 100
  }
]

restaurantId

Type: string

Internal identifier of the establishment in the partner system to which the order is transmitted. Free format, UUID4 recommended.

Example: 937c57f6-4508-4858-be7f-20691a16fbb0

persons

Type: integer

Number of persons for whom the order is placed. May affect the number of cutlery sets.

platform

Type: string

Platform ID:

  • YE – Yandex

Const: YE

Example: example

Example
{
  "platform": "YE",
  "discriminator": "yandex",
  "eatsId": "190330-12345678",
  "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
  "deliveryInfo": {
    "clientName": "John Cena",
    "phoneNumber": "+79031111111 ext. 4432",
    "additionalPhoneNumbers": [
      null
    ],
    "courierArrivementDate": "1937-01-01T12:00:27.870000+00:20",
    "realPhoneNumber": "+79031111111",
    "pickupCode": "123"
  },
  "paymentInfo": {
    "itemsCost": 100,
    "paymentType": "CARD"
  },
  "items": [
    {
      "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "name": "Pepperoni Pizza",
      "quantity": 3.5,
      "price": 100,
      "modifications": [
        {
          "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
          "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
          "name": "utensils",
          "quantity": 3,
          "price": 100
        }
      ],
      "promos": [
        {
          "type": "GIFT",
          "discount": 200,
          "partner_discount": 100,
          "yandex_discount": 100
        }
      ]
    }
  ],
  "persons": 2,
  "comment": "Additional order information: ...",
  "promos": [
    {}
  ]
}

DeliveryAddress

Name

Description

full

Type: string

Full address

Example: Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567

latitude

Type: string

Delivery point latitude

Example: 55.756994

longitude

Type: string

Delivery point longitude

Example: 37.614006

Example
{
  "full": "Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567",
  "latitude": "55.756994",
  "longitude": "37.614006"
}

MarketplaceOrderDeliveryInfo

Name

Description

clientName

Type: string

Client's name in Yandex service

Example: John Cena

deliveryAddress

Type: DeliveryAddress

Delivery address information

Example
{
  "full": "Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567",
  "latitude": "55.756994",
  "longitude": "37.614006"
}

deliveryDate

Type: string<date-time>

Delivery date (when the client expects the order), in RFC3339 format with fractional seconds (Y-m-d\TH:i:s.uP)

Example: 1937-01-01T12:00:27.870000+00:20

phoneNumber

Type: PhoneNumber

Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Example: +79031111111 ext. 4432

additionalPhoneNumbers

Type: PhoneNumber[]

A list of additional numbers for contacting the client.

Example
[
  "+79031111111 ext. 4432"
]
Example
{
  "clientName": "John Cena",
  "phoneNumber": "+79031111111 ext. 4432",
  "additionalPhoneNumbers": [
    null
  ],
  "deliveryDate": "1937-01-01T12:00:27.870000+00:20",
  "deliveryAddress": {
    "full": "Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567",
    "latitude": "55.756994",
    "longitude": "37.614006"
  }
}

MarketplaceOrderPaymentInfo

Name

Description

change

Type: number

Amount of change required

deliveryFee

Type: number

Delivery cost

itemsCost

Type: number

Total cost of the dishes in the order

paymentType

Type: string

Payment type information. CARD – already paid order, CASH – unpaid order.

Enum: CARD, CASH

total

Type: number

Total order cost

Example
{
  "paymentType": "CARD",
  "itemsCost": 100,
  "deliveryFee": 100,
  "total": 200,
  "change": 500
}

MarketplaceOrderV2

Current version of the order model for "Marketplace" delivery scheme

Name

Description

comment

Type: string

Additional order information

Example: Additional order information: ...

deliveryInfo

Type: MarketplaceOrderDeliveryInfo

Delivery information

Example
{
  "clientName": "John Cena",
  "phoneNumber": "+79031111111 ext. 4432",
  "additionalPhoneNumbers": [
    null
  ],
  "deliveryDate": "1937-01-01T12:00:27.870000+00:20",
  "deliveryAddress": {
    "full": "Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567",
    "latitude": "55.756994",
    "longitude": "37.614006"
  }
}

discriminator

Type: string

Schema discriminator object. For MarketplaceOrder, it is "marketplace"

Example: marketplace

eatsId

Type: string

End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD

Example: 190330-12345678

items

Type: OrdersItem[]

Example
[
  {
    "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
    "name": "Pepperoni Pizza",
    "quantity": 3.5,
    "price": 100,
    "modifications": [
      {
        "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
        "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
        "name": "utensils",
        "quantity": 3,
        "price": 100
      }
    ],
    "promos": [
      {
        "type": "GIFT",
        "discount": 200,
        "partner_discount": 100,
        "yandex_discount": 100
      }
    ]
  }
]

paymentInfo

Type: MarketplaceOrderPaymentInfo

Example
{
  "paymentType": "CARD",
  "itemsCost": 100,
  "deliveryFee": 100,
  "total": 200,
  "change": 500
}

promos

Type: OrdersPromoItem[]

List of promotions applied to the entire order. If the order has a non-empty "promos" object, it means that a promotion is active in the partner system. If empty, it means no promotions apply to the order.

Example
[
  {
    "type": "GIFT",
    "discount": 200,
    "partner_discount": 100,
    "yandex_discount": 100
  }
]

restaurantId

Type: string

Internal identifier of the establishment in the partner system to which the order is transmitted. Free format, UUID4 recommended

Example: 937c57f6-4508-4858-be7f-20691a16fbb0

persons

Type: integer

Number of persons for whom the order is placed. May affect the number of cutlery sets

platform

Type: string

Platform identifier. YE - Yandex

Const: YE

Example: example

Example
{
  "platform": "YE",
  "discriminator": "marketplace",
  "eatsId": "190330-12345678",
  "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
  "deliveryInfo": {
    "clientName": "John Cena",
    "phoneNumber": "+79031111111 ext. 4432",
    "additionalPhoneNumbers": [
      null
    ],
    "deliveryDate": "1937-01-01T12:00:27.870000+00:20",
    "deliveryAddress": {
      "full": "Tashkent, Amir Temur Street, building 4, entrance 2. 4th floor, intercom code: 123 K 4567",
      "latitude": "55.756994",
      "longitude": "37.614006"
    }
  },
  "paymentInfo": {
    "paymentType": "CARD",
    "itemsCost": 100,
    "deliveryFee": 100,
    "total": 200,
    "change": 500
  },
  "items": [
    {
      "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "name": "Pepperoni Pizza",
      "quantity": 3.5,
      "price": 100,
      "modifications": [
        {
          "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
          "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
          "name": "utensils",
          "quantity": 3,
          "price": 100
        }
      ],
      "promos": [
        {
          "type": "GIFT",
          "discount": 200,
          "partner_discount": 100,
          "yandex_discount": 100
        }
      ]
    }
  ],
  "persons": 2,
  "comment": "Additional order information: ...",
  "promos": [
    null
  ]
}

PickupOrderDeliveryInfo

Name

Description

clientArrivementDate

Type: string<date-time>

The date when the customer arrives at the restaurant, in RFC 3339 format with fractional part of seconds (Y-m-d\TH:i:s.uP)

Example: 1937-01-01T12:00:27.870000+00:20

clientName

Type: string

Client's name in Yandex service

Example: John Cena

phoneNumber

Type: PhoneNumber

Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Example: +79031111111 ext. 4432

additionalPhoneNumbers

Type: PhoneNumber[]

A list of additional numbers for contacting the client.

Example
[
  "+79031111111 ext. 4432"
]
Example
{
  "clientName": "John Cena",
  "phoneNumber": "+79031111111 ext. 4432",
  "additionalPhoneNumbers": [
    null
  ],
  "clientArrivementDate": "1937-01-01T12:00:27.870000+00:20"
}

PickupOrderPaymentInfo

Name

Description

change

Type: number

Amount of change required.

itemsCost

Type: number

Total cost of the dishes in the order

paymentType

Type: string

Payment type information

Enum: CARD, CASH

total

Type: number

Total order cost

Example
{
  "paymentType": "CARD",
  "itemsCost": 100,
  "total": 200,
  "change": 500
}

PickupOrderV1

Current version of the order model for "pickup" delivery scheme

Name

Description

comment

Type: string

Additional order information

Example: Additional order information: ...

deliveryInfo

Type: PickupOrderDeliveryInfo

Delivery info

Example
{
  "clientName": "John Cena",
  "phoneNumber": "+79031111111 ext. 4432",
  "additionalPhoneNumbers": [
    null
  ],
  "clientArrivementDate": "1937-01-01T12:00:27.870000+00:20"
}

discriminator

Type: string

Object schema discriminator. For PickupOrder equals "pickup"

Example: pickup

eatsId

Type: string

End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDD

Example: 190330-123456

items

Type: OrdersItem[]

Example
[
  {
    "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
    "name": "Pepperoni Pizza",
    "quantity": 3.5,
    "price": 100,
    "modifications": [
      {
        "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
        "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
        "name": "utensils",
        "quantity": 3,
        "price": 100
      }
    ],
    "promos": [
      {
        "type": "GIFT",
        "discount": 200,
        "partner_discount": 100,
        "yandex_discount": 100
      }
    ]
  }
]

paymentInfo

Type: PickupOrderPaymentInfo

Example
{
  "paymentType": "CARD",
  "itemsCost": 100,
  "total": 200,
  "change": 500
}

promos

Type: OrdersPromoItem[]

List of promotions active for the entire order. If the order object "promos" is not empty, then the order has a promotion in the partner's system. If empty – this means that the order does not have any promotions

Example
[
  {
    "type": "GIFT",
    "discount": 200,
    "partner_discount": 100,
    "yandex_discount": 100
  }
]

restaurantId

Type: string

Internal identifier of the establishment in the partner system to which the order is transmitted. Free format, UUID4 recommended

Example: 937c57f6-4508-4858-be7f-20691a16fbb0

persons

Type: integer

Number of people the order is for. May affect the number of utensil sets

platform

Type: string

Platform identifier. YE - Yandex

Const: YE

Example: example

Example
{
  "platform": "YE",
  "discriminator": "pickup",
  "eatsId": "190330-123456",
  "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
  "deliveryInfo": {
    "clientName": "John Cena",
    "phoneNumber": "+79031111111 ext. 4432",
    "additionalPhoneNumbers": [
      null
    ],
    "clientArrivementDate": "1937-01-01T12:00:27.870000+00:20"
  },
  "paymentInfo": {
    "paymentType": "CARD",
    "itemsCost": 100,
    "total": 200,
    "change": 500
  },
  "items": [
    {
      "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
      "name": "Pepperoni Pizza",
      "quantity": 3.5,
      "price": 100,
      "modifications": [
        {
          "id": "937c57f6-4508-4858-be7f-20691a16fbb0",
          "group_id": "937c57f6-4508-4858-be7f-20691a16fbb1",
          "name": "utensils",
          "quantity": 3,
          "price": 100
        }
      ],
      "promos": [
        {
          "type": "GIFT",
          "discount": 200,
          "partner_discount": 100,
          "yandex_discount": 100
        }
      ]
    }
  ],
  "persons": 2,
  "comment": "Additional order information: ...",
  "promos": [
    {}
  ]
}

Responses

200 OK

The order has been successfully processed by the restaurant's internal system

Body

application/json
{
  "result": "OK",
  "orderId": "03d3b69b-331c-4f84-b2c4-888b30320e63"
}

Name

Description

orderId

Type: string

The identifier of the created order in the partner's system. The format is freeform. UUID4 is recommended.

Example: 03d3b69b-331c-4f84-b2c4-888b30320e63

result

Type: string

Example: OK

400 Bad Request

Bad request. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]

ErrorItem

Name

Description

code

Type: integer

Error code agreed with Yandex

description

Type: string

Error message

Example: Description of error

Example
{
  "code": 100,
  "description": "Description of error"
}

401 Unauthorized

Authorization failed - the token expired or was not passed in the request. A retry will be made

Body

application/json
{
  "reason": "Access token has been expired. You should request a new one"
}

Name

Description

reason

Type: string

Reason for authorization failure

Example: Access token has been expired. You should request a new one

406 Not Acceptable

Some items in the order are on the partner's stop list

Body

application/json
{
  "type": "unavailable_goods",
  "message": "At the moment, the product is not available for order: pie with cream cheese and avocado",
  "goods": "{\"10000000003998\": \"pie with cream cheese and avocado\"}"
}

Name

Description

goods

Type: object

Example: {"10000000003998": "pie with cream cheese and avocado"}

message

Type: string

Example: At the moment, the product is not available for order: pie with cream cheese and avocado

type

Type: string

Example: unavailable_goods

500 Internal Server Error

Internal server errors. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]