3.15. Заявка на удаление товаров из заказа

Метод позволяет создать заявку на удаление товаров из заказа.
Принимает полный набор товаров с указанием нужного количества для каждого товара.
Если новое количество товара будет больше старого, то запрос завершится с ошибкой.
Редактирование происходит асинхронно, узнать текущий статус можно с помощью запроса /api/b2b/platform/request/edit/status.

Request

POST

b2b.taxi.tst.yandex.net/api/b2b/platform/request/items/remove

Тестовое окружение

POST

b2b-authproxy.taxi.yandex.net/api/b2b/platform/request/items/remove

Продакшен-окружение

Body

application/json
{
  "request_id": "example",
  "items_to_remove": [
    {
      "item_barcode": "example",
      "remaining_count": 0
    }
  ]
}

Name

Description

items_to_remove

Type: ItemToRemove[]

Min items: 1

Example
[
  {
    "item_barcode": "example",
    "remaining_count": 0
  }
]

request_id

Type: string

Example: example

ItemToRemove

Name

Description

item_barcode

Type: string

Штрихкод товарa

Example: example

remaining_count

Type: integer

Остаток товара

Example
{
  "item_barcode": "example",
  "remaining_count": 0
}

Responses

202 Accepted

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

Body

application/json
{
  "editing_task_id": "example"
}

Name

Description

editing_task_id

Type: string

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

Example: example

400 Bad Request

400 error

Body

application/json
{
  "code": "bad_request",
  "message": "Missing field request_id"
}

Name

Description

code

Type: string

Example: bad_request

message

Type: string

Example: Missing field request_id

403 Forbidden

403 error

Body

application/json
{
  "code": "customer_order_not_found",
  "message": "There is no customer_order with such ID  in platform, the order belongs to another employer"
}

Name

Description

code

Type: string

Код ошибки

Example: customer_order_not_found

message

Type: string

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

Example: There is no customer_order with such ID in platform, the order belongs to another employer

404 Not Found

404 error

Body

application/json
{
  "code": "not_found",
  "message": "Order with ID  some_id not found"
}

Name

Description

code

Type: string

Код ошибки

Example: not_found

message

Type: string

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

Example: Order with ID some_id not found

409 Conflict

409 error

Body

application/json
{
  "code": "conflict",
  "message": "Another editing request with conflict data execution"
}

Name

Description

code

Type: string

Код ошибки

Example: conflict

message

Type: string

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

Example: Another editing request with conflict data execution

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