Gets order notifications

  1. HTTP Request
  2. Path Parameters
  3. Query Parameters
  4. Responses
    1. Code 200
      1. Representation
      2. Fields
    2. Code 401
    3. Code 403
    4. Code 422
  5. Example

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.

HTTP Request

GET https://courier.yandex.ru/api/v1/companies/{company_id}/order-notifications\
?from={string}\
&to={string}\
&page={integer}

Path Parameters

company_id *

integer

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

company_id *

integer

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

Query Parameters

from *

string

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

to *

string

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

page

integer

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

Minimum value: 1.
Default value: 1.

from *

string

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

to *

string

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

page

integer

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

Minimum value: 1.
Default value: 1.

Responses

Code 200

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.

[
  {
    "eta": string,
    "id": integer,
    "order_id": integer,
    "order_number": string,
    "owner_company_id": integer,
    "owner_company_name": string,
    "route_id": integer,
    "route_number": string,
    "time": string,
    "type": string,
    "widget_url": string
  }
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

eta

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

integer

Notification ID.

order_id

integer

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

order_number

string

Order number in the delivery company database.

owner_company_id

integer

The ID of the company that created the order.

owner_company_name

string

The name of the company that created the order.

route_id

integer

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

route_number

string

Route number in the delivery company database.

time

string

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

type

string

Notification type. Possible values: shift_start, nearby.

widget_url

string

Vehicle tracking widget URL.

eta

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

integer

Notification ID.

order_id

integer

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

order_number

string

Order number in the delivery company database.

owner_company_id

integer

The ID of the company that created the order.

owner_company_name

string

The name of the company that created the order.

route_id

integer

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

route_number

string

Route number in the delivery company database.

time

string

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

type

string

Notification type. Possible values: shift_start, nearby.

widget_url

string

Vehicle tracking widget URL.

Code 401

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

Code 403

You do not have access to this object.

Code 422

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

Example

Responses:

{
  "time": "2020-03-06T17:15:10+03:00"
}
Copied to clipboard