- Request
- Query parameters
- Headers
- Body
- RequestInfo
- PlatformStation
- TimestampUTC
- TimeIntervalUTC
- SourceRequestNode
- LocationDetails
- CustomLocation
- DestinationRequestNode
- ItemBillingDetails
- ItemPhysicalDimensions
- RequestResourceItem
- PlacePhysicalDimensions
- ResourcePlace
- PaymentMethod
- VariableDeliveryCostForRecipientItem
- VariableDeliveryCostForRecipient
- BillingInfo
- Contact
- LastMilePolicy
- Responses
- 200 OK
- 400 Bad Request
3.11. Создание заказа
Создание заказа на ближайшее доступное время.
Request
POST
b2b.taxi.tst.yandex.net/api/b2b/platform/request/create
Тестовое окружение
POST
b2b-authproxy.taxi.yandex.net/api/b2b/platform/request/create
Продакшен-окружение
Query parameters
|
Name |
Description |
|
send_unix |
Type: boolean Формат времени, в котором нужно отправить интервалы доставки (true - unix, false - utc) |
Headers
|
Name |
Description |
|
Accept-Language |
Type: string Язык ответа Example: `` |
Body
application/json
{
"info": {
"operator_request_id": "example",
"merchant_id": "example",
"comment": "example"
},
"source": {
"platform_station": {
"platform_id": "example"
},
"interval_utc": {
"from": "2021-10-25T15:00:00.000000Z",
"to": null
}
},
"destination": {
"type": "platform_station",
"platform_station": null,
"custom_location": {
"latitude": 0.5,
"longitude": 0.5,
"details": {
"geoId": 213,
"country": "Россия",
"region": "Москва",
"subRegion": "example",
"locality": "Москва",
"street": "Пролетарский проспект",
"house": "19",
"housing": "example",
"apartment": "example",
"building": "example",
"comment": "example",
"full_address": "Москва, Пролетарский проспект, 19",
"postal_code": "example"
}
},
"interval_utc": null
},
"items": [
{
"count": 0,
"name": "example",
"article": "example",
"marking_code": "example",
"uin": "example",
"billing_details": {
"inn": "example",
"nds": 0,
"unit_price": 0,
"assessed_unit_price": 0
},
"physical_dims": {
"dx": 0,
"dy": 0,
"dz": 0,
"predefined_volume": 0
},
"place_barcode": "example",
"cargo_types": "[\"80\"]",
"fitting": false
}
],
"places": [
{
"physical_dims": {
"weight_gross": 0,
"dx": 0,
"dy": 0,
"dz": 0,
"predefined_volume": 0
},
"barcode": "example",
"description": "example"
}
],
"billing_info": {
"payment_method": "already_paid",
"delivery_cost": 0,
"variable_delivery_cost_for_recipient": [
{
"min_cost_of_accepted_items": 1,
"delivery_cost": 0
}
]
},
"recipient_info": {
"first_name": "example",
"last_name": "example",
"patronymic": "example",
"phone": "example",
"email": "example"
},
"last_mile_policy": "time_interval",
"particular_items_refuse": false,
"forbid_unboxing": false
}
|
Name |
Description |
|
billing_info |
Type: BillingInfo Данные для биллинга Example
|
|
destination |
Type: DestinationRequestNode Информация о точке получения заказа Example
|
|
info |
Type: RequestInfo Базовый набор метаданных по запросу Example
|
|
items |
Type: RequestResourceItem[] Информация о предметах в заказе Min items: Example
|
|
last_mile_policy |
Type: LastMilePolicy Требуемый способ доставки Типы полиси доставки последней мили. Может принимать значение только из enum. Enum: |
|
places |
Type: ResourcePlace[] Информация о местах в заказе Min items: Example
|
|
recipient_info |
Type: Contact Данные о получателе Example
|
|
source |
Type: SourceRequestNode Информация о точке отправления заказа Example
|
|
forbid_unboxing |
Type: boolean Запрет на вскрытие транспортной упаковки Default: |
|
particular_items_refuse |
Type: boolean Разрешен ли частичный выкуп Default: |
RequestInfo
|
Name |
Description |
|
operator_request_id |
Type: string Идентификатор заказа у отправителя Example: |
|
comment |
Type: string Опциональный коментарий Example: |
|
merchant_id |
Type: string ID мерчанта-отправителя. Значение Example: |
Example
{
"operator_request_id": "example",
"merchant_id": "example",
"comment": "example"
}
PlatformStation
|
Name |
Description |
|
platform_id |
Type: string Идентификатор станции в Логистической платформе (например, склад отгрузки или ПВЗ) Example: |
Example
{
"platform_id": "example"
}
TimestampUTC
Type: string
Example: 2021-10-25T15:00:00.000000Z
TimeIntervalUTC
Интервал времени в формате UTC.
|
Name |
Description |
|
from |
Type: TimestampUTC UTC timestamp для нижней границы интервала Example: |
|
to |
Type: TimestampUTC UTC timestamp для верхней границы интервала Example: |
Example
{
"from": "2021-10-25T15:00:00.000000Z",
"to": null
}
SourceRequestNode
|
Name |
Description |
|
platform_station |
Type: PlatformStation Описание целевой станции в случае, если она зарегистрирована в платформе Example
|
|
interval_utc |
Type: TimeIntervalUTC Временной интервал (в UTC) Интервал времени в формате UTC. Example
|
Example
{
"platform_station": {
"platform_id": "example"
},
"interval_utc": {
"from": "2021-10-25T15:00:00.000000Z",
"to": null
}
}
LocationDetails
Адрес квартиры обязателен при наличии
|
Name |
Description |
|
apartment |
Type: string Номер квартиры Example: |
|
building |
Type: string Строение Example: |
|
comment |
Type: string Комментарий Example: |
|
country |
Type: string Страна Example: |
|
full_address |
Type: string Полный адрес с указанием города, улицы и номера дома Example: |
|
geoId |
Type: number Идентификатор города |
|
house |
Type: string Номер дома Example: |
|
housing |
Type: string Корпус Example: |
|
locality |
Type: string Населенный пункт Example: |
|
postal_code |
Type: string Индекс Example: |
|
region |
Type: string Регион Example: |
|
street |
Type: string Улица Example: |
|
subRegion |
Type: string Область Example: |
Example
{
"geoId": 213,
"country": "Россия",
"region": "Москва",
"subRegion": "example",
"locality": "Москва",
"street": "Пролетарский проспект",
"house": "19",
"housing": "example",
"apartment": "example",
"building": "example",
"comment": "example",
"full_address": "Москва, Пролетарский проспект, 19",
"postal_code": "example"
}
CustomLocation
Информация о произвольной точке. Точка может быть задана либо своими координатами — пара (latitude, longitude), либо адресом
|
Name |
Description |
|
details |
Type: LocationDetails Дополнительная информация о расположении станции Адрес квартиры обязателен при наличии Example
|
|
latitude |
Type: number Широта |
|
longitude |
Type: number Долгота |
Example
{
"latitude": 0.5,
"longitude": 0.5,
"details": {
"geoId": 213,
"country": "Россия",
"region": "Москва",
"subRegion": "example",
"locality": "Москва",
"street": "Пролетарский проспект",
"house": "19",
"housing": "example",
"apartment": "example",
"building": "example",
"comment": "example",
"full_address": "Москва, Пролетарский проспект, 19",
"postal_code": "example"
}
}
DestinationRequestNode
|
Name |
Description |
|
type |
Type: string Тип целевой точки. Для доставки до двери — Enum: |
|
custom_location |
Type: CustomLocation Полное описание целевого адреса доставки Информация о произвольной точке. Точка может быть задана либо своими координатами — пара ( Example
|
|
interval_utc |
Type: TimeIntervalUTC Временной интервал (в UTC) Интервал времени в формате UTC. Example
|
|
platform_station |
Type: PlatformStation Описание целевой станции в случае, если она зарегистрирована в платформе Example
|
Example
{
"type": "platform_station",
"platform_station": {
"platform_id": "example"
},
"custom_location": {
"latitude": 0.5,
"longitude": 0.5,
"details": {
"geoId": 213,
"country": "Россия",
"region": "Москва",
"subRegion": "example",
"locality": "Москва",
"street": "Пролетарский проспект",
"house": "19",
"housing": "example",
"apartment": "example",
"building": "example",
"comment": "example",
"full_address": "Москва, Пролетарский проспект, 19",
"postal_code": "example"
}
},
"interval_utc": {
"from": "2021-10-25T15:00:00.000000Z",
"to": null
}
}
ItemBillingDetails
|
Name |
Description |
|
assessed_unit_price |
Type: integer Оценочная цена за единицу товара (передается в копейках) |
|
unit_price |
Type: integer Цена за единицу товара (передается в копейках) |
|
inn |
Type: string ИНН Example: |
|
nds |
Type: integer Значение НДС. Допустимые значения — |
Example
{
"inn": "example",
"nds": 0,
"unit_price": 0,
"assessed_unit_price": 0
}
ItemPhysicalDimensions
Указываются либо габариты (dx, dy, dz), либо объем в см3 (predefined_volume)
|
Name |
Description |
|
dx |
Type: integer Длина, сантиметры |
|
dy |
Type: integer Высота, сантиметры |
|
dz |
Type: integer Ширина, сантиметры |
|
predefined_volume |
Type: integer Объем (в см3) |
Example
{
"dx": 0,
"dy": 0,
"dz": 0,
"predefined_volume": 0
}
RequestResourceItem
|
Name |
Description |
|
article |
Type: string Артикул Example: |
|
billing_details |
Type: ItemBillingDetails Данные по биллингу для предмета Example
|
|
count |
Type: integer Количество |
|
name |
Type: string Название Example: |
|
place_barcode |
Type: string Штрихкод коробки, к которой относится товар Example: |
|
cargo_types |
Type: string[] Типы товаров в заказе. Используйте этот параметр, чтобы обозначить особые требования по обращению с товаром Min items: Example: |
|
fitting |
Type: boolean Разрешена ли примерка товара. Default: |
|
marking_code |
Type: string Код маркировки Example: |
|
physical_dims |
Type: ItemPhysicalDimensions Физические параметры объекта Указываются либо габариты ( Example
|
|
uin |
Type: string Уникальный идентификатор Example: |
Example
{
"count": 0,
"name": "example",
"article": "example",
"marking_code": "example",
"uin": "example",
"billing_details": {
"inn": "example",
"nds": 0,
"unit_price": 0,
"assessed_unit_price": 0
},
"physical_dims": {
"dx": 0,
"dy": 0,
"dz": 0,
"predefined_volume": 0
},
"place_barcode": "example",
"cargo_types": "[\"80\"]",
"fitting": false
}
PlacePhysicalDimensions
Весогабаритные характеристики грузомест
|
Name |
Description |
|
dx |
Type: integer Длина, сантиметры |
|
dy |
Type: integer Высота, сантиметры |
|
dz |
Type: integer Ширина, сантиметры |
|
weight_gross |
Type: integer Вес брутто, граммы |
|
predefined_volume |
Type: integer Объем (в см3) |
Example
{
"weight_gross": 0,
"dx": 0,
"dy": 0,
"dz": 0,
"predefined_volume": 0
}
ResourcePlace
|
Name |
Description |
|
barcode |
Type: string Штрихкод коробки. Example: |
|
physical_dims |
Type: PlacePhysicalDimensions Физические параметры места Весогабаритные характеристики грузомест Example
|
|
description |
Type: string Описание коробки Example: |
Example
{
"physical_dims": {
"weight_gross": 0,
"dx": 0,
"dy": 0,
"dz": 0,
"predefined_volume": 0
},
"barcode": "example",
"description": "example"
}
PaymentMethod
Type: string
Enum: already_paid, card_on_receipt
VariableDeliveryCostForRecipientItem
|
Name |
Description |
|
delivery_cost |
Type: integer Стоимость доставки после применения скидки Min value: |
|
min_cost_of_accepted_items |
Type: integer Стоимость выкупленных товаров, при достижении которой применяется скидка Min value: |
Example
{
"min_cost_of_accepted_items": 1,
"delivery_cost": 0
}
VariableDeliveryCostForRecipient
Type: VariableDeliveryCostForRecipientItem[]
Example
[
{
"min_cost_of_accepted_items": 1,
"delivery_cost": 0
}
]
BillingInfo
|
Name |
Description |
|
payment_method |
Type: PaymentMethod Метод оплаты Enum: |
|
delivery_cost |
Type: integer Сумма, которую нужно взять с получателя за доставку. Актуально только для заказов с постоплатой (тип оплаты |
|
variable_delivery_cost_for_recipient |
Type: VariableDeliveryCostForRecipient Список стоимостей доставки в зависимости от суммы выкупленных товаров. Example
|
Example
{
"payment_method": "already_paid",
"delivery_cost": 0,
"variable_delivery_cost_for_recipient": [
{
"min_cost_of_accepted_items": 1,
"delivery_cost": 0
}
]
}
Contact
|
Name |
Description |
|
first_name |
Type: string Имя Example: |
|
phone |
Type: string Номер телефона Example: |
|
|
Type: string Адрес электронной почты Example: |
|
last_name |
Type: string Фамилия Example: |
|
patronymic |
Type: string Отчество Example: |
Example
{
"first_name": "example",
"last_name": "example",
"patronymic": "example",
"phone": "example",
"email": "example"
}
LastMilePolicy
Типы полиси доставки последней мили. Может принимать значение только из enum.
time_interval: Доставка до двери в указанный интервал
self_pickup: Доставка до пункта выдачи
Type: string
Enum: time_interval, self_pickup
Responses
200 OK
OK
Body
application/json
{
"request_id": "example"
}
|
Name |
Description |
|
request_id |
Type: string Идентификатор только что созданного заказа Example: |
400 Bad Request
Нет доступных вариантов доставки
Body
application/json
{
"code": "no_delivery_options",
"message": "No delivery options for interval"
}
|
Name |
Description |
|
code |
Type: string Код ошибки Example: |
|
message |
Type: string Человекочитаемые детали ошибки Example: |
No longer supported, please use an alternative and newer version.