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
{
  "payment_method": "already_paid",
  "delivery_cost": 0,
  "variable_delivery_cost_for_recipient": [
    {
      "min_cost_of_accepted_items": 1,
      "delivery_cost": 0
    }
  ]
}

destination

Type: DestinationRequestNode

Информация о точке получения заказа

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
  }
}

info

Type: RequestInfo

Базовый набор метаданных по запросу

Example
{
  "operator_request_id": "example",
  "merchant_id": "example",
  "comment": "example"
}

items

Type: RequestResourceItem[]

Информация о предметах в заказе

Min items: 1

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

last_mile_policy

Type: LastMilePolicy

Требуемый способ доставки

Типы полиси доставки последней мили. Может принимать значение только из enum.
time_interval: Доставка до двери в указанный интервал
self_pickup: Доставка до пункта выдачи

Enum: time_interval, self_pickup

places

Type: ResourcePlace[]

Информация о местах в заказе

Min items: 1

Example
[
  {
    "physical_dims": {
      "weight_gross": 0,
      "dx": 0,
      "dy": 0,
      "dz": 0,
      "predefined_volume": 0
    },
    "barcode": "example",
    "description": "example"
  }
]

recipient_info

Type: Contact

Данные о получателе

Example
{
  "first_name": "example",
  "last_name": "example",
  "patronymic": "example",
  "phone": "example",
  "email": "example"
}

source

Type: SourceRequestNode

Информация о точке отправления заказа

Example
{
  "platform_station": {
    "platform_id": "example"
  },
  "interval_utc": {
    "from": "2021-10-25T15:00:00.000000Z",
    "to": null
  }
}

forbid_unboxing

Type: boolean

Запрет на вскрытие транспортной упаковки

Default: false

particular_items_refuse

Type: boolean

Разрешен ли частичный выкуп
true — разрешен частичный выкуп заказа
false — частичный выкуп заказа недоступен
Значение по умолчанию: false

Default: false

RequestInfo

Name

Description

operator_request_id

Type: string

Идентификатор заказа у отправителя

Example: example

comment

Type: string

Опциональный коментарий

Example: example

merchant_id

Type: string

ID мерчанта-отправителя. Значение merchant_id доступно после регистрации через метод Статус регистрации мерчанта.

Example: example

Example
{
  "operator_request_id": "example",
  "merchant_id": "example",
  "comment": "example"
}

PlatformStation

Name

Description

platform_id

Type: string

Идентификатор станции в Логистической платформе (например, склад отгрузки или ПВЗ)

Example: 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: 2021-10-25T15:00:00.000000Z

to

Type: TimestampUTC

UTC timestamp для верхней границы интервала

Example: 2021-10-25T15:00:00.000000Z

Example
{
  "from": "2021-10-25T15:00:00.000000Z",
  "to": null
}

SourceRequestNode

Name

Description

platform_station

Type: PlatformStation

Описание целевой станции в случае, если она зарегистрирована в платформе

Example
{
  "platform_id": "example"
}

interval_utc

Type: TimeIntervalUTC

Временной интервал (в UTC)

Интервал времени в формате UTC.

Example
{
  "from": "2021-10-25T15:00:00.000000Z",
  "to": null
}
Example
{
  "platform_station": {
    "platform_id": "example"
  },
  "interval_utc": {
    "from": "2021-10-25T15:00:00.000000Z",
    "to": null
  }
}

LocationDetails

Адрес квартиры обязателен при наличии

Name

Description

apartment

Type: string

Номер квартиры

Example: example

building

Type: string

Строение

Example: example

comment

Type: string

Комментарий

Example: example

country

Type: string

Страна

Example: Россия

full_address

Type: string

Полный адрес с указанием города, улицы и номера дома

Example: Москва, Пролетарский проспект, 19

geoId

Type: number

Идентификатор города

house

Type: string

Номер дома

Example: 19

housing

Type: string

Корпус

Example: example

locality

Type: string

Населенный пункт

Example: Москва

postal_code

Type: string

Индекс

Example: example

region

Type: string

Регион

Example: Москва

street

Type: string

Улица

Example: Пролетарский проспект

subRegion

Type: string

Область

Example: 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
{
  "geoId": 213,
  "country": "Россия",
  "region": "Москва",
  "subRegion": "example",
  "locality": "Москва",
  "street": "Пролетарский проспект",
  "house": "19",
  "housing": "example",
  "apartment": "example",
  "building": "example",
  "comment": "example",
  "full_address": "Москва, Пролетарский проспект, 19",
  "postal_code": "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

Тип целевой точки. Для доставки до двери — custom_location (2), для доставки до ПВЗ — platform_station (1)

Enum: platform_station, custom_location

custom_location

Type: CustomLocation

Полное описание целевого адреса доставки

Информация о произвольной точке. Точка может быть задана либо своими координатами — пара (latitude, longitude), либо адресом

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"
  }
}

interval_utc

Type: TimeIntervalUTC

Временной интервал (в UTC)

Интервал времени в формате UTC.

Example
{
  "from": "2021-10-25T15:00:00.000000Z",
  "to": null
}

platform_station

Type: PlatformStation

Описание целевой станции в случае, если она зарегистрирована в платформе

Example
{
  "platform_id": "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: example

nds

Type: integer

Значение НДС. Допустимые значения — 0, 5, 7, 10, 20, 22. Если заказ без НДС, передавайте значение -1

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: example

billing_details

Type: ItemBillingDetails

Данные по биллингу для предмета

Example
{
  "inn": "example",
  "nds": 0,
  "unit_price": 0,
  "assessed_unit_price": 0
}

count

Type: integer

Количество

name

Type: string

Название

Example: example

place_barcode

Type: string

Штрихкод коробки, к которой относится товар

Example: example

cargo_types

Type: string[]

Типы товаров в заказе. Используйте этот параметр, чтобы обозначить особые требования по обращению с товаром

Min items: 1

Example: ["80"]

fitting

Type: boolean

Разрешена ли примерка товара.
Значение по умолчанию: false.
Если у заказа признак particular_items_refuse принимает значение true, то значение параметра fitting также по умолчанию будет true.

Default: false

marking_code

Type: string

Код маркировки

Example: example

physical_dims

Type: ItemPhysicalDimensions

Физические параметры объекта

Указываются либо габариты (dx, dy, dz), либо объем в см3 (predefined_volume)

Example
{
  "dx": 0,
  "dy": 0,
  "dz": 0,
  "predefined_volume": 0
}

uin

Type: string

Уникальный идентификатор

Example: 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

Штрихкод коробки.
По умолчанию штрихкод грузоместа подменяется на уникальный на стороне Яндекс Доставки.
Чтобы использовать собственные штрихкоды или работать с кастомными маркировками, обратитесь к менеджеру.
Для получения актуальных штрихкодов воспользуйтесь методом 3.03. Получение информации о заявке.

Example: example

physical_dims

Type: PlacePhysicalDimensions

Физические параметры места

Весогабаритные характеристики грузомест

Example
{
  "weight_gross": 0,
  "dx": 0,
  "dy": 0,
  "dz": 0,
  "predefined_volume": 0
}

description

Type: string

Описание коробки

Example: 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: 0

min_cost_of_accepted_items

Type: integer

Стоимость выкупленных товаров, при достижении которой применяется скидка

Min value: 1

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: already_paid, card_on_receipt

delivery_cost

Type: integer

Сумма, которую нужно взять с получателя за доставку. Актуально только для заказов с постоплатой (тип оплаты card_on_receipt)

variable_delivery_cost_for_recipient

Type: VariableDeliveryCostForRecipient

Список стоимостей доставки в зависимости от суммы выкупленных товаров.
Позволяет управлять скидками на доставку для получателя. Скидка применяется только для заказов с постоплатой и частичным выкупом.

Example
[
  {
    "min_cost_of_accepted_items": 1,
    "delivery_cost": 0
  }
]
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: example

phone

Type: string

Номер телефона

Example: example

email

Type: string

Адрес электронной почты

Example: example

last_name

Type: string

Фамилия

Example: example

patronymic

Type: string

Отчество

Example: 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: example

400 Bad Request

Нет доступных вариантов доставки

Body

application/json
{
  "code": "no_delivery_options",
  "message": "No delivery options for interval"
}

Name

Description

code

Type: string

Код ошибки

Example: no_delivery_options

message

Type: string

Человекочитаемые детали ошибки

Example: No delivery options for interval

No longer supported, please use an alternative and newer version.