Gets positions of courier on the route for the time interval

Gets positions of courier on the route for the specified time interval. The interval is not longer than 2 hours.

Request

GET

https://courier.yandex.ru/api/v2/companies/{company_id}/routes/{route_id}/courier-positions

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company.

route_id*

Type: integer

Route ID that is used in requests to the Track & Trace API.

Query parameters

Name

Description

from*

Type: integer

Start of interval for the courier positions, in unix timestamp.

to

Type: integer

Finish of interval for the courier positions, in unix timestamp.

Responses

200 OK

Success.

Body

application/json
[
    {
        "lat": 0,
        "lon": 0,
        "timestamp": 0,
        "server_timestamp": 0
    }
]

CourierPositionsListV2[]

CourierPositionsListV2

Name

Description

lat*

Type: number<float>

Latitude of position.

lon*

Type: number<float>

Longitude of position.

timestamp*

Type: number<integer>

Unix timestamp of position.

server_timestamp

Type: number<integer>

Unix timestamp of receiving position by server.

400 Bad Request

Time interval has invalid format.

401 Unauthorized

Authorization failed. Send the correct OAuth token in the authorization header.

403 Forbidden

You do not have access to this object.

422 Unprocessable Entity

Incorrect input.

504 Gateway Timeout

Server error during request processing.