Update information about the courier
An object containing up-to-date information about the courier is transmitted.
Request
PUT
/order/{orderId}/courier
Path parameters
|
Name |
Description |
|
orderId* |
Type: string Order identifier in the partner's system |
Body
application/json
{
"courier": {
"name": "Pablo",
"type": "pedestrian",
"phone": "+79031111111 ext. 4432",
"status": "accepted"
},
"order": {
"orderNr": "190330-12345678"
},
"location": {
"latitude": "55.68195863024231",
"longitude": "37.58948777728022"
},
"maxPlaceArrivalTime": "1937-01-01T12:00:27.870000+00:20"
}
|
Name |
Description |
|
courier* |
Type: CourierInfoCourier |
|
location* |
Type: CourierInfoLocation |
|
order* |
Type: CourierInfoOrder |
|
maxPlaceArrivalTime |
Type: string<date-time> Estimated time of arrival of the courier at the restaurant Example: |
CourierInfoCourier
|
Name |
Description |
|
name* |
Type: string Courier's name Example: |
|
type* |
Type: string Courier Type:
Default: Enum: |
|
phone |
Type: string Phone number to contact the customer in international format. Consists of parts "+ Example: |
|
status |
Type: string Courier status
Default: Enum: |
CourierInfoLocation
|
Name |
Description |
|
latitude* |
Type: string Example: |
|
longitude* |
Type: string Example: |
CourierInfoOrder
|
Name |
Description |
|
orderNr* |
Type: string End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD Example: |
Responses
204 No Content
Information about the courier has been successfully updated
400 Bad Request
Bad request
OrderStatusPut
|
Name |
Description |
|
status* |
Type: string Order ststus.
Enum: |
|
attributes |
Type: string[] Additional attributes when changing the order status, for example, a sign of payment upon cancellation Example: |
|
comment |
Type: string Description of cancellation reasons (can be empty) Example: Max length: |
|
reason |
Type: string The reason for the cancellation of the order. It is transmitted only with the CANCELLED status Example: |
|
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: |
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: |
404 Not Found
The place was not found
No longer supported, please use an alternative and newer version.