Gets multiple orders
Returns information about orders associated with a particular company. Orders may be filtered by order number or by route ID.
Request
GET
https://courier.yandex.ru/api/v1/companies/{company_id}/orders
Path parameters
Name |
Description |
company_id* |
Type: integer Company ID used in requests to the Track & Trace API. |
Query parameters
Name |
Description |
number |
Type: string Unique order number that matches the number in the delivery company's database. |
page |
Type: integer Page number where the entity is stored in the database. Each page contains 1000 entities arranged in ascending order. Default: Min value: |
route_id |
Type: integer The ID of the route that is used in requests to the Track & Trace API. Min value: |
types |
Type: string<list_of_types> Comma-separated list of point types. Available types are |
Responses
200 OK
The list of orders was received.
Body
application/json
[
{
"address": "string",
"description": "string",
"id": 0,
"lat": 0,
"lon": 0,
"name": "string",
"number": "string",
"time_interval": "string",
"time_zone": "string",
"route_id": 0,
"type": "string"
}
]
(OrdersNodeDepot or OrdersNodeGarage or OrdersNodeOrder)[]
OrdersNodeDepot
Name |
Description |
address |
Type: string Depot address in text format. Max length: |
description |
Type: string Depot description. Max length: |
id |
Type: integer Depot ID used in requests to the Track & Trace API. |
lat |
Type: number<float> Latitude of depot location. |
lon |
Type: number<float> Longitude of depot location. |
name |
Type: string Depot name. |
number |
Type: string Depot number. Used for syncing with the delivery company's system. |
route_id |
Type: integer Route ID. |
time_interval |
Type: string Depot opening hours, in "T - T" or "T-T" time format, where T represents time in HH, HH:MM, HH:MM:SS or [d.]HH:MM:SS format. |
time_zone |
Type: string Time zone of depot in tz database format, for example Europe/Moscow, Europe/Berlin, Asia/Irkutsk, Asia/Istanbul. Visit https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for more examples. By default, the depot time zone is calculated based on its coordinates. |
type |
Type: string Node type. Always equals |
OrdersNodeGarage
Name |
Description |
address |
Type: string Garage address in text format. |
id |
Type: string Garage identifier. |
lat |
Type: number<float> Latitude of garage location. |
lon |
Type: number<float> Longitude of garage location. |
number |
Type: string Garage number. |
route_id |
Type: integer Route ID. |
type |
Type: string Node type. Always equals |
OrdersNodeOrder
Name |
Description |
address |
Type: string Delivery address in text format. |
amount |
Type: number<float> Order price in rubles. |
comments |
Type: string Order comments. |
company_id |
Type: integer Company ID used in requests to the Track & Trace API. |
confirmed_at |
Type: string<datetime> Time when the order was agreed. |
customer_name |
Type: string Recipient's name. Max length: |
customer_number |
Type: string Customer's number in the delivery company database. Max length: |
delivered_at |
Type: string<datetime> The time when information about the order was recorded in Track & Trace API. |
description |
Type: string Order description. Max length: |
eta_type |
Type: string ETA type. Affects the time of notification and automatic delivery detection. |
history |
Type: OrderHistoryItem[] History of events that change the order status. |
id |
Type: integer The ID of the order that is used in requests to the Track & Trace API. |
lat |
Type: number<float> Latitude of the delivery point. |
lon |
Type: number<float> Longitude of the delivery point. |
mark_delivered_radius |
Type: number<float> Radius in meters. If Max value: |
number |
Type: string Order number. Used for syncing with the delivery company's system. Max length: |
order_status_comments |
Type: OrderStatusUpdateComment[] |
payment_status |
Type: string Payment status. Possible values:
Enum: |
payment_type |
Type: string Payment type. Possible values:
Enum: |
phone |
Type: string The recipient's phone number. |
refined_lat |
Type: number<float> Latitude of the real (refined by courier) delivery point. |
refined_lon |
Type: number<float> Logitude of the real (refined by courier) delivery point. |
route_id |
Type: integer Route ID used in requests to the Track & Trace API. |
service_duration_s |
Type: integer Expected time the courier will need to pass the order to the recipient, including going up to the floor and receiving payment. Default value: 600 seconds. |
shared_service_duration_s |
Type: integer Service duration at the location, which can be shared with other orders at the same location. Shared service duration can include operations as parking a car, delivering documents, etc. Default value: 0 seconds. |
shared_with_companies |
Type: CompanyNumber[] |
shared_with_company_ids |
Type: number[] IDs of the companies that can access the order information. The following information is provided:
|
status |
Type: string The current order status. Possible values:
|
status_log |
Type: StatusLog[] |
time_interval |
Type: string Desired delivery time interval. The following formats are supported:
|
time_interval_secs |
Type: number[]
|
time_window |
Type: OrderGetWithNotificatons_time_window Allowed time window to visit location, in ISO 8601 format. |
type |
Type: string Node type. Always equals |
volume |
Type: number<float> Order volume. |
weight |
Type: number<float> Order weight. |
OrderHistoryItem
Name |
Description |
event |
Type: string Name of the event that occurred. Possible values: ORDER_CREATED, START, ORDER_BECAME_NEXT, STATUS_UPDATE, INTERVAL_UPDATE, ARRIVAL, ORDER_VISIT, DEPARTURE. |
position |
Type: OrderHistoryPosition Courier position. Appears only in events ARRIVAL, ORDER_VISIT, DEPARTURE. |
source |
Type: OrderStatusUpdateSource Source of the event. Appears only in event STATUS_UPDATE. |
time |
Type: string<datetime> Event time in ISO 8601 format. The time zone of the order is used. Example: |
timestamp |
Type: number<float> Event time (UNIX timestamp). |
used_mark_delivered_radius |
Type: number<float> The value of order.mark_delivered_radius or depot.mark_delivered_radius or company.mark_delivered_radius that was used to mark the order as visited. Appears only in events ARRIVAL, ORDER_VISIT, DEPARTURE. Max value: |
OrderStatusUpdateComment
Name |
Description |
comment |
Type: string Comment for order status update event. |
id |
Type: integer ID of the order status update event. |
status |
Type: string The current order status. Possible values:
|
CompanyNumber
Name |
Description |
number* |
Type: string Company number. |
id |
Type: integer Company ID used in requests to the Track & Trace API. |
name |
Type: string Company name. Max length: |
StatusLog
Name |
Description |
point |
Type: StatusLogLocation |
status |
Type: string The current order status. Possible values:
|
timestamp |
Type: number<float> The time when changes were made (UNIX timestamp). |
OrderGetWithNotificatons_time_window
Allowed time window to visit location, in ISO 8601 format.
Name |
Description |
end |
Type: string<datetime> Example: |
start |
Type: string<datetime> Example: |
OrderHistoryPosition
Courier position. Appears only in events ARRIVAL, ORDER_VISIT, DEPARTURE.
Name |
Description |
lat |
Type: number<float> Courier position latitude. |
lon |
Type: number<float> Courier position longitude. |
time |
Type: string<datetime> The client time of the event in ISO 8601 format. |
OrderStatusUpdateSource
Source of the event. Appears only in event STATUS_UPDATE.
Name |
Description |
initiator |
Type: string Initiator of the event, possible values: yandex, app, user_api. |
StatusLogLocation
Name |
Description |
lat |
Type: number<float> Latitude of the point where changes were made. |
lon |
Type: number<float> Longitude of the point where changes were made. |
401 Unauthorized
Authorization error. Make sure that the request header contains the correct OAuth token.
403 Forbidden
You do not have access to this object.
404 Not Found
Provided route_id does not exist.
422 Unprocessable Entity
Incorrect input. The operation can't be performed.
504 Gateway Timeout
Error working with the API. Repeat the request.