Gets order
Returns information about the order by its ID.
Request
GET
https://courier.yandex.ru/api/v1/companies/{company_id}/orders/{order_id}
Path parameters
Name |
Description |
company_id* |
Type: integer Company ID used in requests to the Track & Trace API. |
order_id* |
Type: integer Order ID used in requests to the Track & Trace API. |
Responses
200 OK
Order information received.
Body
application/json
{
"address": "string",
"amount": 0,
"comments": "string",
"customer_name": "string",
"description": "string",
"lat": 0,
"lon": 0,
"number": "string",
"customer_number": "string",
"payment_type": "cash",
"payment_status": "paid",
"phone": "string",
"route_id": 0,
"service_duration_s": 0,
"shared_service_duration_s": 0,
"status": "string",
"volume": 0,
"weight": 0,
"shared_with_company_ids": [
0
],
"mark_delivered_radius": null,
"eta_type": null,
"company_id": 0,
"confirmed_at": "string",
"delivered_at": "string",
"history": [
{
"event": "string",
"timestamp": 0,
"time": "2019-05-27T14:18:52.000Z",
"position": {
"lat": 0,
"lon": 0,
"time": "string"
},
"used_mark_delivered_radius": 0,
"source": {
"initiator": "string"
}
}
],
"id": 0,
"status_log": [
{
"point": {
"lat": 0,
"lon": 0
},
"status": "string",
"timestamp": 0
}
],
"shared_with_companies": [
{
"number": "string",
"name": "string",
"id": 0
}
],
"order_status_comments": [
{
"id": 0,
"status": "string",
"comment": "string"
}
],
"refined_lat": 0,
"refined_lon": 0,
"time_interval": "string",
"time_interval_secs": [
0
],
"time_window": {
"start": "2019-03-06T14:15:00.000Z",
"end": "2019-03-06T14:16:30.000Z"
}
}
Name |
Description |
address |
Type: string Delivery address in text format. |
amount |
Type: number<float> Order price in rubles. Min value: |
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. Default: |
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 Default: Min value: 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. |
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. Min value: 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
Error accessing the object. The user doesn't have the rights to access the object.
404 Not Found
Object search error. Object not found.
422 Unprocessable Entity
Incorrect input. The operation can't be performed.
504 Gateway Timeout
Error working with the API. Repeat the request.
No longer supported, please use an alternative and newer version.