Order status mapping

Mapping of order statuses from a CRM system to status types in Yandex Metrica.

Sample request body
--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

Counter ID.

Body

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

Name

Description

order_statuses

Type: OrderStatus[]

List of order statuses.

Example
[
  {
    "id": "example",
    "humanized": "example",
    "type": "example",
    "goal_action_ids": [
      "example"
    ]
  }
]

OrderStatus

Description of the OrderStatus object.

Name

Description

id

Type: string

Order status ID.

Min length: 1

Max length: 255

Pattern: ^[\w-:]+$

Example: example

type

Type: string

Status semantics:

  • IN_PROGRESS: In progress.
  • PAID: Paid.
  • CANCELLED: Canceled.
  • SPAM: Spam.
  • OTHER: Other.

Example: example

goal_action_ids

Type: string[]

Min items: 0

Max items: 10

Unique items: true

Example
[
  "example"
]

humanized

Type: string

Order status name.

Min length: 0

Max length: 4096

Example: example

Example
{
  "id": "example",
  "humanized": "example",
  "type": "example",
  "goal_action_ids": [
    "example"
  ]
}

Responses

200 OK

OK

Body

application/json
{
  "success": true
}

Name

Description

success

Type: boolean

Result of performing the action.

Default: true

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