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

CourierInfoCourier

Name

Description

name*

Type: string

Courier's name

Example: Pablo

type*

Type: string

Courier Type:

  • pedestrian
  • bicycle
  • vehicle
  • motorcycle
  • electric_bicycle
  • rover (delivery robot).

Default: pedestrian

Enum: pedestrian, bicycle, vehicle, motorcycle, electric_bicycle, rover

phone

Type: string

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

Example: +79031111111 ext. 4432

status

Type: string

Courier status

  • accepted - the courier accepted the order.
  • arrived_to_source - The courier arrived at the place..
  • taken - the courier took the order.
  • arrived_to_destination - the courier arrived to the client.
  • finished - order is delivered.

Default: accepted

Enum: accepted, arrived_to_source, taken, arrived_to_destination, finished

CourierInfoLocation

Name

Description

latitude*

Type: string

Example: 55.68195863024231

longitude*

Type: string

Example: 37.58948777728022

CourierInfoOrder

Name

Description

orderNr*

Type: string

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

Example: 190330-12345678

Responses

204 No Content

Information about the courier has been successfully updated

400 Bad Request

Bad request

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 place was not found

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