Update an order in the restaurant system

Update the composition of an order in the partner's system initiated by Yandex. Use of this method requires coordination with Yandex staff. The entire order object is passed. Current version of the request model - application/vnd.eats.order.v2+json

Request

PUT

/order/{orderId}

Path parameters

Name

Description

orderId*

Type: string

Order identifier in the partner's system

Body

application/vnd.eats.order.v2+json
{
    "platform": "YE",
    "discriminator": "marketplace",
    "eatsId": "190330-12345678",
    "restaurantId": "937c57f6-4508-4858-be7f-20691a16fbb0",
    "deliveryInfo": {
        "clientName": "John Cena",
        "phoneNumber": "+79031111111 ext. 4432",
        "additionalPhoneNumbers": [
            "+79031111111 ext. 4432"
        ],
        "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": [
        {
            "type": "GIFT",
            "discount": 200,
            "partner_discount": 100,
            "yandex_discount": 100
        }
    ]
}

Name

Description

...rest

oneOf MarketplaceOrderV2

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

...rest

oneOf YandexOrderV2

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

...rest

oneOf PickupOrderV1

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

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

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[]

paymentInfo*

Type: MarketplaceOrderPaymentInfo

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.

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

Example: 2

platform

Type: string

Platform identifier. YE - Yandex

Enum: YE

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.

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[]

paymentInfo*

Type: YandexOrderPaymentInfo

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.

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.

Example: 2

platform

Type: string

Platform ID:

  • YE – Yandex

Enum: YE

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

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[]

paymentInfo*

Type: PickupOrderPaymentInfo

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

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

Example: 2

platform

Type: string

Platform identifier. YE - Yandex

Enum: YE

MarketplaceOrderDeliveryInfo

Name

Description

clientName*

Type: string

Client's name in Yandex service

Example: John Cena

deliveryAddress*

Type: DeliveryAddress

Delivery address information

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: string

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

Example: +79031111111 ext. 4432

additionalPhoneNumbers

Type: string[]

A list of additional numbers for contacting the client.
Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Example: +79031111111 ext. 4432

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.

price*

Type: number<double>

Price of one item including modification costs. Will be corrected in
the next version to show the base price without modifications.

Example: 100

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.

quantity*

Type: number<float>

Quantity of the item in the order

Example: 3.5

name

Type: string

Menu item name

Example: Pepperoni Pizza

MarketplaceOrderPaymentInfo

Name

Description

change*

Type: number<double>

Amount of change required

Example: 500

deliveryFee*

Type: number<double>

Delivery cost

Example: 100

itemsCost*

Type: number<double>

Total cost of the dishes in the order

Example: 100

paymentType*

Type: string

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

Enum: CARD, CASH

total

Type: number<double>

Total order cost

Example: 200

OrdersPromoItem

Name

Description

discount*

Type: number

Discount amount in currency paid by the partner

Example: 200

type*

Type: string

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

Example: GIFT

Enum: GIFT, PERCENTAGE, COFINANCE

partner_discount

Type: number

Part of the discount amount in currency paid by the partner

Example: 100

yandex_discount

Type: number

Part of the discount amount in currency paid by Yandex

Example: 100

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: string[]

A list of additional numbers for contacting the client.
Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Example: +79031111111 ext. 4432

clientName

Type: string

The customer's name in the Yandex service

Example: John Cena

phoneNumber

Type: string

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

YandexOrderPaymentInfo

Name

Description

itemsCost*

Type: number<double>

The full cost of the dishes in the order.

Example: 100

paymentType*

Type: string

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

Enum: CARD, CASH

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: string

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

Example: +79031111111 ext. 4432

additionalPhoneNumbers

Type: string[]

A list of additional numbers for contacting the client.
Phone number to contact the customer in international format. Consists of parts "+". May include extension: "+ ext. ".

Example: +79031111111 ext. 4432

PickupOrderPaymentInfo

Name

Description

change*

Type: number<double>

Amount of change required.

Example: 500

itemsCost*

Type: number<double>

Total cost of the dishes in the order

Example: 100

paymentType*

Type: string

Payment type information

Enum: CARD, CASH

total

Type: number<double>

Total order cost

Example: 200

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

OrdersModificationItem

Name

Description

id*

Type: string

ID of the modifier in the partner system

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

price*

Type: number<double>

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

Example: 100

quantity*

Type: integer

Quantity in the order

Example: 3

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

Responses

200 OK

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

Body

application/json
{
    "result": "OK"
}

Name

Description

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"
    }
]

OrderStatusPut[]

OrderStatusPut

Name

Description

status*

Type: string

Order ststus.
Status description:

  • TAKEN_BY_COURIER - courier picked up the order from the restaurant.
  • DELIVERED – order completed.
  • CANCELLED – order cancelled.

Enum: CANCELLED, TAKEN_BY_COURIER, DELIVERED

attributes

Type: string[]

Additional attributes when changing the order status, for example, a sign of payment upon cancellation

Example: paid

comment

Type: string

Description of cancellation reasons (can be empty)

Example: test

Max length: 500

reason

Type: string

The reason for the cancellation of the order. It is transmitted only with the CANCELLED status

Example: place.unable_to_call

updatedAt

Type: string

The date when the order status changed, 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

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

404 Not Found

The order was not found in the system. An array with an object from the error list is expected in the response body

Body

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

OrderStatusPut[]

422 Unprocessable Entity

The order cannot be updated

Body

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

OrderStatusPut[]

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"
    }
]

OrderStatusPut[]

No longer supported, please use an alternative and newer version.