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`/
topair sent at different times returns the same list of notification objects,
toshould be at least two minutes in the past. Maximum allowed time interval between
fromand
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. |
* Required parameter
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: |
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: |
* Required parameter
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
Fields
eta | string ETA to the destination when the notification object is created, in ISO 8601 format. May return |
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 |
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. |
* Required parameter
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