Gets multiple orders

  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 404
    5. Code 422
    6. Code 504

Returns information about orders associated with a particular company. Orders may be filtered by order number or by route ID.

HTTP Request

GET https://courier.yandex.ru/api/v1/companies/{company_id}/orders\
?route_id={integer}\
&number={string}\
&page={integer}\
&types={string}

Path Parameters

company_id *

integer

Company ID used in requests to the Track & Trace API.

company_id *

integer

Company ID used in requests to the Track & Trace API.

Query Parameters

route_id

integer

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

Minimum value: 1.

number

string

Unique order number that matches the number in the delivery company's database.

page

integer

Page number where the entity is stored in the database. Each page contains 1000 entities arranged in ascending order.

Minimum value: 1.
Default value: 1.

types

string

Comma-separated list of point types. Available types are "order", "depot", "garage". Default "order".

route_id

integer

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

Minimum value: 1.

number

string

Unique order number that matches the number in the delivery company's database.

page

integer

Page number where the entity is stored in the database. Each page contains 1000 entities arranged in ascending order.

Minimum value: 1.
Default value: 1.

types

string

Comma-separated list of point types. Available types are "order", "depot", "garage". Default "order".

Responses

Code 200

The list of orders was received.

{
  "address": string,
  "amount": number,
  "comments": string,
  "company_id": integer,
  "confirmed_at": string,
  "customer_name": string,
  "delivered_at": string,
  "description": string,
  "eta_type": string,
  "history": [
    {
      "event": string,
      "position": {
        "lat": number,
        "lon": number,
        "time": string
      },
      "source": {
        "initiator": string
      },
      "time": string,
      "timestamp": number,
      "used_mark_delivered_radius": number
    }
  ],
  "id": integer,
  "lat": number,
  "lon": number,
  "mark_delivered_radius": number,
  "name": string,
  "number": string,
  "order_status_comments": [
    {
      "comment": string,
      "id": integer,
      "status": string
    }
  ],
  "payment_type": string,
  "phone": string,
  "refined_lat": number,
  "refined_lon": number,
  "route_id": integer,
  "service_duration_s": integer,
  "shared_service_duration_s": integer,
  "shared_with_companies": [
    {
      "id": integer,
      "name": string,
      "number": string
    }
  ],
  "shared_with_company_ids": [
    number
  ],
  "status": string,
  "status_log": [
    {
      "point": {
        "lat": number,
        "lon": number
      },
      "status": string,
      "timestamp": number
    }
  ],
  "time_interval": string,
  "time_interval_secs": [
    number
  ],
  "time_window": {
    "end": string,
    "start": string
  },
  "time_zone": string,
  "type": string,
  "volume": number,
  "weight": number
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

address

string

Depot address in text format.

description

string

Depot description.

id

integer

Depot ID used in requests to the Track & Trace API.

lat

number

Latitude of depot location.

lon

number

Longitude of depot location.

name

string

Depot name.

number

string

Depot number. Used for syncing with the delivery company's system.

route_id

integer

Route ID.

time_interval

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

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

string

Node type. Always equals depot.

address

string

Garage address in text format.

id

string

Garage identifier.

lat

number

Latitude of garage location.

lon

number

Longitude of garage location.

number

string

Garage number.

route_id

integer

Route ID.

type

string

Node type. Always equals garage.

address

string

Delivery address in text format.

amount

number

Order price in rubles.

comments

string

Order comments.

company_id

integer

Company ID used in requests to the Track & Trace API.

confirmed_at

string

Time when the order was agreed.

customer_name

string

Recipient's name.

delivered_at

string

The time when information about the order was recorded in Track & Trace API.

description

string

Order description.

eta_type

string

ETA type. Affects the time of notification and automatic delivery detection. arrival_time: countdown starts from the moment the courier arrives at the point; delivery_time: countdown does not start until the start of the delivery window.

history[]

array

History of events that change the order status.

history[].event

string

Name of the event that occurred. Possible values: ORDER_CREATED, START, ORDER_BECAME_NEXT, STATUS_UPDATE, INTERVAL_UPDATE, ARRIVAL, ORDER_VISIT, DEPARTURE.

history[].position

object

Courier position. Appears only in events ARRIVAL, ORDER_VISIT, DEPARTURE.

history[].position.lat

number

Courier position latitude.

history[].position.lon

number

Courier position longitude.

history[].position.time

string

The client time of the event in ISO 8601 format.

history[].source

object

Source of the event. Appears only in event STATUS_UPDATE.

history[].source.initiator

string

Initiator of the event, possible values: yandex, app, user_api.

history[].time

string

Event time in ISO 8601 format.

history[].timestamp

number

Event time (UNIX timestamp).

history[].used_mark_delivered_radius

number

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.

Minimum value: 0.
Maximum value: 2000.

id

integer

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

lat

number

Latitude of the delivery point.

lon

number

Longitude of the delivery point.

mark_delivered_radius

number

Radius in meters. If null, depot.mark_delivered_radius or company.mark_delivered_radius is used instead. Order is marked as delivered automatically if mark_delivered_enabled is true and vehicle spent at least mark_delivered_service_time_coefficient * (order.service_duration_s + order.shared_service_duration_s) seconds within mark_delivered_radius meters from the order's location.

Minimum value: 0.
Maximum value: 2000.

number

string

Order number. Used for syncing with the delivery company's system.

order_status_comments[]

array

order_status_comments[].comment

string

Comment for order status update event.

order_status_comments[].id

integer

ID of the order status update event.

order_status_comments[].status

string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished
    only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

payment_type

string

Payment type. Possible values:

  • cash — The order will be paid in cash.
  • card — The order will be paid using bank card.
  • prepaid — The order is paid and no additional payment is needed.

phone

string

The recipient's phone number.

refined_lat

number

Latitude of the real (refined by courier) delivery point.

refined_lon

number

Logitude of the real (refined by courier) delivery point.

route_id

integer

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

service_duration_s

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

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[]

array

shared_with_companies[].name

string

Company name.

shared_with_companies[].number *

string

Company number.

shared_with_companies[].id

integer

Company ID used in requests to the Track & Trace API.

shared_with_company_ids[]

array

IDs of the companies that can access the order information. The following information is provided:

  • Full information about the order.
  • General description of the route this order is a part of.
  • General description of the depot used in this order.
  • General information about the delivery company (name and logo).
    If both shared_with_company_numbers and shared_with_company_ids are specified shared_with_company_numbers is used.

status

string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished
    only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

status_log[]

array

status_log[].point

object

status_log[].point.lat

number

Latitude of the point where changes were made.

status_log[].point.lon

number

Longitude of the point where changes were made.

status_log[].status

string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished
    only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

status_log[].timestamp

number

The time when changes were made (UNIX timestamp).

time_interval

string

Desired delivery time interval. The following formats are supported:

  • "T - T" or "T-T", where T is the time in HH, HH:MM, or HH:MM:SS format.
  • ISO 8601, for example, 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00.

time_interval_secs[]

array

time_interval value converted into seconds from midnight.

time_window

object

Allowed time window to visit location, in ISO 8601 format.

time_window.end

string

time_window.start

string

type

string

Node type. Always equals order.

volume

number

Order volume.

weight

number

Order weight.

address

string

Depot address in text format.

description

string

Depot description.

id

integer

Depot ID used in requests to the Track & Trace API.

lat

number

Latitude of depot location.

lon

number

Longitude of depot location.

name

string

Depot name.

number

string

Depot number. Used for syncing with the delivery company's system.

route_id

integer

Route ID.

time_interval

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

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

string

Node type. Always equals depot.

address

string

Garage address in text format.

id

string

Garage identifier.

lat

number

Latitude of garage location.

lon

number

Longitude of garage location.

number

string

Garage number.

route_id

integer

Route ID.

type

string

Node type. Always equals garage.

address

string

Delivery address in text format.

amount

number

Order price in rubles.

comments

string

Order comments.

company_id

integer

Company ID used in requests to the Track & Trace API.

confirmed_at

string

Time when the order was agreed.

customer_name

string

Recipient's name.

delivered_at

string

The time when information about the order was recorded in Track & Trace API.

description

string

Order description.

eta_type

string

ETA type. Affects the time of notification and automatic delivery detection. arrival_time: countdown starts from the moment the courier arrives at the point; delivery_time: countdown does not start until the start of the delivery window.

history[]

array

History of events that change the order status.

history[].event

string

Name of the event that occurred. Possible values: ORDER_CREATED, START, ORDER_BECAME_NEXT, STATUS_UPDATE, INTERVAL_UPDATE, ARRIVAL, ORDER_VISIT, DEPARTURE.

history[].position

object

Courier position. Appears only in events ARRIVAL, ORDER_VISIT, DEPARTURE.

history[].position.lat

number

Courier position latitude.

history[].position.lon

number

Courier position longitude.

history[].position.time

string

The client time of the event in ISO 8601 format.

history[].source

object

Source of the event. Appears only in event STATUS_UPDATE.

history[].source.initiator

string

Initiator of the event, possible values: yandex, app, user_api.

history[].time

string

Event time in ISO 8601 format.

history[].timestamp

number

Event time (UNIX timestamp).

history[].used_mark_delivered_radius

number

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.

Minimum value: 0.
Maximum value: 2000.

id

integer

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

lat

number

Latitude of the delivery point.

lon

number

Longitude of the delivery point.

mark_delivered_radius

number

Radius in meters. If null, depot.mark_delivered_radius or company.mark_delivered_radius is used instead. Order is marked as delivered automatically if mark_delivered_enabled is true and vehicle spent at least mark_delivered_service_time_coefficient * (order.service_duration_s + order.shared_service_duration_s) seconds within mark_delivered_radius meters from the order's location.

Minimum value: 0.
Maximum value: 2000.

number

string

Order number. Used for syncing with the delivery company's system.

order_status_comments[]

array

order_status_comments[].comment

string

Comment for order status update event.

order_status_comments[].id

integer

ID of the order status update event.

order_status_comments[].status

string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished
    only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

payment_type

string

Payment type. Possible values:

  • cash — The order will be paid in cash.
  • card — The order will be paid using bank card.
  • prepaid — The order is paid and no additional payment is needed.

phone

string

The recipient's phone number.

refined_lat

number

Latitude of the real (refined by courier) delivery point.

refined_lon

number

Logitude of the real (refined by courier) delivery point.

route_id

integer

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

service_duration_s

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

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[]

array

shared_with_companies[].name

string

Company name.

shared_with_companies[].number *

string

Company number.

shared_with_companies[].id

integer

Company ID used in requests to the Track & Trace API.

shared_with_company_ids[]

array

IDs of the companies that can access the order information. The following information is provided:

  • Full information about the order.
  • General description of the route this order is a part of.
  • General description of the depot used in this order.
  • General information about the delivery company (name and logo).
    If both shared_with_company_numbers and shared_with_company_ids are specified shared_with_company_numbers is used.

status

string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished
    only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

status_log[]

array

status_log[].point

object

status_log[].point.lat

number

Latitude of the point where changes were made.

status_log[].point.lon

number

Longitude of the point where changes were made.

status_log[].status

string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished
    only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

status_log[].timestamp

number

The time when changes were made (UNIX timestamp).

time_interval

string

Desired delivery time interval. The following formats are supported:

  • "T - T" or "T-T", where T is the time in HH, HH:MM, or HH:MM:SS format.
  • ISO 8601, for example, 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00.

time_interval_secs[]

array

time_interval value converted into seconds from midnight.

time_window

object

Allowed time window to visit location, in ISO 8601 format.

time_window.end

string

time_window.start

string

type

string

Node type. Always equals order.

volume

number

Order volume.

weight

number

Order weight.

Code 401

Authorization error. Make sure that the request header contains the correct OAuth token.

Code 403

You do not have access to this object.

Code 404

Provided route_id does not exist.

Code 422

Incorrect input. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.