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
{
  "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

Type: OrderInfo

Order information

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: ..."
}

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: 1937-01-01T12:00:27.870000+00:20

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: 1937-01-01T12:00:27+00:20

eatsId

Type: string

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

Example: 190330-12345678

orderId

Type: string

Order identifier in the partner's system

Example: 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: example

comment

Type: string

Text feedback from the customer on the order

Example: example

id

Type: string

feedback's ID on the Yandex side

Example: example

predefinedComment

Type: string

Predefined comments on the Yandex side, selected by the client

Example: 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: 1937-01-01T12:00:27+00:20

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: John Cena

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: 937c57f6-4508-4858-be7f-20691a16fbb0

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

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: 937c57f6-4508-4858-be7f-20691a16fbb0

modifications

Type: ModificationsItem[]

List of selected modifications. May be empty, passed
explicitly for each individual item in the order. When ordering two
items of the same dish with different sets of modifications, different
items with different modifications lists are passed.

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

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: Pizza Pepperoni

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: Additional order information: ...

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: 1937-01-01T12:00:27.870000+00:20

deliveryInfo

Type: DeliveryInfo

Delivery info

Example
{
  "clientName": "John Cena"
}

discriminator

Type: string

Type of order delivery:

yandex - delivery by Yandex couriers
marketplace - delivery by restaurant couriers
pickup - pickup by the customer from the restaurant

Enum: marketplace, yandex, pickup

items

Type: OrderInfoItem[]

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

paymentInfo

Type: PaymentInfo

Example
{
  "total": 200.99
}

platform

Type: string

Platform ID.

Const: YE

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

500 Internal Server Error

Internal server errors

Body

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

Type: ErrorItem[]

Previous