Сопоставление статусов заказов

Сопоставление статусов заказа из CRM c типами статусов в Метрике.

Пример тела запроса
--data '{
    "order_statuses": [
        {
            "id": "new",
            "humanized": "Новый",
            "type": "IN_PROGRESS"
        },
        {
            "id": "prepairing",
            "humanized": "В обработке",
            "type": "IN_PROGRESS"
        },
        {
            "id": "delivery",
            "humanized": "На доставке",
            "type": "IN_PROGRESS"
            "goal_action_ids": "dostavka"
        },
        {
            "id": "cancelled_by_client",
            "humanized": "Отменен клиентом",
            "type": "CANCELLED"
        },
        {
            "id": "cancelled_by_shop",
            "humanized": "Отменен магазином",
            "type": "CANCELLED",
            "goal_action_ids": "otmena"

        },
        {
            "id": "test_order",
            "humanized": "Проверочный заказ",
            "type": "SPAM",
            "goal_action_ids": "proverka"
        },
        {
            "id": "success",
            "humanized": "Успешно завершен",
            "type": "PAID"
        }
    ]
}'

Request

POST

https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/schema/order_statuses

Path parameters

Name

Description

counterId*

Type: integer<int32>

Идентификатор счетчика.
Example: 2215573

Body

application/json
{
    "order_statuses": [
        {
            "id": "string",
            "humanized": "string",
            "type": "string",
            "goal_action_ids": [
                "string"
            ]
        }
    ]
}

Name

Description

order_statuses*

Type: OrderStatus[]

Список статусов заказов.
Описание объекта OrderStatus.

OrderStatus

Описание объекта OrderStatus.

Name

Description

id*

Type: string

Идентификатор статуса заказа.

Min length: 1

Max length: 255

Pattern: ^[\w-:]+$

type*

Type: string

Семантика статуса:

  • IN_PROGRESS — в работе.
  • PAID — оплачен.
  • CANCELLED — отменен.
  • SPAM — спам.
  • OTHER — другое.

goal_action_ids

Type: string[]

Идентификаторы целей

Min items: 0

Max items: 10

Unique items  

humanized

Type: string

Название статуса заказа.

Min length: 0

Max length: 4096

Responses

200 OK

OK

Body

application/json
{
    "success": true
}

Name

Description

success

Type: boolean

Результат выполнения операции.

Default: true

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