Gets order notifications

Gets a list of order notifications objects that were created within the specified time interval. To guarantee that a request with the same from/to pair sent at different times returns the same list of notification objects, to should be at least two minutes in the past. Maximum allowed time interval between from and to is 30 minutes.

Request

GET

https://courier.yandex.ru/api/v1/companies/{company_id}/order-notifications

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company that is used in requests to the Track & Trace API.

Query parameters

Name

Description

from*

Type: string<datetime>

The start of the time interval for which notifications are requested, in ISO 8601 format. Example - '2020-09-06T10:15:00+03:00'.

to*

Type: string<datetime>

The end of the time interval for which notifications are requested, in ISO 8601 format. Example - '2020-09-06T10:20:00+03:00'.

page

Type: integer

Database page number. Each page holds 1000 notification objects ordered by the time of creation.

Default: 1

Min value: 1

Responses

200 OK

List of notification objects that were created between from and to (from <= time of creation < to). Notification objects are provided both for orders owned by the company and orders shared with the company.

Body

application/json
[
    {
        "id": 0,
        "type": "string",
        "eta": "string",
        "time": "2020-03-06T14:15:10.000Z",
        "widget_url": "string",
        "order_id": 0,
        "order_number": "string",
        "route_id": 0,
        "route_number": "string",
        "owner_company_id": 0,
        "owner_company_name": "string"
    }
]

OrderNotificationsItem[]

OrderNotificationsItem

Name

Description

eta

Type: string

ETA to the destination when the notification object is created, in ISO 8601 format. May return null if a courier broke the predefined order sequence or if ETA has not been computed yet.

id

Type: integer

Notification ID.

order_id

Type: integer

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

order_number

Type: string

Order number in the delivery company database.

owner_company_id

Type: integer

The ID of the company that created the order.

owner_company_name

Type: string

The name of the company that created the order.

route_id

Type: integer

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

route_number

Type: string

Route number in the delivery company database.

time

Type: string<datetime>

The server time of the notification object creation, in ISO 8601 format.

Example: Fri Mar 06 2020 17:15:10 GMT+0300 (Moscow Standard Time)

type

Type: string

Notification type. Possible values: shift_start, nearby.

widget_url

Type: string

Vehicle tracking widget URL.

401 Unauthorized

Deprecated

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

403 Forbidden

Deprecated

You do not have access to this object.

422 Unprocessable Entity

Deprecated

Incorrect input. For example, from and to are more than 30 minutes apart.

Previous