3.10. Отмена заявки

Отмена заявки, созданной в логистической платформе.
Отменить заявку с типом доставки курьером можно до получения статуса DELIVERY_TRANSPORTATION_RECIPIENT.

Request

POST

b2b.taxi.tst.yandex.net/api/b2b/platform/request/cancel

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

POST

b2b-authproxy.taxi.yandex.net/api/b2b/platform/request/cancel

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

Body

application/json
{
  "request_id": "77241d8009bb46d0bff5c65a73077bcd-udp"
}

Name

Description

request_id

Type: string

ID заявки в логистической платформе

Example: 77241d8009bb46d0bff5c65a73077bcd-udp

Responses

200 OK

Успешный запрос

Body

application/json
{
  "status": "CREATED",
  "reason": "already_cancelled",
  "description": "Заказ отменен"
}

Name

Description

description

Type: string

Комментарий к результату выполнения запроса

Example: Заказ отменен

reason

Type: string

Код причины отмены

Example: already_cancelled

status

Type: string

Статус отмены заявки. Может принимать только значения из enum.
CREATED: отмена заявки инициирована в платформе
SUCCESS: отмена заявки успешно выполнена
ERROR: запрос завершился с ошибкой

Enum: CREATED, SUCCESS, ERROR

403 Forbidden

Не хватает прав для отмены

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

Заявка не найдена в системе

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

500 Internal Server Error

Внутренняя ошибка

Body

application/json
{
  "code": "conflict",
  "message": "Internal Server Error"
}

Name

Description

code

Type: string

Код ошибки

Example: conflict

message

Type: string

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

Example: Internal Server Error

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