Создаёт заказ, списывает остаток и ставит его в очередь на передачу в 1С.
Можно без авторизации — тогда заказ привязан к номеру телефона из запроса. Если передан JWT, заказ появится в «Моих заказах».
Поддерживаются промокод, подарочный сертификат и оплата бонусами. Если товара не хватает на складе или код недействителен — вернётся 400 с деталями по полю.
Параметры
| Имя | Где | Тип | Описание |
|---|
Idempotency-Key | header | string | Ключ идемпотентности. Повторный запрос с тем же ключом не создаёт второй заказ, а возвращает существующий с кодом `200`. Рекомендуется передавать всегда — защищает от дублей при таймаутах и повторных кликах. |
Тело запроса
| Поле | Тип | Описание |
|---|
items* | array[OrderItemInputRequest] | |
customer_name* | string | |
phone* | string | |
email | string | |
delivery_method | string | |
delivery_address | string | |
delivery_cost | string | |
comment | string | |
promo_code | string | |
certificate_code | string | |
bonus_amount | string | |
payment_method | enum (card, sbp, mir_pay, cash, installment, split) | * `card` - card
* `sbp` - sbp
* `mir_pay` - mir_pay
* `cash` - cash
* `installment` - installment
* `split` - split |
Примеры запроса
Заказ с промокодом
{
"items": [
{
"product_id": 42,
"quantity": 2
}
],
"customer_name": "Иван Петров",
"phone": "+79001234567",
"email": "ivan@example.com",
"delivery_method": "courier",
"delivery_address": "Москва, Тверская 12, кв. 45",
"comment": "Позвонить за час",
"promo_code": "WINTER15",
"bonus_amount": "500.00",
"payment_method": "card"
}Ответы
200
| Поле | Тип | Описание |
|---|
id* | integer | |
number* | string | |
status | enum (new, processing, delivering, completed, cancelled) | * `new` - Новый
* `processing` - В обработке
* `delivering` - Доставляется
* `completed` - Выполнен
* `cancelled` - Отменён |
status_display* | string | |
payment_status | enum (pending, partially_paid, paid, refunded) | * `pending` - Ожидает оплаты
* `partially_paid` - Частично оплачен
* `paid` - Оплачен
* `refunded` - Возвращён |
total | string | |
created_at* | string | |
items* | array[OrderItem] | |
customer_name* | string | |
phone* | string | |
email | string | |
delivery_method | string | |
delivery_address | string | |
delivery_cost | string | |
comment | string | |
subtotal | string | |
discount_total | string | |
bonus_applied | string | |
certificate_applied | string | |
promo_code | string | |
certificate_code | string | |
status_history* | array[OrderStatusHistory] | |
payments* | array[Payment] | |
Пример ответа
Заказ создан
{
"id": 1017,
"number": "HOMM-20261122-3F9A1C",
"status": "new",
"status_display": "Новый",
"payment_status": "pending",
"total": "21583.00",
"created_at": "2026-11-22T18:04:11+03:00",
"items": [
{
"id": 3011,
"name": "Куртка HOMM Softshell",
"sku": "HM-1042",
"price": "12990.00",
"quantity": 2,
"total": "25980.00"
}
],
"customer_name": "Иван Петров",
"phone": "+79001234567",
"subtotal": "25980.00",
"discount_total": "3897.00",
"bonus_applied": "500.00",
"delivery_cost": "0.00"
}201
| Поле | Тип | Описание |
|---|
id* | integer | |
number* | string | |
status | enum (new, processing, delivering, completed, cancelled) | * `new` - Новый
* `processing` - В обработке
* `delivering` - Доставляется
* `completed` - Выполнен
* `cancelled` - Отменён |
status_display* | string | |
payment_status | enum (pending, partially_paid, paid, refunded) | * `pending` - Ожидает оплаты
* `partially_paid` - Частично оплачен
* `paid` - Оплачен
* `refunded` - Возвращён |
total | string | |
created_at* | string | |
items* | array[OrderItem] | |
customer_name* | string | |
phone* | string | |
email | string | |
delivery_method | string | |
delivery_address | string | |
delivery_cost | string | |
comment | string | |
subtotal | string | |
discount_total | string | |
bonus_applied | string | |
certificate_applied | string | |
promo_code | string | |
certificate_code | string | |
status_history* | array[OrderStatusHistory] | |
payments* | array[Payment] | |
Пример ответа
Заказ создан
{
"id": 1017,
"number": "HOMM-20261122-3F9A1C",
"status": "new",
"status_display": "Новый",
"payment_status": "pending",
"total": "21583.00",
"created_at": "2026-11-22T18:04:11+03:00",
"items": [
{
"id": 3011,
"name": "Куртка HOMM Softshell",
"sku": "HM-1042",
"price": "12990.00",
"quantity": 2,
"total": "25980.00"
}
],
"customer_name": "Иван Петров",
"phone": "+79001234567",
"subtotal": "25980.00",
"discount_total": "3897.00",
"bonus_applied": "500.00",
"delivery_cost": "0.00"
}400Некорректный запрос или ошибка валидации.
| Поле | Тип | Описание |
|---|
error* | object | Machine-readable error details. |
409Конфликт состояния (например, повтор с другим Idempotency-Key).
| Поле | Тип | Описание |
|---|
error* | object | Machine-readable error details. |