Edits multiple orders

  1. HTTP Request
  2. Path Parameters
  3. Request Body
    1. Representation
    2. Fields
  4. Responses
    1. Code 200
    2. Code 401
    3. Code 403
    4. Code 404
    5. Code 422
    6. Code 504

Adds information about new orders to the database or updates information about existing ones if their numbers match.

HTTP Request

POST https://courier.yandex.ru/api/v1/companies/{company_id}/orders-batch

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.

Request Body

[
  {
    "address": string,
    "amount": number,
    "comments": string,
    "customer_name": string,
    "customer_number": string,
    "description": string,
    "eta_type": string,
    "lat": number,
    "lon": number,
    "mark_delivered_radius": number,
    "number": string,
    "payment_type": string,
    "phone": string,
    "refined_lat": number,
    "refined_lon": number,
    "route_id": integer,
    "route_number": string,
    "service_duration_s": integer,
    "shared_service_duration_s": integer,
    "shared_with_company_ids": [
      number
    ],
    "shared_with_company_numbers": [
      string
    ],
    "status": string,
    "time_interval": string,
    "type": string,
    "volume": number,
    "weight": number
  }
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

address

string

Delivery address in text format.

amount

number

Order price in rubles.

comments

string

Order comments.

customer_name

string

Recipient's name.

customer_number

string

Customer's number in the delivery company database.

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.

lat

number

Latitude of the delivery point.

lon

number

Longitude of the delivery point.

mark_delivered_radius

number

Radius in meters. If null, 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: 500.

number

string

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

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.

route_number

string

Route number. Used for syncing with the delivery company's system. You must specify route_id or route_number in the request to create a new order. If both route_id or route_number are specified route_number is used.

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_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.

shared_with_company_numbers[]

array

Numbers 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.

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.

type

string

Type of order. Possible values delivery, pickup, drop_off.

volume

number

Order volume.

weight

number

Order weight.

address

string

Delivery address in text format.

amount

number

Order price in rubles.

comments

string

Order comments.

customer_name

string

Recipient's name.

customer_number

string

Customer's number in the delivery company database.

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.

lat

number

Latitude of the delivery point.

lon

number

Longitude of the delivery point.

mark_delivered_radius

number

Radius in meters. If null, 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: 500.

number

string

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

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.

route_number

string

Route number. Used for syncing with the delivery company's system. You must specify route_id or route_number in the request to create a new order. If both route_id or route_number are specified route_number is used.

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_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.

shared_with_company_numbers[]

array

Numbers 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.

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.

type

string

Type of order. Possible values delivery, pickup, drop_off.

volume

number

Order volume.

weight

number

Order weight.

Responses

Code 200

Information about orders was registered or updated in the database.

Code 401

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

Code 403

Error accessing the object. The user doesn't have the rights to access the object.

Code 404

Object search error. Object not found.

Code 422

Incorrect input. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.