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 Example: `` |
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 Example
|
|
location |
Type: CourierInfoLocation Example
|
|
order |
Type: CourierInfoOrder Example
|
|
maxPlaceArrivalTime |
Type: string<date-time> Estimated time of arrival of the courier at the restaurant Example: |
PhoneNumber
Phone number to contact the customer in international format. Consists of parts "+
Type: string
Example: +79031111111 ext. 4432
CourierInfoCourier
|
Name |
Description |
|
name |
Type: string Courier's name Example: |
|
type |
Type: string Courier Type:
Default: Enum: |
|
phone |
Type: PhoneNumber Phone number to contact the customer in international format. Consists of parts "+ Example: |
|
status |
Type: string Courier status
Default: Enum: |
Example
{
"name": "Pablo",
"type": "pedestrian",
"phone": "+79031111111 ext. 4432",
"status": "accepted"
}
CourierInfoOrder
|
Name |
Description |
|
orderNr |
Type: string End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD Example: |
Example
{
"orderNr": "190330-12345678"
}
CourierInfoLocation
|
Name |
Description |
|
latitude |
Type: string Example: |
|
longitude |
Type: string Example: |
Example
{
"latitude": "55.68195863024231",
"longitude": "37.58948777728022"
}
Responses
204 No Content
Information about the courier has been successfully updated
400 Bad Request
Bad request
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: |
404 Not Found
The place was not found