Edits multiple orders
Adds information about new orders to the database or updates information about existing ones if their numbers match.
Request
POST
https://courier.yandex.ru/api/v1/companies/{company_id}/orders-batch
Path parameters
Name |
Description |
company_id* |
Type: integer Company ID used in requests to the Track & Trace API. |
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,
"time_interval": "string",
"route_number": "string",
"shared_with_company_numbers": [
"string"
],
"type": "string",
"show_yandex_pay_button": false,
"refined_lat": 0,
"refined_lon": 0,
"notifications": [
{
"type": "before_arrival"
}
]
}
]
OrdersBatch
Order for batch operations. For an existing order you should specify 'number'. For a new order you should specify 'number', 'time_interval', 'address', 'lat', 'lon', and also 'route_number' or 'route_id'.
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. |
customer_name |
Type: string Recipient's name. Max length: |
customer_number |
Type: string Customer's number in the delivery company database. Max length: |
description |
Type: string Order description. Max length: |
eta_type |
Type: string ETA type. Affects the time of notification and automatic delivery detection. Default: |
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: |
notifications |
Type: RouteOrderNotification[] List of push notification settings. |
number |
Type: string Order number. Used for syncing with the delivery company's system. Max length: |
payment_status |
Type: string Payment status. Possible values:
Enum: |
payment_type |
Type: string Payment method. 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. |
route_number |
Type: string Route number. Used for syncing with the delivery company's system. You must specify |
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_company_ids |
Type: number[] IDs of the companies that can access the order information. The following information is provided:
|
shared_with_company_numbers |
Type: string[] Numbers of the companies that can access the order information. The following information is provided:
|
show_yandex_pay_button |
Type: boolean Show Yandex Pay button. |
status |
Type: string The current order status. Possible values:
|
time_interval |
Type: string Desired delivery time interval. The following formats are supported:
|
type |
Type: string Type of order. Possible values |
volume |
Type: number<float> Order volume. |
weight |
Type: number<float> Order weight. |
RouteOrderNotification
Name |
Description |
type |
Type: string Notification type. Enum: |
Responses
200 OK
Information about orders was registered or updated in the database.
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.