Send the customer's feedback on the order.
Send the customer's feedback on the order.
Note
The method is available only by subscription.
The method for providing a response to a feedback is inside the block Vendor Management Integration API.
Request
POST
/v1/feedback
Body
application/json
{
"feedback": {
"id": "example",
"createdAt": "1937-01-01T12:00:27.870000+00:20",
"eatsId": "190330-12345678",
"orderId": "example",
"predefinedComment": "example",
"comment": "example",
"restaurantId": "example",
"rating": 5,
"takenAt": "1937-01-01T12:00:27+00:20",
"deliveredAt": "1937-01-01T12:00:27+00:20"
},
"orderInfo": {
"createdAt": "1937-01-01T12:00:27.870000+00:20",
"platform": "YE",
"discriminator": "marketplace",
"deliveryInfo": {
"clientName": "John Cena"
},
"paymentInfo": {
"total": 200.99
},
"items": [
{
"id": "937c57f6-4508-4858-be7f-20691a16fbb0",
"name": "Pizza Pepperoni",
"quantity": 3.5,
"price": 100,
"modifications": [
{}
]
}
],
"comment": "Additional order information: ..."
}
}
|
Name |
Description |
|
feedback |
Type: Feedback Information about the customer's feedback Example
|
|
orderInfo |
Type: OrderInfo Order information Example
|
Feedback
Information about the customer's feedback
|
Name |
Description |
|
createdAt |
Type: string<date-time> The date the feedback was created in the RFC 3339 format from fractional part of seconds (Y-m-d\TH:i:s.uP) Example: |
|
deliveredAt |
Type: string<date-time> The date when the order was delivered in ISO 8601 format without fractional part of seconds (Y-m-d\TH:i:s+hh:ss) Example: |
|
eatsId |
Type: string End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD Example: |
|
orderId |
Type: string Order identifier in the partner's system Example: |
|
rating |
Type: integer The customer's rating for the order is from 1 to 5 |
|
restaurantId |
Type: string The ID of the restaurant in the partner's system Example: |
|
comment |
Type: string Text feedback from the customer on the order Example: |
|
id |
Type: string feedback's ID on the Yandex side Example: |
|
predefinedComment |
Type: string Predefined comments on the Yandex side, selected by the client Example: |
|
takenAt |
Type: string<date-time> The date when the courier picked up the order from the restaurant, in ISO format 8601 without fractional part of seconds (Y-m-d\TH:i:s+hh:ss) Example: |
Example
{
"id": "example",
"createdAt": "1937-01-01T12:00:27.870000+00:20",
"eatsId": "190330-12345678",
"orderId": "example",
"predefinedComment": "example",
"comment": "example",
"restaurantId": "example",
"rating": 5,
"takenAt": "1937-01-01T12:00:27+00:20",
"deliveredAt": "1937-01-01T12:00:27+00:20"
}
DeliveryInfo
|
Name |
Description |
|
clientName |
Type: string Client's name in Yandex service Example: |
Example
{
"clientName": "John Cena"
}
PaymentInfo
|
Name |
Description |
|
total |
Type: number Total order cost |
Example
{
"total": 200.99
}
ModificationsItem
|
Name |
Description |
|
id |
Type: string Modifier ID in the partner's system Example: |
|
price |
Type: number Modifier price for the menu item (e.g., additional sauce) |
|
quantity |
Type: integer Quantity in the order |
|
name |
Type: string Modifier ID in the partner's system Example: |
Example
{
"id": "937c57f6-4508-4858-be7f-20691a16fbb0",
"name": "Utensils",
"quantity": 3,
"price": 100
}
OrderInfoItem
|
Name |
Description |
|
id |
Type: string menu item ID in the partner's system Example: |
|
modifications |
Type: ModificationsItem[] List of selected modifications. May be empty, passed Example
|
|
price |
Type: number Price of one item including modification costs. In the next version, it will be corrected to the net price of the item without modifications |
|
quantity |
Type: number The number of items in the order |
|
name |
Type: string menu item name Example: |
Example
{
"id": "937c57f6-4508-4858-be7f-20691a16fbb0",
"name": "Pizza Pepperoni",
"quantity": 3.5,
"price": 100,
"modifications": [
{
"id": "937c57f6-4508-4858-be7f-20691a16fbb0",
"name": "Utensils",
"quantity": 3,
"price": 100
}
]
}
OrderInfo
Order information
|
Name |
Description |
|
comment |
Type: string Additional order information Example: |
|
createdAt |
Type: string<date-time> The date the review was created in the RFC 3339 format from fractional part of seconds (Y-m-d\TH:i:s.uP) Example: |
|
deliveryInfo |
Type: DeliveryInfo Delivery info Example
|
|
discriminator |
Type: string Type of order delivery: yandex - delivery by Yandex couriers Enum: |
|
items |
Type: OrderInfoItem[] Example
|
|
paymentInfo |
Type: PaymentInfo Example
|
|
platform |
Type: string Platform ID. Const: Example: |
Example
{
"createdAt": "1937-01-01T12:00:27.870000+00:20",
"platform": "YE",
"discriminator": "marketplace",
"deliveryInfo": {
"clientName": "John Cena"
},
"paymentInfo": {
"total": 200.99
},
"items": [
{
"id": "937c57f6-4508-4858-be7f-20691a16fbb0",
"name": "Pizza Pepperoni",
"quantity": 3.5,
"price": 100,
"modifications": [
{
"id": "937c57f6-4508-4858-be7f-20691a16fbb0",
"name": "Utensils",
"quantity": 3,
"price": 100
}
]
}
],
"comment": "Additional order information: ..."
}
Responses
200 OK
The feedback was successfully processed by the restaurant's internal system.
Body
application/json
{
"result": "OK"
}
|
Name |
Description |
|
result |
Type: string Example: |
400 Bad Request
Bad request. An array with an object from the error list is expected in the response body
ErrorItem
|
Name |
Description |
|
code |
Type: integer Error code agreed with Yandex |
|
description |
Type: string Error message Example: |
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: |
500 Internal Server Error
Internal server errors