{
  "openapi": "3.0.2",
  "info": {
    "title": "Sailplay API",
    "description": "В этом разделе описаны все существующие методы Sailplay API, которые могут потребоваться при интеграции. \n\nПеред интеграцией, пожалуйста, ознакомьтесь с данными разделами:\n- [Общие понятия](/docs/api/general-concepts-sailplay/) \n- [Общие принципы интеграции](/docs/api/integration-concepts-sailplay/) \n- [Авторизация в Sailplay API](/docs/api/autorization/) \n- [Ограничения API](/docs/api/limitations/) \n- [Коды ошибок](/docs/api/errors-codes/) \n- [Идентификация по клиенту](/docs/api/user-identification/)",
    "version": "2.0",
    "contact": {
      "name": "Sailplay",
      "url": "https://sailplay.ru",
      "email": "support@sailplay.ru"
    }
  },
  "servers": [
    {
      "url": "https://api.sailplay.ru/api/v2/",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Авторизация",
      "description": "Подробное описание процесса авторизации и связанных с методом авторизации параметров - на странице [Авторизация в Sailplay API](/docs/api/autorization/)"
    },
    {
      "name": "Клиенты",
      "description": "Методы для создания и редактирования клиентов, объединения двух карточек клиентов и методы отправки смс, а также получения информации об отправленных на клиента коммуникациях (только push и смс)"
    },
    {
      "name": "Теги клиентов",
      "description": "Методы для работы с тегами по клиентам по присвоению  и удалению тегов у клиентов (по одному клиенту и массовый), а также получение данных по тегам"
    },
    {
      "name": "Переменные клиентов",
      "description": "Методы для работы с переменными клиентов"
    },
    {
      "name": "Атрибуты клиентов",
      "description": "Методы для работы с атрибутами клиентов"
    },
    {
      "name": "Бонусные баллы",
      "description": "Методы для работы с начисления, списания и перевода бонусных баллов"
    },
    {
      "name": "Маркетинговые акции",
      "description": "Методы для интеграции расчета скидок как для отдельной корзины, так и для витрины, а также методы для работы с маркетинговыми акциями"
    },
    {
      "name": "Покупки",
      "description": "Методы для работы с покупками"
    },
    {
      "name": "Атрибуты покупок",
      "description": "Методы для работы с атрибутами покупок"
    },
    {
      "name": "Промокоды",
      "description": "Методы для работы с промокодами"
    },
    {
      "name": "Подарки",
      "description": "Методы для работы с подарками"
    },
    {
      "name": "Товарный справочник",
      "description": "Методы для передачи и обновления данных по товарной номенклатуре"
    },
    {
      "name": "Департаменты",
      "description": "Методы для работы с департаментами"
    },
    {
      "name": "Сотрудники",
      "description": "Методы работы с сотрудниками. Указанные методы не подходят для создания учетной записи менеджера, а только для технических учетных записей, pin-code которых может быть использован для получения token или в других запросах"
    },
    {
      "name": "Кардпулы",
      "description": "Методы, необходимые для работы с кардпулами"
    },
    {
      "name": "Подарочные карты",
      "description": "Методы, необходимые для интеграции подарочных карт."
    }
  ],
  "paths": {
    "/login/": {
      "post": {
        "summary": "Получить токен",
        "operationId": "login",
        "description": "",
        "tags": ["Авторизация"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "store_department_id",
                  "store_department_key",
                  "pin_code"
                ],
                "properties": {
                  "store_department_id": {
                    "type": "integer",
                    "description": "Идентификатор департамента",
                    "example": 4352
                  },
                  "store_department_key": {
                    "type": "integer",
                    "description": "Ключ департамента",
                    "example": 87693421
                  },
                  "pin_code": {
                    "type": "integer",
                    "description": "Пин-код",
                    "example": 43566
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 4352
                    },
                    "token": {
                      "type": "string",
                      "description": "Токен доступа к API",
                      "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                    },
                    "pin_codes": {
                      "type": "array",
                      "description": "Пин-коды менеджеров, связанных с департаментом",
                      "items": {
                        "type": "integer"
                      },
                      "example": [1234, 5678]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/add/": {
      "post": {
        "summary": "Создать клиента",
        "operationId": "users-add",
        "description": "",
        "tags": ["Клиенты"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "79653215476"
                      },
                      "email": {
                        "type": "string",
                        "description": "Электронный адрес",
                        "example": "ivanovivan@mail.ru"
                      },
                      "origin_user_id": {
                        "type": "string",
                        "description": "Внутренний идентификатор",
                        "example": "id923"
                      },
                      "extra_fields": {
                        "type": "string",
                        "description": "Дополнительные возвращаемые поля",
                        "example": "last_sms_date",
                        "deprecated": true
                      },
                      "first_name": {
                        "type": "string",
                        "description": "Имя",
                        "example": "Иванов"
                      },
                      "middle_name": {
                        "type": "string",
                        "description": "Отчество",
                        "example": "Иванович"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "Фамилия",
                        "example": "Абрамов"
                      },
                      "birth_date": {
                        "type": "string",
                        "description": "Дата рождения",
                        "example": "1983-11-07"
                      },
                      "sex": {
                        "type": "integer",
                        "description": "Пол: 1 - Мужской, 2 - Женский, 3 – Другой",
                        "example": 1
                      },
                      "register_date": {
                        "type": "string",
                        "description": "Дата регистрации",
                        "example": "2012-04-24"
                      },
                      "referrer_origin_user_id": {
                        "type": "string",
                        "description": "Внутренний идентификатор реферера",
                        "example": "id923"
                      },
                      "referrer_phone": {
                        "type": "string",
                        "description": "Номер телефона реферера",
                        "example": "79653215476"
                      },
                      "referrer_email": {
                        "type": "string",
                        "description": "Электронный адрес реферера",
                        "example": "ivanovivan@mail.ru"
                      },
                      "referrer_promocode": {
                        "type": "string",
                        "description": "Реферальный промокод реферера",
                        "example": "HTF6SG"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор клиента",
                      "example": 651243
                    },
                    "email": {
                      "type": "string",
                      "description": "Электронный адрес",
                      "example": "ivanivanov@mail.ru"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Номер телефона",
                      "example": "79653125476"
                    },
                    "first_name": {
                      "type": "string",
                      "description": "Имя",
                      "example": "Иван"
                    },
                    "middle_name": {
                      "type": "string",
                      "description": "Отчество",
                      "example": "Иванович"
                    },
                    "last_name": {
                      "type": "string",
                      "description": "Фамилия",
                      "example": "Иванов"
                    },
                    "birth_date": {
                      "type": "string",
                      "description": "Дата рождения",
                      "example": "1984-11-07"
                    },
                    "sex": {
                      "type": "integer",
                      "description": "Пол: 1 - Мужской, 2 - Женский",
                      "example": 1
                    },
                    "origin_user_id": {
                      "type": "string",
                      "description": "Внутренний идентификатор",
                      "example": "id923"
                    },
                    "avatar": {
                      "type": "string",
                      "description": "Ссылка на аватар",
                      "example": "https://some/external/link"
                    },
                    "referral_promocode": {
                      "type": "string",
                      "description": "Реферальный промокод",
                      "example": "HTF6SG"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/info/": {
      "get": {
        "tags": ["Клиенты"],
        "summary": "Получить информацию о клиенте",
        "operationId": "users-info",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)"
          },
          {
            "in": "query",
            "name": "history",
            "schema": {
              "type": "integer",
              "example": 1
            },
            "description": "Признак, показывать ли исторические данные по клиенту"
          },
          {
            "in": "query",
            "name": "subscriptions",
            "schema": {
              "type": "integer",
              "example": 1
            },
            "description": "Признак, добавлять ли информацию о Email/SMS подписке клиента"
          },
          {
            "in": "query",
            "name": "multi",
            "schema": {
              "type": "integer",
              "example": 1,
              "default": 0
            },
            "description": "Признак мульти-проверки, позволящий проверить несколько типов идентифкаторов в одном запросе"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": ["status"],
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "example": "ok"
                        },
                        "id": {
                          "type": "integer",
                          "description": "Идентификатор",
                          "example": 651243
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "ivanivanov@mail.ru"
                        },
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "79653125476"
                        },
                        "first_name": {
                          "type": "string",
                          "description": "Имя",
                          "example": "Иван"
                        },
                        "middle_name": {
                          "type": "string",
                          "description": "Отчество",
                          "example": "Иванович"
                        },
                        "last_name": {
                          "type": "string",
                          "description": "Фамилия",
                          "example": "Иванов"
                        },
                        "birth_date": {
                          "type": "string",
                          "description": "Дата рождения",
                          "example": "1984-11-07"
                        },
                        "sex": {
                          "type": "integer",
                          "description": "Пол: 1 - Мужской, 2 - Женский, 3 – Другой",
                          "example": 1
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "id923"
                        },
                        "avatar": {
                          "type": "string",
                          "description": "Ссылка на аватар",
                          "example": "https://some/external/link"
                        },
                        "points": {
                          "type": "object",
                          "description": "Информация о баллах",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Общее количество баллов",
                              "example": 1234
                            },
                            "spent": {
                              "type": "integer",
                              "description": "Потраченное количество баллов",
                              "example": 567
                            },
                            "confirmed": {
                              "type": "integer",
                              "description": "Подтвержденные баллы",
                              "example": 78
                            },
                            "spent_extra": {
                              "type": "integer",
                              "description": "Списано баллов",
                              "example": 90
                            },
                            "unconfirmed": {
                              "type": "integer",
                              "description": "Неподтвержденные баллы",
                              "example": 123
                            }
                          }
                        },
                        "auth_hash": {
                          "type": "string",
                          "description": "Хэш аутентификации",
                          "example": "e83d5bfb4a687d13a89fa18349515ca24348412"
                        },
                        "referral_promocode": {
                          "type": "string",
                          "description": "Реферальный промокод",
                          "example": "HTF6SG"
                        },
                        "subscriptions": {
                          "type": "array",
                          "description": "Подписки",
                          "items": {
                            "type": "string",
                            "enum": ["email_all", "sms_all"]
                          },
                          "example": ["email_all"]
                        },
                        "history": {
                          "type": "array",
                          "description": "История",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": ["status"],
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "example": "ok"
                        },
                        "origin_user_id": {
                          "type": "object",
                          "description": "Информация о клиенте, найденому по origin_user_id"
                        },
                        "user_id": {
                          "type": "object",
                          "description": "Информация о клиенте, найденому по user_id"
                        },
                        "phone": {
                          "type": "object",
                          "description": "Информация о клиенте, найденому по user_phone"
                        },
                        "email": {
                          "type": "object",
                          "description": "Информация о клиенте, найденому по email"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/users/update/": {
      "post": {
        "tags": ["Клиенты"],
        "summary": "Обновить данные клиента",
        "operationId": "users-update",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "79653215476"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "Идентификатор",
                        "example": 6534521
                      },
                      "add_phone": {
                        "type": "string",
                        "description": "Новый номер телефона",
                        "example": "79657772345"
                      },
                      "add_email": {
                        "type": "string",
                        "description": "Новый электронный адрес",
                        "example": "petrovpetr@mail.ru"
                      },
                      "new_phone": {
                        "type": "string",
                        "description": "Номер телефона на замену",
                        "example": "79657772345"
                      },
                      "new_email": {
                        "type": "string",
                        "description": "Электронный адрес на замену",
                        "example": "petrovpetr@mail.ru"
                      },
                      "register_date": {
                        "type": "string",
                        "description": "Новая дата регистрации",
                        "example": "2021-07-29"
                      },
                      "new_origin_user_id": {
                        "type": "string",
                        "description": "Новый внутренний идентификатор",
                        "example": "id361"
                      },
                      "first_name": {
                        "type": "string",
                        "description": "Новое имя",
                        "example": "Петр"
                      },
                      "middle_name": {
                        "type": "string",
                        "description": "Новое отчество",
                        "example": "Петрович"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "Новая фамилия",
                        "example": "Петров"
                      },
                      "birth_date": {
                        "type": "string",
                        "description": "Новая дата рождения",
                        "example": "1983-11-07"
                      },
                      "sex": {
                        "type": "string",
                        "description": "Новый пол: 1 - Мужской, 2 - Женский, 3 – Другой, null - удалить",
                        "example": "1"
                      },
                      "referrer_origin_user_id": {
                        "type": "string",
                        "description": "Внутренний идентификатор реферала",
                        "example": "id923"
                      },
                      "referrer_phone": {
                        "type": "string",
                        "description": "Номер телефона реферала",
                        "example": "79653451289"
                      },
                      "referrer_email": {
                        "type": "string",
                        "description": "Электронный адрес реферала",
                        "example": "ivanovivan@mail.ru"
                      },
                      "referrer_promocode": {
                        "type": "string",
                        "description": "Реферальный промокод реферала",
                        "example": "HTF6SG"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор",
                      "example": 651243
                    },
                    "email": {
                      "type": "string",
                      "description": "Электронный адрес",
                      "example": "ivanivanov@mail.ru"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Номер телефона",
                      "example": "79653125476"
                    },
                    "first_name": {
                      "type": "string",
                      "description": "Имя",
                      "example": "Иван"
                    },
                    "middle_name": {
                      "type": "string",
                      "description": "Отчество",
                      "example": "Иванович"
                    },
                    "last_name": {
                      "type": "string",
                      "description": "Фамилия",
                      "example": "Иванов"
                    },
                    "birth_date": {
                      "type": "string",
                      "description": "Дата рождения",
                      "example": "1984-11-07"
                    },
                    "sex": {
                      "type": "integer",
                      "description": "Пол: 1 - Мужской, 2 - Женский",
                      "example": 1
                    },
                    "origin_user_id": {
                      "type": "string",
                      "description": "Внутренний идентификатор",
                      "example": "id923"
                    },
                    "avatar": {
                      "type": "string",
                      "description": "Ссылка на аватар",
                      "example": "https://some/external/link"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/merge/": {
      "post": {
        "tags": ["Клиенты"],
        "summary": "Объеденить двух клиентов",
        "operationId": "users-merge",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["from_phone", "to_phone"],
                    "properties": {
                      "from_phone": {
                        "type": "string",
                        "description": "Номер телефона клиента, чьи данные переходят другому клиенту",
                        "example": "79651234356"
                      },
                      "to_phone": {
                        "type": "string",
                        "description": "Номер телефона клиента, чьи данные обновляются данными другого клиента",
                        "example": "79653215476"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Номер телефона",
                      "example": "79653215476"
                    },
                    "email": {
                      "type": "string",
                      "description": "Электронный адрес",
                      "example": "ivanovivan@mail.ru"
                    },
                    "origin_user_id": {
                      "type": "string",
                      "description": "Внутренний идентификатор",
                      "example": "id923"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/sms-code/": {
      "post": {
        "summary": "Отправить СМС клиенту",
        "operationId": "users-sms-code",
        "description": "",
        "tags": ["Клиенты"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "text"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "79653215476"
                      },
                      "text": {
                        "type": "string",
                        "description": "Текст сообщения",
                        "example": "Ваш код: $[sms_code]"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "sms-code": {
                      "type": "string",
                      "description": "Код, сгенерированный сервером",
                      "example": "3298"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sender/messages/send/sms-code/": {
      "post": {
        "summary": "Отправить СМС на произвольный номер",
        "operationId": "sender-messages-send-sms-code",
        "description": "",
        "tags": ["Клиенты"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["phone", "text"],
                    "properties": {
                      "phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "79653215477"
                      },
                      "text": {
                        "type": "string",
                        "description": "Текст сообщения",
                        "example": "Ваш код: $[sms_code]"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "sms-code": {
                      "type": "string",
                      "description": "Код, сгенерированный сервером",
                      "example": "3298"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/subscribe/": {
      "post": {
        "tags": ["Клиенты"],
        "summary": "Подписать клиента",
        "operationId": "users-subscribe",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["subscribe_list", "user_phone"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "subscribe_list": {
                        "type": "string",
                        "description": "Cписок рассылок",
                        "example": "email_all,sms_all,push_all"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "79003215678"
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "oid23"
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "some@example.com"
                        }
                      }
                    },
                    "subscribed": {
                      "type": "array",
                      "description": "Подписки",
                      "items": {
                        "type": "string",
                        "example": "email_all"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/unsubscribe/": {
      "post": {
        "tags": ["Клиенты"],
        "summary": "Отписать клиента",
        "operationId": "users-unsubscribe",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["unsubscribe_list", "user_phone"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "unsubscribe_list": {
                        "type": "string",
                        "description": "Cписок рассылок",
                        "example": "email_all,sms_all,push_all"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "79003215678"
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "oid23"
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "some@example.com"
                        }
                      }
                    },
                    "unsubscribed": {
                      "type": "array",
                      "description": "Подписки",
                      "items": {
                        "type": "string",
                        "example": "email_all"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/tags/add/": {
      "post": {
        "summary": "Присвоить тег",
        "operationId": "users-tags-add",
        "description": "",
        "tags": ["Теги клиентов"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "tags"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Телефон клиента или другой идентификатор",
                        "example": "79653215476"
                      },
                      "tags": {
                        "type": "string",
                        "description": "Список тегов через запятую",
                        "example": "Тег1,Тег2,Тег3"
                      },
                      "params": {
                        "type": "object",
                        "description": "Дополнительные параметры события",
                        "properties": {
                          "AnyKey": {
                            "type": "string",
                            "description": "Произвольный ключ и произвольное значение для события. Например: {\"type\":\"info\",\"price\":\"553.77\"}",
                            "example": "AnyValue"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "added_tags_count": {
                      "type": "integer",
                      "description": "Число добавленных",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/tags/delete/": {
      "post": {
        "summary": "Удалить тег",
        "operationId": "users-tags-delete",
        "description": "",
        "tags": ["Теги клиентов"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "tags"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Телефон клиента",
                        "example": "79653215476"
                      },
                      "tags": {
                        "type": "string",
                        "description": "Наименования тегов через запятую",
                        "example": "Тег1,Тег2,Тег3"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "deleted_count": {
                      "type": "integer",
                      "description": "Число удаленных",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/tags/list/": {
      "post": {
        "tags": ["Теги клиентов"],
        "summary": "Получить список тегов",
        "operationId": "users-tags-list",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Телефон клиента или другой идентификатор",
                        "example": "79653215476"
                      },
                      "tags": {
                        "type": "string",
                        "description": "Список тегов",
                        "example": "[\"Тег1\",\"Тег2\"]"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "events": {
                      "type": "array",
                      "description": "Список запрошеных тегов",
                      "items": {
                        "type": "object",
                        "required": [
                          "is_category",
                          "update_date",
                          "kind",
                          "create_date",
                          "key",
                          "is_chains_event",
                          "sender_name",
                          "is_campaigns_event",
                          "parent_id",
                          "sender_templates_vars_help",
                          "category_color",
                          "is_future",
                          "id",
                          "name"
                        ],
                        "properties": {
                          "is_category": {
                            "type": "boolean",
                            "example": true
                          },
                          "update_date": {
                            "type": "string",
                            "example": "2021-04-30T12:23:17.003"
                          },
                          "kind": {
                            "type": "string",
                            "example": "flag"
                          },
                          "create_date": {
                            "type": "string",
                            "example": "2021-04-30T12:23:17.003"
                          },
                          "key": {
                            "type": "string",
                            "example": "qwerty"
                          },
                          "is_chains_event": {
                            "type": "boolean",
                            "example": true
                          },
                          "sender_name": {
                            "type": "string",
                            "example": "sender"
                          },
                          "is_campaigns_event": {
                            "type": "boolean",
                            "example": true
                          },
                          "parent_id": {
                            "type": "integer",
                            "example": 1
                          },
                          "sender_templates_vars_help": {
                            "type": "string",
                            "example": "{}"
                          },
                          "category_color": {
                            "type": "string",
                            "example": "#227D74"
                          },
                          "is_future": {
                            "type": "boolean",
                            "example": true
                          },
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "tag"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/custom-vars/add/": {
      "post": {
        "tags": ["Переменные клиентов"],
        "summary": "Задать переменную",
        "operationId": "users-vars-add",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["vars", "user_phone"],
                    "properties": {
                      "vars": {
                        "type": "string",
                        "description": "Пользовательские переменные",
                        "example": "{\"key\": value}"
                      },
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "updated_count": {
                      "type": "integer",
                      "description": "Обновленных переменных",
                      "example": 1
                    },
                    "created_count": {
                      "type": "integer",
                      "description": "Добавленных переменных",
                      "example": 1
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "70003214567"
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "uid123"
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "example@example.com"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/custom-vars/list/": {
      "get": {
        "tags": ["Переменные клиентов"],
        "summary": "Получить список всех переменных",
        "operationId": "users-vars-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "custom_vars": {
                      "type": "array",
                      "description": "Список переменных",
                      "items": {
                        "type": "string",
                        "description": "Наименование переменной",
                        "example": "[\"test\"]"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/custom-vars/delete/": {
      "post": {
        "tags": ["Переменные клиентов"],
        "summary": "Удалить переменную",
        "operationId": "users-vars-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name", "user_phone"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование переменной",
                        "example": "cvars"
                      },
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование переменной",
                      "example": "name"
                    },
                    "values": {
                      "type": "array",
                      "description": "Значение переменной"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "70003214567"
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "uid123"
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "example@example.com"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/custom-vars/get/": {
      "get": {
        "tags": ["Переменные клиентов"],
        "summary": "Получить переменную",
        "operationId": "users-vars-get",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)"
          },
          {
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Наименование переменной",
              "example": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование",
                      "example": "Любимый цвет"
                    },
                    "value": {
                      "type": "string",
                      "description": "Значение",
                      "example": "Красный"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "70003214567"
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "oid23"
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "some@example.com"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/custom-vars/get/batch/": {
      "get": {
        "tags": ["Переменные клиентов"],
        "summary": "Получить множество переменных",
        "operationId": "users-vars-get-batch",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)"
          },
          {
            "in": "query",
            "name": "names",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Список переменных",
              "example": "[\"name1\",\"name2\"]"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "Номер телефона",
                          "example": "70003214567"
                        },
                        "origin_user_id": {
                          "type": "string",
                          "description": "Внутренний идентификатор",
                          "example": "oid23"
                        },
                        "email": {
                          "type": "string",
                          "description": "Электронный адрес",
                          "example": "some@example.com"
                        }
                      }
                    },
                    "vars": {
                      "type": "array",
                      "description": "Переменные",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Наименование переменной",
                            "example": "Любимый цвет"
                          },
                          "value": {
                            "type": "string",
                            "description": "Значение переменной",
                            "example": "Красный"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/attributes/set-values-for-user/": {
      "post": {
        "summary": "Добавить значение атрибута",
        "operationId": "users-attributes-set-values-for-user",
        "description": "",
        "tags": ["Атрибуты клиентов"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "attributes"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "attributes": {
                        "type": "string",
                        "description": "Список с объектами атрибутов и значений",
                        "example": "[{\"name\":\"attr\",\"value\":\"val\"},{\"name\":\"attrarr\":\"value\":[23]}]"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/attributes/get-values-by-user/": {
      "get": {
        "summary": "Получить значения атрибутов клиента",
        "operationId": "users-attributes-get-values-by-user",
        "description": "",
        "tags": ["Атрибуты клиентов"],
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона"
          },
          {
            "in": "query",
            "name": "attributes",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Наименования атрибутов",
              "example": "[\"second_phone\", \"phone\"]"
            }
          },
          {
            "in": "query",
            "name": "include_extra",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Развернутый ответ",
              "example": false,
              "default": false
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Число элементов на страницу",
              "example": 50,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "attr_name": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "string",
                                "description": "Значения атрибута",
                                "example": "[\"78008008080\", \"78008008081\"]",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "is_array": {
                                "type": "boolean",
                                "description": "Являются ли значения массивом",
                                "example": true
                              },
                              "title": {
                                "type": "string",
                                "description": "Заголовок",
                                "example": "Заголовок"
                              },
                              "description": {
                                "type": "string",
                                "description": "Описание",
                                "example": "Описание"
                              },
                              "type": {
                                "type": "object",
                                "description": "Некоторые параметры"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/attributes/push-values-to-array/": {
      "post": {
        "summary": "Добавить значение в атрибут-массив",
        "operationId": "users-attributes-push-values-to-array",
        "description": "",
        "tags": ["Атрибуты клиентов"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "attributes"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "attributes": {
                        "type": "string",
                        "description": "Список с объектами атрибутов и значений",
                        "example": "[{\"name\":\"attr\",\"value\":\"val\"},{\"name\":\"attrarr\":\"value\":[23]}]"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/attributes/pop-values-from-array/": {
      "post": {
        "summary": "Удалить значение из атрибута-масива",
        "operationId": "users-attributes-pop-values-from-array",
        "description": "",
        "tags": ["Атрибуты клиентов"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "attributes"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "attributes": {
                        "type": "string",
                        "description": "Список с объектами атрибутов и значений",
                        "example": "[{\"name\":\"attr\",\"value\":\"val\"},{\"name\":\"attrarr\":\"value\":[23]}]"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/attributes/get-partner-attributes-list/": {
      "get": {
        "summary": "Получить атрибуты",
        "operationId": "users-attributes-get-partner-attributes-list",
        "description": "",
        "tags": ["Атрибуты клиентов"],
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Число элементов на страницу",
              "example": 50,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "attr_name": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "is_array": {
                                "type": "boolean",
                                "description": "Являются ли значения массивом",
                                "example": true
                              },
                              "title": {
                                "type": "string",
                                "description": "Заголовок",
                                "example": "Заголовок"
                              },
                              "description": {
                                "type": "string",
                                "description": "Описание",
                                "example": "Описание"
                              },
                              "type": {
                                "type": "object",
                                "description": "Некоторые параметры"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/attributes/get-values-by-attribute/": {
      "get": {
        "summary": "Получить значения атрибута",
        "operationId": "users-attributes-get-values-by-attribute",
        "description": "",
        "tags": ["Атрибуты клиентов"],
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "attr_name",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Наименование атрибута",
              "example": "phone"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Число элементов на страницу",
              "example": 50,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "result": {
                      "type": "array",
                      "description": "Значения атрибута",
                      "example": ["78008008080", "78008008081"],
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/points/add/": {
      "post": {
        "tags": ["Бонусные баллы"],
        "summary": "Начислить или списать баллы",
        "operationId": "points-add",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "points"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "points": {
                        "type": "integer",
                        "description": "Баллы",
                        "example": 100
                      },
                      "comment": {
                        "type": "string",
                        "description": "Комментарий",
                        "example": "Тестовая транзакция"
                      },
                      "order_num": {
                        "type": "string",
                        "description": "Идентификатор транзакции",
                        "example": "324-567"
                      },
                      "expire_points_enabled": {
                        "type": "integer",
                        "description": "Активация сгорания баллов",
                        "example": 1
                      },
                      "expire_type": {
                        "type": "string",
                        "description": "Тип сгорания: относительно даты или абсолютный",
                        "enum": ["relative", "absolute"],
                        "example": "relative"
                      },
                      "expire_after": {
                        "type": "integer",
                        "description": "Кол-во секунд в случае относительного определения даты сгорания",
                        "example": 2592000
                      },
                      "expire_date": {
                        "type": "string",
                        "description": "Дата сгорания в случае абсолютного определения",
                        "example": "2022-11-30T23:59:26"
                      },
                      "expiring_points_type": {
                        "type": "string",
                        "description": "Тип определения величины сгорания: процент или абсолютная значение",
                        "enum": ["percent", "absolute"],
                        "example": "absolute"
                      },
                      "expiring_points_amount": {
                        "type": "integer",
                        "description": "Dеличина сгорания для указанного типа расчета величины сгорания",
                        "example": 100
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "public_key": {
                      "type": "string",
                      "description": "Публичный ключ",
                      "example": "5f5645b67b5913f06624eb320e5d100a8cef9c"
                    },
                    "points": {
                      "type": "integer",
                      "description": "Кол-во баллов",
                      "example": 100
                    },
                    "receipt_date": {
                      "type": "string",
                      "description": "Дата начисления"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/points/move/": {
      "post": {
        "tags": ["Бонусные баллы"],
        "summary": "Перевести баллы",
        "operationId": "points-move",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "points"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "points": {
                        "type": "integer",
                        "description": "Баллы",
                        "example": 100
                      },
                      "to_user_phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "70003214567"
                      },
                      "comment_from": {
                        "type": "string",
                        "description": "Комментарий",
                        "example": "Тестовая транзакция"
                      },
                      "comment_to": {
                        "type": "string",
                        "description": "Комментарий",
                        "example": "Тестовая транзакция"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "to": {
                      "type": "object",
                      "properties": {
                        "public_key": {
                          "type": "string",
                          "description": "Публичный ключ",
                          "example": "5f5645b67b5913f06624eb320e5d100a8cef9c"
                        },
                        "points": {
                          "type": "integer",
                          "description": "Кол-во баллов",
                          "example": 100
                        },
                        "receipt_date": {
                          "type": "string",
                          "description": "Дата начисления"
                        }
                      }
                    },
                    "from": {
                      "type": "object",
                      "properties": {
                        "public_key": {
                          "type": "string",
                          "description": "Публичный ключ",
                          "example": "5f5645b67b5913f06624eb320e5d100a8cef9c"
                        },
                        "points": {
                          "type": "integer",
                          "description": "Кол-во баллов",
                          "example": -100
                        },
                        "receipt_date": {
                          "type": "string",
                          "description": "Дата начисления"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/marketing-actions/calc/": {
      "post": {
        "tags": ["Маркетинговые акции"],
        "summary": "Расчитать скидку",
        "operationId": "marketing-actions-calc",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["cart"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Телефон клиента",
                        "example": "79653215476"
                      },
                      "verbose": {
                        "type": "integer",
                        "description": "Расширенный ответ сервера",
                        "example": 1
                      },
                      "promocodes": {
                        "type": "string",
                        "description": "Список промокодов",
                        "example": "[\"PROMOCODE\"]"
                      },
                      "discount_points_writeoff": {
                        "type": "integer",
                        "description": "Баллы к списанию в счет скидки",
                        "example": 110
                      },
                      "attrs": {
                        "type": "string",
                        "description": "Атрибуты покупки",
                        "example": "{\"attribute\":\"value\"}"
                      },
                      "recommendations": {
                        "type": "object",
                        "description": "Рекомендации",
                        "properties": {
                          "exclude_sku": {
                            "type": "string",
                            "description": "Список исключающих sku",
                            "example": "['1','2','3']"
                          },
                          "limit": {
                            "type": "integer",
                            "description": "Лимит по количеству",
                            "example": 10
                          },
                          "enable": {
                            "type": "boolean",
                            "description": "Работа рекомендаций",
                            "example": true
                          }
                        }
                      },
                      "cart": {
                        "type": "string",
                        "description": "Корзина в виде JSON строки",
                        "example": "{\"1\":{\"sku\":\"5011921150014\",\"price\":1600,\"quantity\":1,\"min_price\":1360}}"
                      },
                      "target_dep_id": {
                        "type": "integer",
                        "description": "Идентификатор целевого департамента",
                        "example": 23255
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID",
                          "example": 1
                        },
                        "params": {
                          "type": "string",
                          "description": "Параметры",
                          "example": "{}"
                        },
                        "positions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "custom_attrs": {
                                "type": "string",
                                "description": "Аттрибуты",
                                "example": "[]"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "sku": {
                                    "type": "string",
                                    "description": "SKU",
                                    "example": "sku1"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "description": "ID",
                                    "example": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  }
                                }
                              },
                              "product": {
                                "type": "object",
                                "properties": {
                                  "sku": {
                                    "type": "string",
                                    "description": "SKU",
                                    "example": "sku1"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "description": "ID",
                                    "example": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  }
                                }
                              },
                              "employee_id": {
                                "type": "integer",
                                "description": "id сотрудника",
                                "example": 1
                              },
                              "discount_points_max": {
                                "type": "integer",
                                "description": "Максимально возможное количество баллов для списания в корзине",
                                "example": 1
                              },
                              "reverse_points_rate": {
                                "type": "string",
                                "description": "Обратный коэфициент баллов",
                                "example": "[]"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "expiry_info": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "eligible_quantity": {
                                      "type": "integer",
                                      "description": "Допустимое количество",
                                      "example": 1
                                    },
                                    "eligible_points_rate": {
                                      "type": "integer",
                                      "description": "Приемлемая ставка баллов",
                                      "example": 1
                                    },
                                    "expire_date": {
                                      "type": "string",
                                      "description": "Дата истечения срока действия",
                                      "example": "2021-04-30T12:23:17.003"
                                    },
                                    "bundle_id": {
                                      "type": "integer",
                                      "description": "Идентификатор бандла",
                                      "example": 1
                                    },
                                    "expiring_points": {
                                      "type": "string",
                                      "description": "Истекающие баллы",
                                      "example": "1.0"
                                    }
                                  }
                                }
                              },
                              "new_price": {
                                "type": "string",
                                "description": "Цена со скидкой",
                                "example": "1.0"
                              },
                              "min_price": {
                                "type": "string",
                                "description": "Минимальная цена",
                                "example": "1.0"
                              },
                              "num": {
                                "type": "integer",
                                "description": "Позиция",
                                "example": 1
                              },
                              "marketing_actions": {
                                "type": "string",
                                "description": "Список акций",
                                "example": "Срок действия баллов - 6 месяцев"
                              },
                              "quantity": {
                                "type": "string",
                                "description": "Количество",
                                "example": "1"
                              },
                              "points_rate": {
                                "type": "string",
                                "description": "Коэфициент баллов",
                                "example": "1.0"
                              },
                              "discount_points": {
                                "type": "integer",
                                "description": "Скидочные баллы",
                                "example": 1
                              },
                              "points": {
                                "type": "string",
                                "description": "Количество баллов",
                                "example": "1.0"
                              }
                            }
                          }
                        },
                        "positions_count": {
                          "type": "integer",
                          "description": "Счетчик позиций",
                          "example": 1
                        },
                        "total_price": {
                          "type": "integer",
                          "description": "Общая цена",
                          "example": 1
                        },
                        "total_points": {
                          "type": "integer",
                          "description": "Всего баллов",
                          "example": 1
                        },
                        "parent_id": {
                          "type": "integer",
                          "description": "ID родительской корзины",
                          "example": 1
                        },
                        "upsaled": {
                          "type": "string",
                          "example": "[]"
                        },
                        "total_discount_points_max": {
                          "type": "integer",
                          "description": "Максимально возможное количество баллов для списания в корзине",
                          "example": 1
                        },
                        "extra_points": {
                          "type": "object",
                          "description": "Дополнительные баллы",
                          "properties": {
                            "points_delta": {
                              "type": "integer",
                              "description": "Количество дополнительных баллов",
                              "example": 1
                            },
                            "actions_applied": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "alias": {
                                    "type": "string",
                                    "description": "Alias",
                                    "example": "alias"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  },
                                  "points_delta": {
                                    "type": "integer",
                                    "description": "Количество дополнительных баллов",
                                    "example": 1
                                  }
                                }
                              }
                            }
                          }
                        },
                        "text_blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketing_action": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "alias": {
                                      "type": "string",
                                      "description": "Alias",
                                      "example": "alias"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Имя",
                                      "example": "name"
                                    },
                                    "service_msg": {
                                      "type": "string",
                                      "description": "Сервисное сообщение",
                                      "example": "message"
                                    },
                                    "client_msg": {
                                      "type": "string",
                                      "description": "Клиентское сообщение",
                                      "example": "message"
                                    },
                                    "rewards": {
                                      "type": "object",
                                      "description": "Вознаграждение",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": ["discount"],
                                          "description": "Тип",
                                          "example": "discount"
                                        },
                                        "skus": {
                                          "type": "string",
                                          "description": "Список sku",
                                          "example": "1,2"
                                        },
                                        "quantity_limit": {
                                          "type": "integer",
                                          "description": "Лимит по количеству",
                                          "example": 1
                                        },
                                        "quantity_left": {
                                          "type": "integer",
                                          "description": "Осталось",
                                          "example": 1
                                        }
                                      }
                                    },
                                    "total_quantity_applied": {
                                      "type": "integer",
                                      "description": "Всего принято",
                                      "example": 1
                                    },
                                    "count": {
                                      "type": "integer",
                                      "description": "Количество",
                                      "example": 1
                                    },
                                    "total_discount": {
                                      "type": "integer",
                                      "description": "Общая скидка",
                                      "example": 1
                                    },
                                    "till_date": {
                                      "type": "string",
                                      "description": "Действует до",
                                      "example": "2021-04-30T12:23:17.003"
                                    }
                                  }
                                }
                              },
                              "value": {
                                "type": "string",
                                "example": ""
                              }
                            }
                          }
                        },
                        "total_discount_points_max_for_user": {
                          "type": "integer",
                          "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                          "example": 1
                        }
                      }
                    },
                    "marketing_actions_applied": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Alias",
                            "example": "alias"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "service_msg": {
                            "type": "string",
                            "description": "Сервисное сообщение",
                            "example": "message"
                          },
                          "client_msg": {
                            "type": "string",
                            "description": "Клиентское сообщение",
                            "example": "message"
                          },
                          "rewards": {
                            "type": "object",
                            "description": "Вознаграждение",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": ["discount"],
                                "description": "Тип",
                                "example": "discount"
                              },
                              "skus": {
                                "type": "string",
                                "description": "Список sku",
                                "example": "1,2"
                              },
                              "quantity_limit": {
                                "type": "integer",
                                "description": "Лимит по количеству",
                                "example": 1
                              },
                              "quantity_left": {
                                "type": "integer",
                                "description": "Осталось",
                                "example": 1
                              }
                            }
                          },
                          "total_quantity_applied": {
                            "type": "integer",
                            "description": "Всего принято",
                            "example": 1
                          },
                          "count": {
                            "type": "integer",
                            "description": "Количество",
                            "example": 1
                          },
                          "total_discount": {
                            "type": "integer",
                            "description": "Общая скидка",
                            "example": 1
                          },
                          "till_date": {
                            "type": "string",
                            "description": "Действует до",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    },
                    "possible_marketing_actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Alias",
                            "example": "alias"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "service_msg": {
                            "type": "string",
                            "description": "Сервисное сообщение",
                            "example": "message"
                          },
                          "client_msg": {
                            "type": "string",
                            "description": "Клиентское сообщение",
                            "example": "message"
                          },
                          "rewards": {
                            "type": "object",
                            "description": "Вознаграждение",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": ["discount"],
                                "description": "Тип",
                                "example": "discount"
                              },
                              "skus": {
                                "type": "string",
                                "description": "Список sku",
                                "example": "1,2"
                              },
                              "quantity_limit": {
                                "type": "integer",
                                "description": "Лимит по количеству",
                                "example": 1
                              },
                              "quantity_left": {
                                "type": "integer",
                                "description": "Осталось",
                                "example": 1
                              }
                            }
                          },
                          "total_quantity_applied": {
                            "type": "integer",
                            "description": "Всего принято",
                            "example": 1
                          },
                          "count": {
                            "type": "integer",
                            "description": "Количество",
                            "example": 1
                          },
                          "total_discount": {
                            "type": "integer",
                            "description": "Общая скидка",
                            "example": 1
                          },
                          "till_date": {
                            "type": "string",
                            "description": "Действует до",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    },
                    "recommendations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "price": {
                            "type": "string",
                            "description": "Цена",
                            "example": "100.0"
                          },
                          "sku": {
                            "type": "string",
                            "description": "SKU",
                            "example": "sku1"
                          },
                          "category_name": {
                            "type": "string",
                            "description": "Наименование категории",
                            "example": "cat1"
                          },
                          "vars": {
                            "type": "string",
                            "description": "Переменные",
                            "example": "[]"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/marketing-actions/calc/light/": {
      "post": {
        "tags": ["Маркетинговые акции"],
        "summary": "Расчитать скидку без сохраненния",
        "operationId": "marketing-actions-calc-light",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["cart"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Телефон клиента",
                        "example": "79653215476"
                      },
                      "verbose": {
                        "type": "integer",
                        "description": "Расширенный ответ сервера",
                        "example": 1
                      },
                      "promocodes": {
                        "type": "string",
                        "description": "Список промокодов",
                        "example": "[\"PROMOCODE\"]"
                      },
                      "discount_points_writeoff": {
                        "type": "integer",
                        "description": "Баллы к списанию в счет скидки",
                        "example": 110
                      },
                      "attrs": {
                        "type": "string",
                        "description": "Атрибуты покупки",
                        "example": "{\"attribute\":\"value\"}"
                      },
                      "recommendations": {
                        "type": "object",
                        "description": "Рекомендации",
                        "properties": {
                          "exclude_sku": {
                            "type": "string",
                            "description": "Список исключающих sku",
                            "example": "['1','2','3']"
                          },
                          "limit": {
                            "type": "integer",
                            "description": "Лимит по количеству",
                            "example": 10
                          },
                          "enable": {
                            "type": "boolean",
                            "description": "Работа рекомендаций",
                            "example": true
                          }
                        }
                      },
                      "cart": {
                        "type": "string",
                        "description": "Корзина в виде JSON строки",
                        "example": "{\"1\":{\"sku\":\"5011921150014\",\"price\":1600,\"quantity\":1,\"min_price\":1360}}"
                      },
                      "target_dep_id": {
                        "type": "integer",
                        "description": "Идентификатор целевого департамента",
                        "example": 23255
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID",
                          "example": 1
                        },
                        "params": {
                          "type": "string",
                          "description": "Параметры",
                          "example": "{}"
                        },
                        "positions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "custom_attrs": {
                                "type": "string",
                                "description": "Аттрибуты",
                                "example": "[]"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "sku": {
                                    "type": "string",
                                    "description": "SKU",
                                    "example": "sku1"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "description": "ID",
                                    "example": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  }
                                }
                              },
                              "product": {
                                "type": "object",
                                "properties": {
                                  "sku": {
                                    "type": "string",
                                    "description": "SKU",
                                    "example": "sku1"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "description": "ID",
                                    "example": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  }
                                }
                              },
                              "employee_id": {
                                "type": "integer",
                                "description": "id сотрудника",
                                "example": 1
                              },
                              "discount_points_max": {
                                "type": "integer",
                                "description": "Максимально возможное количество баллов для списания в корзине",
                                "example": 1
                              },
                              "reverse_points_rate": {
                                "type": "string",
                                "description": "Обратный коэфициент баллов",
                                "example": "[]"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "expiry_info": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "eligible_quantity": {
                                      "type": "integer",
                                      "description": "Допустимое количество",
                                      "example": 1
                                    },
                                    "eligible_points_rate": {
                                      "type": "integer",
                                      "description": "Приемлемая ставка баллов",
                                      "example": 1
                                    },
                                    "expire_date": {
                                      "type": "string",
                                      "description": "Дата истечения срока действия",
                                      "example": "2021-04-30T12:23:17.003"
                                    },
                                    "bundle_id": {
                                      "type": "integer",
                                      "description": "Идентификатор бандла",
                                      "example": 1
                                    },
                                    "expiring_points": {
                                      "type": "string",
                                      "description": "Истекающие баллы",
                                      "example": "1.0"
                                    }
                                  }
                                }
                              },
                              "new_price": {
                                "type": "string",
                                "description": "Цена со скидкой",
                                "example": "1.0"
                              },
                              "min_price": {
                                "type": "string",
                                "description": "Минимальная цена",
                                "example": "1.0"
                              },
                              "num": {
                                "type": "integer",
                                "description": "Позиция",
                                "example": 1
                              },
                              "marketing_actions": {
                                "type": "string",
                                "description": "Список акций",
                                "example": "Срок действия баллов - 6 месяцев"
                              },
                              "quantity": {
                                "type": "string",
                                "description": "Количество",
                                "example": "1"
                              },
                              "points_rate": {
                                "type": "string",
                                "description": "Коэфициент баллов",
                                "example": "1.0"
                              },
                              "discount_points": {
                                "type": "integer",
                                "description": "Скидочные баллы",
                                "example": 1
                              },
                              "points": {
                                "type": "string",
                                "description": "Количество баллов",
                                "example": "1.0"
                              }
                            }
                          }
                        },
                        "positions_count": {
                          "type": "integer",
                          "description": "Счетчик позиций",
                          "example": 1
                        },
                        "total_price": {
                          "type": "integer",
                          "description": "Общая цена",
                          "example": 1
                        },
                        "total_points": {
                          "type": "integer",
                          "description": "Всего баллов",
                          "example": 1
                        },
                        "parent_id": {
                          "type": "integer",
                          "description": "ID родительской корзины",
                          "example": 1
                        },
                        "upsaled": {
                          "type": "string",
                          "example": "[]"
                        },
                        "total_discount_points_max": {
                          "type": "integer",
                          "description": "Максимально возможное количество баллов для списания в корзине",
                          "example": 1
                        },
                        "extra_points": {
                          "type": "object",
                          "description": "Дополнительные баллы",
                          "properties": {
                            "points_delta": {
                              "type": "integer",
                              "description": "Количество дополнительных баллов",
                              "example": 1
                            },
                            "actions_applied": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "alias": {
                                    "type": "string",
                                    "description": "Alias",
                                    "example": "alias"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  },
                                  "points_delta": {
                                    "type": "integer",
                                    "description": "Количество дополнительных баллов",
                                    "example": 1
                                  }
                                }
                              }
                            }
                          }
                        },
                        "text_blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketing_action": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "alias": {
                                      "type": "string",
                                      "description": "Alias",
                                      "example": "alias"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Имя",
                                      "example": "name"
                                    },
                                    "service_msg": {
                                      "type": "string",
                                      "description": "Сервисное сообщение",
                                      "example": "message"
                                    },
                                    "client_msg": {
                                      "type": "string",
                                      "description": "Клиентское сообщение",
                                      "example": "message"
                                    },
                                    "rewards": {
                                      "type": "object",
                                      "description": "Вознаграждение",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": ["discount"],
                                          "description": "Тип",
                                          "example": "discount"
                                        },
                                        "skus": {
                                          "type": "string",
                                          "description": "Список sku",
                                          "example": "1,2"
                                        },
                                        "quantity_limit": {
                                          "type": "integer",
                                          "description": "Лимит по количеству",
                                          "example": 1
                                        },
                                        "quantity_left": {
                                          "type": "integer",
                                          "description": "Осталось",
                                          "example": 1
                                        }
                                      }
                                    },
                                    "total_quantity_applied": {
                                      "type": "integer",
                                      "description": "Всего принято",
                                      "example": 1
                                    },
                                    "count": {
                                      "type": "integer",
                                      "description": "Количество",
                                      "example": 1
                                    },
                                    "total_discount": {
                                      "type": "integer",
                                      "description": "Общая скидка",
                                      "example": 1
                                    },
                                    "till_date": {
                                      "type": "string",
                                      "description": "Действует до",
                                      "example": "2021-04-30T12:23:17.003"
                                    }
                                  }
                                }
                              },
                              "value": {
                                "type": "string",
                                "example": ""
                              }
                            }
                          }
                        },
                        "total_discount_points_max_for_user": {
                          "type": "integer",
                          "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                          "example": 1
                        }
                      }
                    },
                    "marketing_actions_applied": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Alias",
                            "example": "alias"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "service_msg": {
                            "type": "string",
                            "description": "Сервисное сообщение",
                            "example": "message"
                          },
                          "client_msg": {
                            "type": "string",
                            "description": "Клиентское сообщение",
                            "example": "message"
                          },
                          "rewards": {
                            "type": "object",
                            "description": "Вознаграждение",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": ["discount"],
                                "description": "Тип",
                                "example": "discount"
                              },
                              "skus": {
                                "type": "string",
                                "description": "Список sku",
                                "example": "1,2"
                              },
                              "quantity_limit": {
                                "type": "integer",
                                "description": "Лимит по количеству",
                                "example": 1
                              },
                              "quantity_left": {
                                "type": "integer",
                                "description": "Осталось",
                                "example": 1
                              }
                            }
                          },
                          "total_quantity_applied": {
                            "type": "integer",
                            "description": "Всего принято",
                            "example": 1
                          },
                          "count": {
                            "type": "integer",
                            "description": "Количество",
                            "example": 1
                          },
                          "total_discount": {
                            "type": "integer",
                            "description": "Общая скидка",
                            "example": 1
                          },
                          "till_date": {
                            "type": "string",
                            "description": "Действует до",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    },
                    "possible_marketing_actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Alias",
                            "example": "alias"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "service_msg": {
                            "type": "string",
                            "description": "Сервисное сообщение",
                            "example": "message"
                          },
                          "client_msg": {
                            "type": "string",
                            "description": "Клиентское сообщение",
                            "example": "message"
                          },
                          "rewards": {
                            "type": "object",
                            "description": "Вознаграждение",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": ["discount"],
                                "description": "Тип",
                                "example": "discount"
                              },
                              "skus": {
                                "type": "string",
                                "description": "Список sku",
                                "example": "1,2"
                              },
                              "quantity_limit": {
                                "type": "integer",
                                "description": "Лимит по количеству",
                                "example": 1
                              },
                              "quantity_left": {
                                "type": "integer",
                                "description": "Осталось",
                                "example": 1
                              }
                            }
                          },
                          "total_quantity_applied": {
                            "type": "integer",
                            "description": "Всего принято",
                            "example": 1
                          },
                          "count": {
                            "type": "integer",
                            "description": "Количество",
                            "example": 1
                          },
                          "total_discount": {
                            "type": "integer",
                            "description": "Общая скидка",
                            "example": 1
                          },
                          "till_date": {
                            "type": "string",
                            "description": "Действует до",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    },
                    "recommendations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "price": {
                            "type": "string",
                            "description": "Цена",
                            "example": "100.0"
                          },
                          "sku": {
                            "type": "string",
                            "description": "SKU",
                            "example": "sku1"
                          },
                          "category_name": {
                            "type": "string",
                            "description": "Наименование категории",
                            "example": "cat1"
                          },
                          "vars": {
                            "type": "string",
                            "description": "Переменные",
                            "example": "[]"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/marketing-actions/calc/bulk/": {
      "post": {
        "tags": ["Маркетинговые акции"],
        "summary": "Расчитать скидку для множества товаров",
        "operationId": "marketing-actions-calc-bulk",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["positions"],
                    "properties": {
                      "positions": {
                        "type": "array",
                        "description": "Список sku для расчета скидок",
                        "items": {
                          "type": "object",
                          "required": ["sku", "price"],
                          "properties": {
                            "sku": {
                              "type": "string",
                              "description": "SKU",
                              "example": "sku1"
                            },
                            "price": {
                              "type": "string",
                              "description": "Цена",
                              "example": "100.0"
                            }
                          }
                        }
                      },
                      "user_phone": {
                        "type": "string",
                        "description": "Идентификатор клиента.",
                        "example": "79998887766"
                      },
                      "verbose": {
                        "type": "string",
                        "description": "Расширенный ответ сервера",
                        "enum": ["1"]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "positions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "product": {
                            "type": "object",
                            "properties": {
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "id": {
                                "type": "integer",
                                "description": "ID",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              }
                            }
                          },
                          "marketing_actions": {
                            "type": "string",
                            "description": "Список акций",
                            "example": "Срок действия баллов - 6 месяцев"
                          },
                          "possible_marketing_actions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "alias": {
                                  "type": "string",
                                  "description": "Alias",
                                  "example": "alias"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Имя",
                                  "example": "name"
                                },
                                "service_msg": {
                                  "type": "string",
                                  "description": "Сервисное сообщение",
                                  "example": "message"
                                },
                                "client_msg": {
                                  "type": "string",
                                  "description": "Клиентское сообщение",
                                  "example": "message"
                                }
                              }
                            }
                          },
                          "price": {
                            "type": "string",
                            "description": "Цена",
                            "example": "100.0"
                          },
                          "new_price": {
                            "type": "string",
                            "description": "Цена со скидкой",
                            "example": "1.0"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/marketing-actions/balance/": {
      "get": {
        "tags": ["Маркетинговые акции"],
        "summary": "Получить лимиты акции",
        "operationId": "marketing-actions-balance",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)"
          },
          {
            "in": "query",
            "name": "marketing_action_id",
            "description": "Идентификатор акции",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "ID акции",
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID",
                          "example": 1
                        },
                        "params": {
                          "type": "string",
                          "description": "Параметры",
                          "example": "{}"
                        },
                        "positions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "custom_attrs": {
                                "type": "string",
                                "description": "Аттрибуты",
                                "example": "[]"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "sku": {
                                    "type": "string",
                                    "description": "SKU",
                                    "example": "sku1"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "description": "ID",
                                    "example": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  }
                                }
                              },
                              "product": {
                                "type": "object",
                                "properties": {
                                  "sku": {
                                    "type": "string",
                                    "description": "SKU",
                                    "example": "sku1"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "description": "ID",
                                    "example": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  }
                                }
                              },
                              "employee_id": {
                                "type": "integer",
                                "description": "id сотрудника",
                                "example": 1
                              },
                              "discount_points_max": {
                                "type": "integer",
                                "description": "Максимально возможное количество баллов для списания в корзине",
                                "example": 1
                              },
                              "reverse_points_rate": {
                                "type": "string",
                                "description": "Обратный коэфициент баллов",
                                "example": "[]"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "expiry_info": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "eligible_quantity": {
                                      "type": "integer",
                                      "description": "Допустимое количество",
                                      "example": 1
                                    },
                                    "eligible_points_rate": {
                                      "type": "integer",
                                      "description": "Приемлемая ставка баллов",
                                      "example": 1
                                    },
                                    "expire_date": {
                                      "type": "string",
                                      "description": "Дата истечения срока действия",
                                      "example": "2021-04-30T12:23:17.003"
                                    },
                                    "bundle_id": {
                                      "type": "integer",
                                      "description": "Идентификатор бандла",
                                      "example": 1
                                    },
                                    "expiring_points": {
                                      "type": "string",
                                      "description": "Истекающие баллы",
                                      "example": "1.0"
                                    }
                                  }
                                }
                              },
                              "new_price": {
                                "type": "string",
                                "description": "Цена со скидкой",
                                "example": "1.0"
                              },
                              "min_price": {
                                "type": "string",
                                "description": "Минимальная цена",
                                "example": "1.0"
                              },
                              "num": {
                                "type": "integer",
                                "description": "Позиция",
                                "example": 1
                              },
                              "marketing_actions": {
                                "type": "string",
                                "description": "Список акций",
                                "example": "Срок действия баллов - 6 месяцев"
                              },
                              "quantity": {
                                "type": "string",
                                "description": "Количество",
                                "example": "1"
                              },
                              "points_rate": {
                                "type": "string",
                                "description": "Коэфициент баллов",
                                "example": "1.0"
                              },
                              "discount_points": {
                                "type": "integer",
                                "description": "Скидочные баллы",
                                "example": 1
                              },
                              "points": {
                                "type": "string",
                                "description": "Количество баллов",
                                "example": "1.0"
                              }
                            }
                          }
                        },
                        "positions_count": {
                          "type": "integer",
                          "description": "Счетчик позиций",
                          "example": 1
                        },
                        "total_price": {
                          "type": "integer",
                          "description": "Общая цена",
                          "example": 1
                        },
                        "total_points": {
                          "type": "integer",
                          "description": "Всего баллов",
                          "example": 1
                        },
                        "parent_id": {
                          "type": "integer",
                          "description": "ID родительской корзины",
                          "example": 1
                        },
                        "upsaled": {
                          "type": "string",
                          "example": "[]"
                        },
                        "total_discount_points_max": {
                          "type": "integer",
                          "description": "Максимально возможное количество баллов для списания в корзине",
                          "example": 1
                        },
                        "extra_points": {
                          "type": "object",
                          "description": "Дополнительные баллы",
                          "properties": {
                            "points_delta": {
                              "type": "integer",
                              "description": "Количество дополнительных баллов",
                              "example": 1
                            },
                            "actions_applied": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "alias": {
                                    "type": "string",
                                    "description": "Alias",
                                    "example": "alias"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Имя",
                                    "example": "name"
                                  },
                                  "points_delta": {
                                    "type": "integer",
                                    "description": "Количество дополнительных баллов",
                                    "example": 1
                                  }
                                }
                              }
                            }
                          }
                        },
                        "text_blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketing_action": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "alias": {
                                      "type": "string",
                                      "description": "Alias",
                                      "example": "alias"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Имя",
                                      "example": "name"
                                    },
                                    "service_msg": {
                                      "type": "string",
                                      "description": "Сервисное сообщение",
                                      "example": "message"
                                    },
                                    "client_msg": {
                                      "type": "string",
                                      "description": "Клиентское сообщение",
                                      "example": "message"
                                    },
                                    "rewards": {
                                      "type": "object",
                                      "description": "Вознаграждение",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": ["discount"],
                                          "description": "Тип",
                                          "example": "discount"
                                        },
                                        "skus": {
                                          "type": "string",
                                          "description": "Список sku",
                                          "example": "1,2"
                                        },
                                        "quantity_limit": {
                                          "type": "integer",
                                          "description": "Лимит по количеству",
                                          "example": 1
                                        },
                                        "quantity_left": {
                                          "type": "integer",
                                          "description": "Осталось",
                                          "example": 1
                                        }
                                      }
                                    },
                                    "total_quantity_applied": {
                                      "type": "integer",
                                      "description": "Всего принято",
                                      "example": 1
                                    },
                                    "count": {
                                      "type": "integer",
                                      "description": "Количество",
                                      "example": 1
                                    },
                                    "total_discount": {
                                      "type": "integer",
                                      "description": "Общая скидка",
                                      "example": 1
                                    },
                                    "till_date": {
                                      "type": "string",
                                      "description": "Действует до",
                                      "example": "2021-04-30T12:23:17.003"
                                    }
                                  }
                                }
                              },
                              "value": {
                                "type": "string",
                                "example": ""
                              }
                            }
                          }
                        },
                        "total_discount_points_max_for_user": {
                          "type": "integer",
                          "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                          "example": 1
                        }
                      }
                    },
                    "marketing_actions_applied": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Alias",
                            "example": "alias"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "service_msg": {
                            "type": "string",
                            "description": "Сервисное сообщение",
                            "example": "message"
                          },
                          "client_msg": {
                            "type": "string",
                            "description": "Клиентское сообщение",
                            "example": "message"
                          },
                          "rewards": {
                            "type": "object",
                            "description": "Вознаграждение",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": ["discount"],
                                "description": "Тип",
                                "example": "discount"
                              },
                              "skus": {
                                "type": "string",
                                "description": "Список sku",
                                "example": "1,2"
                              },
                              "quantity_limit": {
                                "type": "integer",
                                "description": "Лимит по количеству",
                                "example": 1
                              },
                              "quantity_left": {
                                "type": "integer",
                                "description": "Осталось",
                                "example": 1
                              }
                            }
                          },
                          "total_quantity_applied": {
                            "type": "integer",
                            "description": "Всего принято",
                            "example": 1
                          },
                          "count": {
                            "type": "integer",
                            "description": "Количество",
                            "example": 1
                          },
                          "total_discount": {
                            "type": "integer",
                            "description": "Общая скидка",
                            "example": 1
                          },
                          "till_date": {
                            "type": "string",
                            "description": "Действует до",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    },
                    "possible_marketing_actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Alias",
                            "example": "alias"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "service_msg": {
                            "type": "string",
                            "description": "Сервисное сообщение",
                            "example": "message"
                          },
                          "client_msg": {
                            "type": "string",
                            "description": "Клиентское сообщение",
                            "example": "message"
                          },
                          "rewards": {
                            "type": "object",
                            "description": "Вознаграждение",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": ["discount"],
                                "description": "Тип",
                                "example": "discount"
                              },
                              "skus": {
                                "type": "string",
                                "description": "Список sku",
                                "example": "1,2"
                              },
                              "quantity_limit": {
                                "type": "integer",
                                "description": "Лимит по количеству",
                                "example": 1
                              },
                              "quantity_left": {
                                "type": "integer",
                                "description": "Осталось",
                                "example": 1
                              }
                            }
                          },
                          "total_quantity_applied": {
                            "type": "integer",
                            "description": "Всего принято",
                            "example": 1
                          },
                          "count": {
                            "type": "integer",
                            "description": "Количество",
                            "example": 1
                          },
                          "total_discount": {
                            "type": "integer",
                            "description": "Общая скидка",
                            "example": 1
                          },
                          "till_date": {
                            "type": "string",
                            "description": "Действует до",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    },
                    "recommendations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "name"
                          },
                          "price": {
                            "type": "string",
                            "description": "Цена",
                            "example": "100.0"
                          },
                          "sku": {
                            "type": "string",
                            "description": "SKU",
                            "example": "sku1"
                          },
                          "category_name": {
                            "type": "string",
                            "description": "Наименование категории",
                            "example": "cat1"
                          },
                          "vars": {
                            "type": "string",
                            "description": "Переменные",
                            "example": "[]"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/new/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Создать покупку",
        "operationId": "purchases-new",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["order_num"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона клиента",
                        "example": "79653215476"
                      },
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order"
                      },
                      "cart": {
                        "type": "string",
                        "description": "Корзина в виде JSON строки",
                        "example": "{\"1\": {\"sku\":\"00023\", \"price\":185, \"quantity\":1}, \"2\": {\"sku\":\"0006088\", \"price\":280, \"quantity\":2}}"
                      },
                      "force_complete": {
                        "type": "integer",
                        "description": "Форсированное подтверждение покупки (1 - для подтверждения, 0 или отсутствие параметра не подтверждают покупку)",
                        "example": 0
                      },
                      "verbose": {
                        "type": "integer",
                        "description": "Расширенный ответ сервера",
                        "example": 1,
                        "default": 0
                      },
                      "promocodes": {
                        "type": "string",
                        "description": "Список промокодов",
                        "example": "[\"PROMOCODE\"]"
                      },
                      "discount_points_writeoff": {
                        "type": "integer",
                        "description": "Кол-во баллов к списанию в счет скидки",
                        "example": 1
                      },
                      "attrs": {
                        "type": "string",
                        "description": "Атрибуты покупки"
                      },
                      "target_dep_id": {
                        "type": "integer",
                        "description": "Идентификатор целевого департамента",
                        "example": 234515
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "store_department_id": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 14864
                    },
                    "price": {
                      "type": "string",
                      "description": "Цена",
                      "example": "100.0"
                    },
                    "points_delta": {
                      "type": "integer",
                      "description": "Разница очков",
                      "example": 1
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order"
                    },
                    "public_key": {
                      "type": "string",
                      "description": "Публичный ключ"
                    },
                    "clerk_pin": {
                      "type": "string",
                      "description": "ПИН-код сотрудника"
                    },
                    "purchase_date": {
                      "type": "string",
                      "description": "Дата заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "completed_date": {
                      "type": "string",
                      "description": "Дата подтверждения заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "is_completed": {
                      "type": "boolean",
                      "description": "Подтверждена",
                      "example": false
                    },
                    "attrs": {
                      "type": "string",
                      "description": "Атрибуты покупки"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "enum": ["ok"],
                          "example": "ok"
                        },
                        "cart": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID",
                              "example": 1
                            },
                            "params": {
                              "type": "string",
                              "description": "Параметры",
                              "example": "{}"
                            },
                            "positions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "custom_attrs": {
                                    "type": "string",
                                    "description": "Аттрибуты",
                                    "example": "[]"
                                  },
                                  "category": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "product": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "employee_id": {
                                    "type": "integer",
                                    "description": "id сотрудника",
                                    "example": 1
                                  },
                                  "discount_points_max": {
                                    "type": "integer",
                                    "description": "Максимально возможное количество баллов для списания в корзине",
                                    "example": 1
                                  },
                                  "reverse_points_rate": {
                                    "type": "string",
                                    "description": "Обратный коэфициент баллов",
                                    "example": "[]"
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "Цена",
                                    "example": "100.0"
                                  },
                                  "expiry_info": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "eligible_quantity": {
                                          "type": "integer",
                                          "description": "Допустимое количество",
                                          "example": 1
                                        },
                                        "eligible_points_rate": {
                                          "type": "integer",
                                          "description": "Приемлемая ставка баллов",
                                          "example": 1
                                        },
                                        "expire_date": {
                                          "type": "string",
                                          "description": "Дата истечения срока действия",
                                          "example": "2021-04-30T12:23:17.003"
                                        },
                                        "bundle_id": {
                                          "type": "integer",
                                          "description": "Идентификатор бандла",
                                          "example": 1
                                        },
                                        "expiring_points": {
                                          "type": "string",
                                          "description": "Истекающие баллы",
                                          "example": "1.0"
                                        }
                                      }
                                    }
                                  },
                                  "new_price": {
                                    "type": "string",
                                    "description": "Цена со скидкой",
                                    "example": "1.0"
                                  },
                                  "min_price": {
                                    "type": "string",
                                    "description": "Минимальная цена",
                                    "example": "1.0"
                                  },
                                  "num": {
                                    "type": "integer",
                                    "description": "Позиция",
                                    "example": 1
                                  },
                                  "marketing_actions": {
                                    "type": "string",
                                    "description": "Список акций",
                                    "example": "Срок действия баллов - 6 месяцев"
                                  },
                                  "quantity": {
                                    "type": "string",
                                    "description": "Количество",
                                    "example": "1"
                                  },
                                  "points_rate": {
                                    "type": "string",
                                    "description": "Коэфициент баллов",
                                    "example": "1.0"
                                  },
                                  "discount_points": {
                                    "type": "integer",
                                    "description": "Скидочные баллы",
                                    "example": 1
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "Количество баллов",
                                    "example": "1.0"
                                  }
                                }
                              }
                            },
                            "positions_count": {
                              "type": "integer",
                              "description": "Счетчик позиций",
                              "example": 1
                            },
                            "total_price": {
                              "type": "integer",
                              "description": "Общая цена",
                              "example": 1
                            },
                            "total_points": {
                              "type": "integer",
                              "description": "Всего баллов",
                              "example": 1
                            },
                            "parent_id": {
                              "type": "integer",
                              "description": "ID родительской корзины",
                              "example": 1
                            },
                            "upsaled": {
                              "type": "string",
                              "example": "[]"
                            },
                            "total_discount_points_max": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине",
                              "example": 1
                            },
                            "extra_points": {
                              "type": "object",
                              "description": "Дополнительные баллы",
                              "properties": {
                                "points_delta": {
                                  "type": "integer",
                                  "description": "Количество дополнительных баллов",
                                  "example": 1
                                },
                                "actions_applied": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "alias": {
                                        "type": "string",
                                        "description": "Alias",
                                        "example": "alias"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      },
                                      "points_delta": {
                                        "type": "integer",
                                        "description": "Количество дополнительных баллов",
                                        "example": 1
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "text_blocks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketing_action": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "alias": {
                                          "type": "string",
                                          "description": "Alias",
                                          "example": "alias"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Имя",
                                          "example": "name"
                                        },
                                        "service_msg": {
                                          "type": "string",
                                          "description": "Сервисное сообщение",
                                          "example": "message"
                                        },
                                        "client_msg": {
                                          "type": "string",
                                          "description": "Клиентское сообщение",
                                          "example": "message"
                                        },
                                        "rewards": {
                                          "type": "object",
                                          "description": "Вознаграждение",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": ["discount"],
                                              "description": "Тип",
                                              "example": "discount"
                                            },
                                            "skus": {
                                              "type": "string",
                                              "description": "Список sku",
                                              "example": "1,2"
                                            },
                                            "quantity_limit": {
                                              "type": "integer",
                                              "description": "Лимит по количеству",
                                              "example": 1
                                            },
                                            "quantity_left": {
                                              "type": "integer",
                                              "description": "Осталось",
                                              "example": 1
                                            }
                                          }
                                        },
                                        "total_quantity_applied": {
                                          "type": "integer",
                                          "description": "Всего принято",
                                          "example": 1
                                        },
                                        "count": {
                                          "type": "integer",
                                          "description": "Количество",
                                          "example": 1
                                        },
                                        "total_discount": {
                                          "type": "integer",
                                          "description": "Общая скидка",
                                          "example": 1
                                        },
                                        "till_date": {
                                          "type": "string",
                                          "description": "Действует до",
                                          "example": "2021-04-30T12:23:17.003"
                                        }
                                      }
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              }
                            },
                            "total_discount_points_max_for_user": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                              "example": 1
                            }
                          }
                        },
                        "marketing_actions_applied": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "possible_marketing_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "category_name": {
                                "type": "string",
                                "description": "Наименование категории",
                                "example": "cat1"
                              },
                              "vars": {
                                "type": "string",
                                "description": "Переменные",
                                "example": "[]"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/get/": {
      "get": {
        "tags": ["Покупки"],
        "summary": "Получить покупку",
        "operationId": "purchases-get",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "verbose_cart",
            "description": "Расширенный ответ сервера",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Расширенный ответ сервера",
              "example": 1,
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "order_num",
            "description": "Номер заказа",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Номер заказа",
              "example": "order"
            },
            "example": "5187-17635"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "store_department_id": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 14864
                    },
                    "price": {
                      "type": "string",
                      "description": "Цена",
                      "example": "100.0"
                    },
                    "points_delta": {
                      "type": "integer",
                      "description": "Разница очков",
                      "example": 1
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order"
                    },
                    "public_key": {
                      "type": "string",
                      "description": "Публичный ключ"
                    },
                    "clerk_pin": {
                      "type": "string",
                      "description": "ПИН-код сотрудника"
                    },
                    "purchase_date": {
                      "type": "string",
                      "description": "Дата заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "completed_date": {
                      "type": "string",
                      "description": "Дата подтверждения заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "is_completed": {
                      "type": "boolean",
                      "description": "Подтверждена",
                      "example": false
                    },
                    "attrs": {
                      "type": "string",
                      "description": "Атрибуты покупки"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "enum": ["ok"],
                          "example": "ok"
                        },
                        "cart": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID",
                              "example": 1
                            },
                            "params": {
                              "type": "string",
                              "description": "Параметры",
                              "example": "{}"
                            },
                            "positions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "custom_attrs": {
                                    "type": "string",
                                    "description": "Аттрибуты",
                                    "example": "[]"
                                  },
                                  "category": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "product": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "employee_id": {
                                    "type": "integer",
                                    "description": "id сотрудника",
                                    "example": 1
                                  },
                                  "discount_points_max": {
                                    "type": "integer",
                                    "description": "Максимально возможное количество баллов для списания в корзине",
                                    "example": 1
                                  },
                                  "reverse_points_rate": {
                                    "type": "string",
                                    "description": "Обратный коэфициент баллов",
                                    "example": "[]"
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "Цена",
                                    "example": "100.0"
                                  },
                                  "expiry_info": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "eligible_quantity": {
                                          "type": "integer",
                                          "description": "Допустимое количество",
                                          "example": 1
                                        },
                                        "eligible_points_rate": {
                                          "type": "integer",
                                          "description": "Приемлемая ставка баллов",
                                          "example": 1
                                        },
                                        "expire_date": {
                                          "type": "string",
                                          "description": "Дата истечения срока действия",
                                          "example": "2021-04-30T12:23:17.003"
                                        },
                                        "bundle_id": {
                                          "type": "integer",
                                          "description": "Идентификатор бандла",
                                          "example": 1
                                        },
                                        "expiring_points": {
                                          "type": "string",
                                          "description": "Истекающие баллы",
                                          "example": "1.0"
                                        }
                                      }
                                    }
                                  },
                                  "new_price": {
                                    "type": "string",
                                    "description": "Цена со скидкой",
                                    "example": "1.0"
                                  },
                                  "min_price": {
                                    "type": "string",
                                    "description": "Минимальная цена",
                                    "example": "1.0"
                                  },
                                  "num": {
                                    "type": "integer",
                                    "description": "Позиция",
                                    "example": 1
                                  },
                                  "marketing_actions": {
                                    "type": "string",
                                    "description": "Список акций",
                                    "example": "Срок действия баллов - 6 месяцев"
                                  },
                                  "quantity": {
                                    "type": "string",
                                    "description": "Количество",
                                    "example": "1"
                                  },
                                  "points_rate": {
                                    "type": "string",
                                    "description": "Коэфициент баллов",
                                    "example": "1.0"
                                  },
                                  "discount_points": {
                                    "type": "integer",
                                    "description": "Скидочные баллы",
                                    "example": 1
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "Количество баллов",
                                    "example": "1.0"
                                  }
                                }
                              }
                            },
                            "positions_count": {
                              "type": "integer",
                              "description": "Счетчик позиций",
                              "example": 1
                            },
                            "total_price": {
                              "type": "integer",
                              "description": "Общая цена",
                              "example": 1
                            },
                            "total_points": {
                              "type": "integer",
                              "description": "Всего баллов",
                              "example": 1
                            },
                            "parent_id": {
                              "type": "integer",
                              "description": "ID родительской корзины",
                              "example": 1
                            },
                            "upsaled": {
                              "type": "string",
                              "example": "[]"
                            },
                            "total_discount_points_max": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине",
                              "example": 1
                            },
                            "extra_points": {
                              "type": "object",
                              "description": "Дополнительные баллы",
                              "properties": {
                                "points_delta": {
                                  "type": "integer",
                                  "description": "Количество дополнительных баллов",
                                  "example": 1
                                },
                                "actions_applied": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "alias": {
                                        "type": "string",
                                        "description": "Alias",
                                        "example": "alias"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      },
                                      "points_delta": {
                                        "type": "integer",
                                        "description": "Количество дополнительных баллов",
                                        "example": 1
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "text_blocks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketing_action": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "alias": {
                                          "type": "string",
                                          "description": "Alias",
                                          "example": "alias"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Имя",
                                          "example": "name"
                                        },
                                        "service_msg": {
                                          "type": "string",
                                          "description": "Сервисное сообщение",
                                          "example": "message"
                                        },
                                        "client_msg": {
                                          "type": "string",
                                          "description": "Клиентское сообщение",
                                          "example": "message"
                                        },
                                        "rewards": {
                                          "type": "object",
                                          "description": "Вознаграждение",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": ["discount"],
                                              "description": "Тип",
                                              "example": "discount"
                                            },
                                            "skus": {
                                              "type": "string",
                                              "description": "Список sku",
                                              "example": "1,2"
                                            },
                                            "quantity_limit": {
                                              "type": "integer",
                                              "description": "Лимит по количеству",
                                              "example": 1
                                            },
                                            "quantity_left": {
                                              "type": "integer",
                                              "description": "Осталось",
                                              "example": 1
                                            }
                                          }
                                        },
                                        "total_quantity_applied": {
                                          "type": "integer",
                                          "description": "Всего принято",
                                          "example": 1
                                        },
                                        "count": {
                                          "type": "integer",
                                          "description": "Количество",
                                          "example": 1
                                        },
                                        "total_discount": {
                                          "type": "integer",
                                          "description": "Общая скидка",
                                          "example": 1
                                        },
                                        "till_date": {
                                          "type": "string",
                                          "description": "Действует до",
                                          "example": "2021-04-30T12:23:17.003"
                                        }
                                      }
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              }
                            },
                            "total_discount_points_max_for_user": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                              "example": 1
                            }
                          }
                        },
                        "marketing_actions_applied": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "possible_marketing_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "category_name": {
                                "type": "string",
                                "description": "Наименование категории",
                                "example": "cat1"
                              },
                              "vars": {
                                "type": "string",
                                "description": "Переменные",
                                "example": "[]"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/edit/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Отредактировать покупку",
        "operationId": "purchases-edit",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["cart", "order_num"],
                    "properties": {
                      "cart": {
                        "type": "string",
                        "description": "Корзина в виде JSON строки",
                        "example": "{\"1\":{\"sku\":\"00023\",\"price\":185,\"quantity\":1},\"2\":{\"sku\":\"0006088\",\"price\":280,\"quantity\":2}}"
                      },
                      "promocodes": {
                        "type": "string",
                        "description": "Список промокодов",
                        "example": "[\"PROMOCODE\"]"
                      },
                      "verbose": {
                        "type": "integer",
                        "description": "Расширенный ответ сервера",
                        "example": 1,
                        "default": 0
                      },
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "store_department_id": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 14864
                    },
                    "price": {
                      "type": "string",
                      "description": "Цена",
                      "example": "100.0"
                    },
                    "points_delta": {
                      "type": "integer",
                      "description": "Разница очков",
                      "example": 1
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order"
                    },
                    "public_key": {
                      "type": "string",
                      "description": "Публичный ключ"
                    },
                    "clerk_pin": {
                      "type": "string",
                      "description": "ПИН-код сотрудника"
                    },
                    "purchase_date": {
                      "type": "string",
                      "description": "Дата заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "completed_date": {
                      "type": "string",
                      "description": "Дата подтверждения заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "is_completed": {
                      "type": "boolean",
                      "description": "Подтверждена",
                      "example": false
                    },
                    "attrs": {
                      "type": "string",
                      "description": "Атрибуты покупки"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "enum": ["ok"],
                          "example": "ok"
                        },
                        "cart": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID",
                              "example": 1
                            },
                            "params": {
                              "type": "string",
                              "description": "Параметры",
                              "example": "{}"
                            },
                            "positions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "custom_attrs": {
                                    "type": "string",
                                    "description": "Аттрибуты",
                                    "example": "[]"
                                  },
                                  "category": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "product": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "employee_id": {
                                    "type": "integer",
                                    "description": "id сотрудника",
                                    "example": 1
                                  },
                                  "discount_points_max": {
                                    "type": "integer",
                                    "description": "Максимально возможное количество баллов для списания в корзине",
                                    "example": 1
                                  },
                                  "reverse_points_rate": {
                                    "type": "string",
                                    "description": "Обратный коэфициент баллов",
                                    "example": "[]"
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "Цена",
                                    "example": "100.0"
                                  },
                                  "expiry_info": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "eligible_quantity": {
                                          "type": "integer",
                                          "description": "Допустимое количество",
                                          "example": 1
                                        },
                                        "eligible_points_rate": {
                                          "type": "integer",
                                          "description": "Приемлемая ставка баллов",
                                          "example": 1
                                        },
                                        "expire_date": {
                                          "type": "string",
                                          "description": "Дата истечения срока действия",
                                          "example": "2021-04-30T12:23:17.003"
                                        },
                                        "bundle_id": {
                                          "type": "integer",
                                          "description": "Идентификатор бандла",
                                          "example": 1
                                        },
                                        "expiring_points": {
                                          "type": "string",
                                          "description": "Истекающие баллы",
                                          "example": "1.0"
                                        }
                                      }
                                    }
                                  },
                                  "new_price": {
                                    "type": "string",
                                    "description": "Цена со скидкой",
                                    "example": "1.0"
                                  },
                                  "min_price": {
                                    "type": "string",
                                    "description": "Минимальная цена",
                                    "example": "1.0"
                                  },
                                  "num": {
                                    "type": "integer",
                                    "description": "Позиция",
                                    "example": 1
                                  },
                                  "marketing_actions": {
                                    "type": "string",
                                    "description": "Список акций",
                                    "example": "Срок действия баллов - 6 месяцев"
                                  },
                                  "quantity": {
                                    "type": "string",
                                    "description": "Количество",
                                    "example": "1"
                                  },
                                  "points_rate": {
                                    "type": "string",
                                    "description": "Коэфициент баллов",
                                    "example": "1.0"
                                  },
                                  "discount_points": {
                                    "type": "integer",
                                    "description": "Скидочные баллы",
                                    "example": 1
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "Количество баллов",
                                    "example": "1.0"
                                  }
                                }
                              }
                            },
                            "positions_count": {
                              "type": "integer",
                              "description": "Счетчик позиций",
                              "example": 1
                            },
                            "total_price": {
                              "type": "integer",
                              "description": "Общая цена",
                              "example": 1
                            },
                            "total_points": {
                              "type": "integer",
                              "description": "Всего баллов",
                              "example": 1
                            },
                            "parent_id": {
                              "type": "integer",
                              "description": "ID родительской корзины",
                              "example": 1
                            },
                            "upsaled": {
                              "type": "string",
                              "example": "[]"
                            },
                            "total_discount_points_max": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине",
                              "example": 1
                            },
                            "extra_points": {
                              "type": "object",
                              "description": "Дополнительные баллы",
                              "properties": {
                                "points_delta": {
                                  "type": "integer",
                                  "description": "Количество дополнительных баллов",
                                  "example": 1
                                },
                                "actions_applied": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "alias": {
                                        "type": "string",
                                        "description": "Alias",
                                        "example": "alias"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      },
                                      "points_delta": {
                                        "type": "integer",
                                        "description": "Количество дополнительных баллов",
                                        "example": 1
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "text_blocks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketing_action": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "alias": {
                                          "type": "string",
                                          "description": "Alias",
                                          "example": "alias"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Имя",
                                          "example": "name"
                                        },
                                        "service_msg": {
                                          "type": "string",
                                          "description": "Сервисное сообщение",
                                          "example": "message"
                                        },
                                        "client_msg": {
                                          "type": "string",
                                          "description": "Клиентское сообщение",
                                          "example": "message"
                                        },
                                        "rewards": {
                                          "type": "object",
                                          "description": "Вознаграждение",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": ["discount"],
                                              "description": "Тип",
                                              "example": "discount"
                                            },
                                            "skus": {
                                              "type": "string",
                                              "description": "Список sku",
                                              "example": "1,2"
                                            },
                                            "quantity_limit": {
                                              "type": "integer",
                                              "description": "Лимит по количеству",
                                              "example": 1
                                            },
                                            "quantity_left": {
                                              "type": "integer",
                                              "description": "Осталось",
                                              "example": 1
                                            }
                                          }
                                        },
                                        "total_quantity_applied": {
                                          "type": "integer",
                                          "description": "Всего принято",
                                          "example": 1
                                        },
                                        "count": {
                                          "type": "integer",
                                          "description": "Количество",
                                          "example": 1
                                        },
                                        "total_discount": {
                                          "type": "integer",
                                          "description": "Общая скидка",
                                          "example": 1
                                        },
                                        "till_date": {
                                          "type": "string",
                                          "description": "Действует до",
                                          "example": "2021-04-30T12:23:17.003"
                                        }
                                      }
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              }
                            },
                            "total_discount_points_max_for_user": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                              "example": 1
                            }
                          }
                        },
                        "marketing_actions_applied": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "possible_marketing_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "category_name": {
                                "type": "string",
                                "description": "Наименование категории",
                                "example": "cat1"
                              },
                              "vars": {
                                "type": "string",
                                "description": "Переменные",
                                "example": "[]"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/confirm/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Подтвердить покупку",
        "operationId": "purchases-confirm",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["order_num"],
                    "properties": {
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "store_department_id": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 14864
                    },
                    "price": {
                      "type": "string",
                      "description": "Цена",
                      "example": "100.0"
                    },
                    "points_delta": {
                      "type": "integer",
                      "description": "Разница очков",
                      "example": 1
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order"
                    },
                    "public_key": {
                      "type": "string",
                      "description": "Публичный ключ"
                    },
                    "clerk_pin": {
                      "type": "string",
                      "description": "ПИН-код сотрудника"
                    },
                    "purchase_date": {
                      "type": "string",
                      "description": "Дата заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "completed_date": {
                      "type": "string",
                      "description": "Дата подтверждения заказа",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "is_completed": {
                      "type": "boolean",
                      "description": "Подтверждена",
                      "example": false
                    },
                    "attrs": {
                      "type": "string",
                      "description": "Атрибуты покупки"
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "enum": ["ok"],
                          "example": "ok"
                        },
                        "cart": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID",
                              "example": 1
                            },
                            "params": {
                              "type": "string",
                              "description": "Параметры",
                              "example": "{}"
                            },
                            "positions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "custom_attrs": {
                                    "type": "string",
                                    "description": "Аттрибуты",
                                    "example": "[]"
                                  },
                                  "category": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "product": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "employee_id": {
                                    "type": "integer",
                                    "description": "id сотрудника",
                                    "example": 1
                                  },
                                  "discount_points_max": {
                                    "type": "integer",
                                    "description": "Максимально возможное количество баллов для списания в корзине",
                                    "example": 1
                                  },
                                  "reverse_points_rate": {
                                    "type": "string",
                                    "description": "Обратный коэфициент баллов",
                                    "example": "[]"
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "Цена",
                                    "example": "100.0"
                                  },
                                  "expiry_info": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "eligible_quantity": {
                                          "type": "integer",
                                          "description": "Допустимое количество",
                                          "example": 1
                                        },
                                        "eligible_points_rate": {
                                          "type": "integer",
                                          "description": "Приемлемая ставка баллов",
                                          "example": 1
                                        },
                                        "expire_date": {
                                          "type": "string",
                                          "description": "Дата истечения срока действия",
                                          "example": "2021-04-30T12:23:17.003"
                                        },
                                        "bundle_id": {
                                          "type": "integer",
                                          "description": "Идентификатор бандла",
                                          "example": 1
                                        },
                                        "expiring_points": {
                                          "type": "string",
                                          "description": "Истекающие баллы",
                                          "example": "1.0"
                                        }
                                      }
                                    }
                                  },
                                  "new_price": {
                                    "type": "string",
                                    "description": "Цена со скидкой",
                                    "example": "1.0"
                                  },
                                  "min_price": {
                                    "type": "string",
                                    "description": "Минимальная цена",
                                    "example": "1.0"
                                  },
                                  "num": {
                                    "type": "integer",
                                    "description": "Позиция",
                                    "example": 1
                                  },
                                  "marketing_actions": {
                                    "type": "string",
                                    "description": "Список акций",
                                    "example": "Срок действия баллов - 6 месяцев"
                                  },
                                  "quantity": {
                                    "type": "string",
                                    "description": "Количество",
                                    "example": "1"
                                  },
                                  "points_rate": {
                                    "type": "string",
                                    "description": "Коэфициент баллов",
                                    "example": "1.0"
                                  },
                                  "discount_points": {
                                    "type": "integer",
                                    "description": "Скидочные баллы",
                                    "example": 1
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "Количество баллов",
                                    "example": "1.0"
                                  }
                                }
                              }
                            },
                            "positions_count": {
                              "type": "integer",
                              "description": "Счетчик позиций",
                              "example": 1
                            },
                            "total_price": {
                              "type": "integer",
                              "description": "Общая цена",
                              "example": 1
                            },
                            "total_points": {
                              "type": "integer",
                              "description": "Всего баллов",
                              "example": 1
                            },
                            "parent_id": {
                              "type": "integer",
                              "description": "ID родительской корзины",
                              "example": 1
                            },
                            "upsaled": {
                              "type": "string",
                              "example": "[]"
                            },
                            "total_discount_points_max": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине",
                              "example": 1
                            },
                            "extra_points": {
                              "type": "object",
                              "description": "Дополнительные баллы",
                              "properties": {
                                "points_delta": {
                                  "type": "integer",
                                  "description": "Количество дополнительных баллов",
                                  "example": 1
                                },
                                "actions_applied": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "alias": {
                                        "type": "string",
                                        "description": "Alias",
                                        "example": "alias"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      },
                                      "points_delta": {
                                        "type": "integer",
                                        "description": "Количество дополнительных баллов",
                                        "example": 1
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "text_blocks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketing_action": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "alias": {
                                          "type": "string",
                                          "description": "Alias",
                                          "example": "alias"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Имя",
                                          "example": "name"
                                        },
                                        "service_msg": {
                                          "type": "string",
                                          "description": "Сервисное сообщение",
                                          "example": "message"
                                        },
                                        "client_msg": {
                                          "type": "string",
                                          "description": "Клиентское сообщение",
                                          "example": "message"
                                        },
                                        "rewards": {
                                          "type": "object",
                                          "description": "Вознаграждение",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": ["discount"],
                                              "description": "Тип",
                                              "example": "discount"
                                            },
                                            "skus": {
                                              "type": "string",
                                              "description": "Список sku",
                                              "example": "1,2"
                                            },
                                            "quantity_limit": {
                                              "type": "integer",
                                              "description": "Лимит по количеству",
                                              "example": 1
                                            },
                                            "quantity_left": {
                                              "type": "integer",
                                              "description": "Осталось",
                                              "example": 1
                                            }
                                          }
                                        },
                                        "total_quantity_applied": {
                                          "type": "integer",
                                          "description": "Всего принято",
                                          "example": 1
                                        },
                                        "count": {
                                          "type": "integer",
                                          "description": "Количество",
                                          "example": 1
                                        },
                                        "total_discount": {
                                          "type": "integer",
                                          "description": "Общая скидка",
                                          "example": 1
                                        },
                                        "till_date": {
                                          "type": "string",
                                          "description": "Действует до",
                                          "example": "2021-04-30T12:23:17.003"
                                        }
                                      }
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              }
                            },
                            "total_discount_points_max_for_user": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                              "example": 1
                            }
                          }
                        },
                        "marketing_actions_applied": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "possible_marketing_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "category_name": {
                                "type": "string",
                                "description": "Наименование категории",
                                "example": "cat1"
                              },
                              "vars": {
                                "type": "string",
                                "description": "Переменные",
                                "example": "[]"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/delete/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Удалить покупку",
        "operationId": "purchases-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["order_num"],
                    "properties": {
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "341251-8865"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status", "id", "order_num"],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/restore/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Восстановить удаленную покупку",
        "operationId": "purchases-restore",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["order_num"],
                    "properties": {
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status"],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/returns/create/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Сделать возврат",
        "operationId": "purchases-returns-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["return_cart"],
                    "properties": {
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order"
                      },
                      "verbose_cart": {
                        "type": "integer",
                        "description": "Расширенный ответ сервера",
                        "example": 1,
                        "default": 0
                      },
                      "return_cart": {
                        "type": "string",
                        "description": "Корзина в виде JSON строки",
                        "example": "{\"1\": {\"quantity\": 3, \"reason\": \"Брак\"},\"3\": {\"quantity\": 1, \"reason\": \"Не подошел размер\"}}"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "purchase": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID",
                          "example": 1
                        },
                        "store_department_id": {
                          "type": "integer",
                          "description": "Идентификатор департамента",
                          "example": 14864
                        },
                        "price": {
                          "type": "string",
                          "description": "Цена",
                          "example": "100.0"
                        },
                        "points_delta": {
                          "type": "integer",
                          "description": "Разница очков",
                          "example": 1
                        },
                        "order_num": {
                          "type": "string",
                          "description": "Номер заказа",
                          "example": "order"
                        },
                        "public_key": {
                          "type": "string",
                          "description": "Публичный ключ"
                        },
                        "clerk_pin": {
                          "type": "string",
                          "description": "ПИН-код сотрудника"
                        },
                        "purchase_date": {
                          "type": "string",
                          "description": "Дата заказа",
                          "example": "2021-04-30T12:23:17.003"
                        },
                        "completed_date": {
                          "type": "string",
                          "description": "Дата подтверждения заказа",
                          "example": "2021-04-30T12:23:17.003"
                        },
                        "is_completed": {
                          "type": "boolean",
                          "description": "Подтверждена",
                          "example": false
                        },
                        "attrs": {
                          "type": "string",
                          "description": "Атрибуты покупки"
                        }
                      }
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "enum": ["ok"],
                          "example": "ok"
                        },
                        "cart": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID",
                              "example": 1
                            },
                            "params": {
                              "type": "string",
                              "description": "Параметры",
                              "example": "{}"
                            },
                            "positions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "custom_attrs": {
                                    "type": "string",
                                    "description": "Аттрибуты",
                                    "example": "[]"
                                  },
                                  "category": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "product": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "employee_id": {
                                    "type": "integer",
                                    "description": "id сотрудника",
                                    "example": 1
                                  },
                                  "discount_points_max": {
                                    "type": "integer",
                                    "description": "Максимально возможное количество баллов для списания в корзине",
                                    "example": 1
                                  },
                                  "reverse_points_rate": {
                                    "type": "string",
                                    "description": "Обратный коэфициент баллов",
                                    "example": "[]"
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "Цена",
                                    "example": "100.0"
                                  },
                                  "expiry_info": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "eligible_quantity": {
                                          "type": "integer",
                                          "description": "Допустимое количество",
                                          "example": 1
                                        },
                                        "eligible_points_rate": {
                                          "type": "integer",
                                          "description": "Приемлемая ставка баллов",
                                          "example": 1
                                        },
                                        "expire_date": {
                                          "type": "string",
                                          "description": "Дата истечения срока действия",
                                          "example": "2021-04-30T12:23:17.003"
                                        },
                                        "bundle_id": {
                                          "type": "integer",
                                          "description": "Идентификатор бандла",
                                          "example": 1
                                        },
                                        "expiring_points": {
                                          "type": "string",
                                          "description": "Истекающие баллы",
                                          "example": "1.0"
                                        }
                                      }
                                    }
                                  },
                                  "new_price": {
                                    "type": "string",
                                    "description": "Цена со скидкой",
                                    "example": "1.0"
                                  },
                                  "min_price": {
                                    "type": "string",
                                    "description": "Минимальная цена",
                                    "example": "1.0"
                                  },
                                  "num": {
                                    "type": "integer",
                                    "description": "Позиция",
                                    "example": 1
                                  },
                                  "marketing_actions": {
                                    "type": "string",
                                    "description": "Список акций",
                                    "example": "Срок действия баллов - 6 месяцев"
                                  },
                                  "quantity": {
                                    "type": "string",
                                    "description": "Количество",
                                    "example": "1"
                                  },
                                  "points_rate": {
                                    "type": "string",
                                    "description": "Коэфициент баллов",
                                    "example": "1.0"
                                  },
                                  "discount_points": {
                                    "type": "integer",
                                    "description": "Скидочные баллы",
                                    "example": 1
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "Количество баллов",
                                    "example": "1.0"
                                  }
                                }
                              }
                            },
                            "positions_count": {
                              "type": "integer",
                              "description": "Счетчик позиций",
                              "example": 1
                            },
                            "total_price": {
                              "type": "integer",
                              "description": "Общая цена",
                              "example": 1
                            },
                            "total_points": {
                              "type": "integer",
                              "description": "Всего баллов",
                              "example": 1
                            },
                            "parent_id": {
                              "type": "integer",
                              "description": "ID родительской корзины",
                              "example": 1
                            },
                            "upsaled": {
                              "type": "string",
                              "example": "[]"
                            },
                            "total_discount_points_max": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине",
                              "example": 1
                            },
                            "extra_points": {
                              "type": "object",
                              "description": "Дополнительные баллы",
                              "properties": {
                                "points_delta": {
                                  "type": "integer",
                                  "description": "Количество дополнительных баллов",
                                  "example": 1
                                },
                                "actions_applied": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "alias": {
                                        "type": "string",
                                        "description": "Alias",
                                        "example": "alias"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      },
                                      "points_delta": {
                                        "type": "integer",
                                        "description": "Количество дополнительных баллов",
                                        "example": 1
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "text_blocks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketing_action": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "alias": {
                                          "type": "string",
                                          "description": "Alias",
                                          "example": "alias"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Имя",
                                          "example": "name"
                                        },
                                        "service_msg": {
                                          "type": "string",
                                          "description": "Сервисное сообщение",
                                          "example": "message"
                                        },
                                        "client_msg": {
                                          "type": "string",
                                          "description": "Клиентское сообщение",
                                          "example": "message"
                                        },
                                        "rewards": {
                                          "type": "object",
                                          "description": "Вознаграждение",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": ["discount"],
                                              "description": "Тип",
                                              "example": "discount"
                                            },
                                            "skus": {
                                              "type": "string",
                                              "description": "Список sku",
                                              "example": "1,2"
                                            },
                                            "quantity_limit": {
                                              "type": "integer",
                                              "description": "Лимит по количеству",
                                              "example": 1
                                            },
                                            "quantity_left": {
                                              "type": "integer",
                                              "description": "Осталось",
                                              "example": 1
                                            }
                                          }
                                        },
                                        "total_quantity_applied": {
                                          "type": "integer",
                                          "description": "Всего принято",
                                          "example": 1
                                        },
                                        "count": {
                                          "type": "integer",
                                          "description": "Количество",
                                          "example": 1
                                        },
                                        "total_discount": {
                                          "type": "integer",
                                          "description": "Общая скидка",
                                          "example": 1
                                        },
                                        "till_date": {
                                          "type": "string",
                                          "description": "Действует до",
                                          "example": "2021-04-30T12:23:17.003"
                                        }
                                      }
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              }
                            },
                            "total_discount_points_max_for_user": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                              "example": 1
                            }
                          }
                        },
                        "marketing_actions_applied": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "possible_marketing_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "category_name": {
                                "type": "string",
                                "description": "Наименование категории",
                                "example": "cat1"
                              },
                              "vars": {
                                "type": "string",
                                "description": "Переменные",
                                "example": "[]"
                              }
                            }
                          }
                        }
                      }
                    },
                    "cart_return": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/returns/delete/": {
      "post": {
        "tags": ["Покупки"],
        "summary": "Отменить возврат",
        "operationId": "purchases-returns-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["cart_return_id"],
                    "properties": {
                      "cart_return_id": {
                        "type": "integer",
                        "description": "ID возврата",
                        "example": 23874
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cart": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Статус ответа",
                          "enum": ["ok"],
                          "example": "ok"
                        },
                        "cart": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID",
                              "example": 1
                            },
                            "params": {
                              "type": "string",
                              "description": "Параметры",
                              "example": "{}"
                            },
                            "positions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "custom_attrs": {
                                    "type": "string",
                                    "description": "Аттрибуты",
                                    "example": "[]"
                                  },
                                  "category": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "product": {
                                    "type": "object",
                                    "properties": {
                                      "sku": {
                                        "type": "string",
                                        "description": "SKU",
                                        "example": "sku1"
                                      },
                                      "id": {
                                        "type": "integer",
                                        "description": "ID",
                                        "example": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      }
                                    }
                                  },
                                  "employee_id": {
                                    "type": "integer",
                                    "description": "id сотрудника",
                                    "example": 1
                                  },
                                  "discount_points_max": {
                                    "type": "integer",
                                    "description": "Максимально возможное количество баллов для списания в корзине",
                                    "example": 1
                                  },
                                  "reverse_points_rate": {
                                    "type": "string",
                                    "description": "Обратный коэфициент баллов",
                                    "example": "[]"
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "Цена",
                                    "example": "100.0"
                                  },
                                  "expiry_info": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "eligible_quantity": {
                                          "type": "integer",
                                          "description": "Допустимое количество",
                                          "example": 1
                                        },
                                        "eligible_points_rate": {
                                          "type": "integer",
                                          "description": "Приемлемая ставка баллов",
                                          "example": 1
                                        },
                                        "expire_date": {
                                          "type": "string",
                                          "description": "Дата истечения срока действия",
                                          "example": "2021-04-30T12:23:17.003"
                                        },
                                        "bundle_id": {
                                          "type": "integer",
                                          "description": "Идентификатор бандла",
                                          "example": 1
                                        },
                                        "expiring_points": {
                                          "type": "string",
                                          "description": "Истекающие баллы",
                                          "example": "1.0"
                                        }
                                      }
                                    }
                                  },
                                  "new_price": {
                                    "type": "string",
                                    "description": "Цена со скидкой",
                                    "example": "1.0"
                                  },
                                  "min_price": {
                                    "type": "string",
                                    "description": "Минимальная цена",
                                    "example": "1.0"
                                  },
                                  "num": {
                                    "type": "integer",
                                    "description": "Позиция",
                                    "example": 1
                                  },
                                  "marketing_actions": {
                                    "type": "string",
                                    "description": "Список акций",
                                    "example": "Срок действия баллов - 6 месяцев"
                                  },
                                  "quantity": {
                                    "type": "string",
                                    "description": "Количество",
                                    "example": "1"
                                  },
                                  "points_rate": {
                                    "type": "string",
                                    "description": "Коэфициент баллов",
                                    "example": "1.0"
                                  },
                                  "discount_points": {
                                    "type": "integer",
                                    "description": "Скидочные баллы",
                                    "example": 1
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "Количество баллов",
                                    "example": "1.0"
                                  }
                                }
                              }
                            },
                            "positions_count": {
                              "type": "integer",
                              "description": "Счетчик позиций",
                              "example": 1
                            },
                            "total_price": {
                              "type": "integer",
                              "description": "Общая цена",
                              "example": 1
                            },
                            "total_points": {
                              "type": "integer",
                              "description": "Всего баллов",
                              "example": 1
                            },
                            "parent_id": {
                              "type": "integer",
                              "description": "ID родительской корзины",
                              "example": 1
                            },
                            "upsaled": {
                              "type": "string",
                              "example": "[]"
                            },
                            "total_discount_points_max": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине",
                              "example": 1
                            },
                            "extra_points": {
                              "type": "object",
                              "description": "Дополнительные баллы",
                              "properties": {
                                "points_delta": {
                                  "type": "integer",
                                  "description": "Количество дополнительных баллов",
                                  "example": 1
                                },
                                "actions_applied": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "alias": {
                                        "type": "string",
                                        "description": "Alias",
                                        "example": "alias"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "Имя",
                                        "example": "name"
                                      },
                                      "points_delta": {
                                        "type": "integer",
                                        "description": "Количество дополнительных баллов",
                                        "example": 1
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "text_blocks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketing_action": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "alias": {
                                          "type": "string",
                                          "description": "Alias",
                                          "example": "alias"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Имя",
                                          "example": "name"
                                        },
                                        "service_msg": {
                                          "type": "string",
                                          "description": "Сервисное сообщение",
                                          "example": "message"
                                        },
                                        "client_msg": {
                                          "type": "string",
                                          "description": "Клиентское сообщение",
                                          "example": "message"
                                        },
                                        "rewards": {
                                          "type": "object",
                                          "description": "Вознаграждение",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": ["discount"],
                                              "description": "Тип",
                                              "example": "discount"
                                            },
                                            "skus": {
                                              "type": "string",
                                              "description": "Список sku",
                                              "example": "1,2"
                                            },
                                            "quantity_limit": {
                                              "type": "integer",
                                              "description": "Лимит по количеству",
                                              "example": 1
                                            },
                                            "quantity_left": {
                                              "type": "integer",
                                              "description": "Осталось",
                                              "example": 1
                                            }
                                          }
                                        },
                                        "total_quantity_applied": {
                                          "type": "integer",
                                          "description": "Всего принято",
                                          "example": 1
                                        },
                                        "count": {
                                          "type": "integer",
                                          "description": "Количество",
                                          "example": 1
                                        },
                                        "total_discount": {
                                          "type": "integer",
                                          "description": "Общая скидка",
                                          "example": 1
                                        },
                                        "till_date": {
                                          "type": "string",
                                          "description": "Действует до",
                                          "example": "2021-04-30T12:23:17.003"
                                        }
                                      }
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              }
                            },
                            "total_discount_points_max_for_user": {
                              "type": "integer",
                              "description": "Максимально возможное количество баллов для списания в корзине с учетом баланса клиента",
                              "example": 1
                            }
                          }
                        },
                        "marketing_actions_applied": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "possible_marketing_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alias": {
                                "type": "string",
                                "description": "Alias",
                                "example": "alias"
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "service_msg": {
                                "type": "string",
                                "description": "Сервисное сообщение",
                                "example": "message"
                              },
                              "client_msg": {
                                "type": "string",
                                "description": "Клиентское сообщение",
                                "example": "message"
                              },
                              "rewards": {
                                "type": "object",
                                "description": "Вознаграждение",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": ["discount"],
                                    "description": "Тип",
                                    "example": "discount"
                                  },
                                  "skus": {
                                    "type": "string",
                                    "description": "Список sku",
                                    "example": "1,2"
                                  },
                                  "quantity_limit": {
                                    "type": "integer",
                                    "description": "Лимит по количеству",
                                    "example": 1
                                  },
                                  "quantity_left": {
                                    "type": "integer",
                                    "description": "Осталось",
                                    "example": 1
                                  }
                                }
                              },
                              "total_quantity_applied": {
                                "type": "integer",
                                "description": "Всего принято",
                                "example": 1
                              },
                              "count": {
                                "type": "integer",
                                "description": "Количество",
                                "example": 1
                              },
                              "total_discount": {
                                "type": "integer",
                                "description": "Общая скидка",
                                "example": 1
                              },
                              "till_date": {
                                "type": "string",
                                "description": "Действует до",
                                "example": "2021-04-30T12:23:17.003"
                              }
                            }
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "name"
                              },
                              "price": {
                                "type": "string",
                                "description": "Цена",
                                "example": "100.0"
                              },
                              "sku": {
                                "type": "string",
                                "description": "SKU",
                                "example": "sku1"
                              },
                              "category_name": {
                                "type": "string",
                                "description": "Наименование категории",
                                "example": "cat1"
                              },
                              "vars": {
                                "type": "string",
                                "description": "Переменные",
                                "example": "[]"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/purchase-attributes/add/": {
      "post": {
        "tags": ["Атрибуты покупок"],
        "summary": "Создать атрибут",
        "operationId": "purchases-purchase-attributes-add",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["alias", "value_type"],
                    "properties": {
                      "alias": {
                        "type": "string",
                        "description": "Наименование атрибута",
                        "example": "delivery_type"
                      },
                      "value_type": {
                        "type": "string",
                        "description": "Тип значения атрибута. Возможные типы: str, float, text, date, bool",
                        "example": "str"
                      },
                      "description": {
                        "type": "string",
                        "description": "Описание атрибута. Используется для хранения служебной информации",
                        "example": "Некоторое описание"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "alias": {
                      "type": "string",
                      "description": "Наименование атрибута",
                      "example": "delivery_type"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Дата создания",
                      "example": "2021-12-20T15:21:29.119"
                    },
                    "value_type": {
                      "type": "string",
                      "description": "Тип значения атрибута. Возможные типы: str, float, text, date, bool",
                      "example": "str"
                    },
                    "description": {
                      "type": "string",
                      "description": "Описание атрибута. Используется для хранения служебной информации",
                      "example": "Некоторое описание"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/purchase-attributes/delete/": {
      "post": {
        "tags": ["Атрибуты покупок"],
        "summary": "Удалить атрибут",
        "operationId": "purchases-purchase-attributes-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "alias": {
                        "type": "string",
                        "description": "Наименование атриубта",
                        "example": "delivery_type"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/purchase-attributes/list/": {
      "get": {
        "tags": ["Атрибуты покупок"],
        "summary": "Получить список атрибутов",
        "operationId": "purchases-purchase-attributes-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "description": "Наименование атрибута",
                            "example": "delivery_type"
                          },
                          "create_date": {
                            "type": "string",
                            "description": "Дата создания",
                            "example": "2021-12-20T15:21:29.119"
                          },
                          "value_type": {
                            "type": "string",
                            "description": "Тип значения атрибута. Возможные типы: str, float, text, date, bool",
                            "example": "str"
                          },
                          "description": {
                            "type": "string",
                            "description": "Описание атрибута. Используется для хранения служебной информации",
                            "example": "Некоторое описание"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/purchase-attributes/values/add/": {
      "post": {
        "tags": ["Атрибуты покупок"],
        "summary": "Создать значение атрибута",
        "operationId": "purchases-purchase-attributes-values-add",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["attr_alias", "value"],
                    "properties": {
                      "attr_alias": {
                        "type": "string",
                        "description": "Наименование атрибута",
                        "example": "delivery_type"
                      },
                      "value": {
                        "type": "string",
                        "description": "Значения атрибута",
                        "example": "store"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор созданного значения атрибута",
                      "example": 4356
                    },
                    "value": {
                      "type": "string",
                      "description": "Значение атрибута",
                      "example": "store"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/purchase-attributes/values/delete/": {
      "post": {
        "tags": ["Атрибуты покупок"],
        "summary": "Удалить значение атрибута",
        "operationId": "purchases-purchase-attributes-values-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["id"],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Идентификатор значения",
                        "example": 32131
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchases/purchase-attributes/values/list/": {
      "get": {
        "tags": ["Атрибуты покупок"],
        "summary": "Получить список всех значений атрибута",
        "operationId": "purchases-purchase-attributes-values-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "attr_alias",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Наименование атрибута",
              "example": "delivery_type"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "num_pages": {
                      "type": "integer",
                      "description": "Кол-во страниц пагинации",
                      "example": 5
                    },
                    "items_per_page": {
                      "type": "integer",
                      "description": "Указатель кол-ва объектов значений на странице",
                      "example": 20
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор значения",
                            "example": 34563
                          },
                          "value": {
                            "type": "string",
                            "description": "Значение атрибута",
                            "example": "store"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/promocodes/groups/list/": {
      "get": {
        "tags": ["Промокоды"],
        "summary": "Получить список групп",
        "operationId": "promocodes-groups-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "disabled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "create_date": {
                            "type": "string",
                            "description": "Дата создания",
                            "example": "2016-09-29T23:14:50"
                          },
                          "reserved_count": {
                            "type": "integer",
                            "description": "Количество промокодов доступное для выдачи",
                            "example": 500
                          },
                          "apply_items_once": {
                            "type": "boolean",
                            "description": "Уникальность промокодов",
                            "example": true
                          },
                          "receipted_count": {
                            "type": "integer",
                            "description": "Количество выданных промокодов",
                            "example": 120
                          },
                          "applied_count": {
                            "type": "integer",
                            "description": "Rоличество промокодов примененное к покупке",
                            "example": 12
                          },
                          "unused_count": {
                            "type": "integer",
                            "description": "Количество неиспользованных промокодов",
                            "example": 450
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор группы"
                          },
                          "update_date": {
                            "type": "string",
                            "description": "Дата обновления",
                            "example": "2021-09-29T23:14:50"
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование группы",
                            "example": "Группа 123"
                          },
                          "total_count": {
                            "type": "integer",
                            "description": "Общее количество промокодов",
                            "example": 1000
                          },
                          "group_type": {
                            "type": "integer",
                            "description": "Тип группы"
                          },
                          "marketing_actions": {
                            "type": "array",
                            "description": "Маркетинговые акции, в условиях которых задействована гурппа промокодов"
                          }
                        }
                      }
                    },
                    "enabled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "create_date": {
                            "type": "string",
                            "description": "Дата создания",
                            "example": "2016-09-29T23:14:50"
                          },
                          "reserved_count": {
                            "type": "integer",
                            "description": "Количество промокодов доступное для выдачи",
                            "example": 500
                          },
                          "apply_items_once": {
                            "type": "boolean",
                            "description": "Уникальность промокодов",
                            "example": true
                          },
                          "receipted_count": {
                            "type": "integer",
                            "description": "Количество выданных промокодов",
                            "example": 120
                          },
                          "applied_count": {
                            "type": "integer",
                            "description": "Rоличество промокодов примененное к покупке",
                            "example": 12
                          },
                          "unused_count": {
                            "type": "integer",
                            "description": "Количество неиспользованных промокодов",
                            "example": 450
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор группы"
                          },
                          "update_date": {
                            "type": "string",
                            "description": "Дата обновления",
                            "example": "2021-09-29T23:14:50"
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование группы",
                            "example": "Группа 123"
                          },
                          "total_count": {
                            "type": "integer",
                            "description": "Общее количество промокодов",
                            "example": 1000
                          },
                          "group_type": {
                            "type": "integer",
                            "description": "Тип группы"
                          },
                          "marketing_actions": {
                            "type": "array",
                            "description": "Маркетинговые акции, в условиях которых задействована гурппа промокодов"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/promocodes/search/": {
      "get": {
        "tags": ["Промокоды"],
        "summary": "Найти информацию по промокоду",
        "operationId": "promocodes-search",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Промокод",
              "example": "PROMO123"
            }
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "promocodes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "issued_to": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Идентификатор клиента",
                                "example": 432435642
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "Григорий"
                              }
                            }
                          },
                          "purchase_id": {
                            "type": "integer",
                            "description": "Идентификатор покупки",
                            "example": 6529874583
                          },
                          "receipt_date": {
                            "type": "string",
                            "description": "Дата выдачи",
                            "example": "2020-03-28T11:01:54.503"
                          },
                          "number": {
                            "type": "string",
                            "description": "Номер",
                            "example": "PROMO"
                          },
                          "group": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "integer",
                                "description": "Статус",
                                "example": 2
                              },
                              "type": {
                                "type": "integer",
                                "description": "Тип",
                                "example": 3
                              },
                              "name": {
                                "type": "string",
                                "description": "Наименование",
                                "example": "Группа 123"
                              }
                            }
                          },
                          "issued_by": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Идентификатор клиента",
                                "example": 432435642
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "Григорий"
                              }
                            }
                          },
                          "date_of_use": {
                            "type": "string",
                            "description": "Дата использования",
                            "example": "2020-05-28T11:01:54.503"
                          },
                          "order_num": {
                            "type": "string",
                            "description": "Номер заказа",
                            "example": "234-564345"
                          },
                          "marketing_action": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "integer",
                                  "description": "Статус",
                                  "example": 2
                                },
                                "id": {
                                  "type": "integer",
                                  "description": "Идентификатор",
                                  "example": 43523
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Наименование",
                                  "example": "Акция 123"
                                }
                              }
                            }
                          },
                          "possible_marketing_action": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "integer",
                                  "description": "Статус",
                                  "example": 2
                                },
                                "id": {
                                  "type": "integer",
                                  "description": "Идентификатор",
                                  "example": 43523
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Наименование",
                                  "example": "Акция 123"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/promocodes/activate/": {
      "post": {
        "tags": ["Промокоды"],
        "summary": "Активировать промокод",
        "operationId": "promocodes-activate",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "group_name", "number"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "70003214567"
                      },
                      "group_name": {
                        "type": "string",
                        "description": "Наименование группы",
                        "example": "Группа 1"
                      },
                      "number": {
                        "type": "string",
                        "description": "Промокод",
                        "example": "PROMO123"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "promocode_status": {
                      "type": "integer",
                      "description": "Статус",
                      "example": 2
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/promocodes/issue/": {
      "post": {
        "tags": ["Промокоды"],
        "summary": "Выдать промокод",
        "operationId": "promocodes-issue",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "group_name"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона",
                        "example": "70003214567"
                      },
                      "group_name": {
                        "type": "string",
                        "description": "Наименование группы",
                        "example": "Группа 1"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "promocode": {
                      "type": "object",
                      "properties": {
                        "issued_to": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Идентификатор клиента",
                              "example": 432435642
                            },
                            "name": {
                              "type": "string",
                              "description": "Имя",
                              "example": "Григорий"
                            }
                          }
                        },
                        "purchase_id": {
                          "type": "integer",
                          "description": "Идентификатор покупки",
                          "example": 6529874583
                        },
                        "receipt_date": {
                          "type": "string",
                          "description": "Дата выдачи",
                          "example": "2020-03-28T11:01:54.503"
                        },
                        "number": {
                          "type": "string",
                          "description": "Номер",
                          "example": "PROMO"
                        },
                        "group": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "integer",
                              "description": "Статус",
                              "example": 2
                            },
                            "type": {
                              "type": "integer",
                              "description": "Тип",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "description": "Наименование",
                              "example": "Группа 123"
                            }
                          }
                        },
                        "issued_by": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Идентификатор клиента",
                              "example": 432435642
                            },
                            "name": {
                              "type": "string",
                              "description": "Имя",
                              "example": "Григорий"
                            }
                          }
                        },
                        "date_of_use": {
                          "type": "string",
                          "description": "Дата использования",
                          "example": "2020-05-28T11:01:54.503"
                        },
                        "order_num": {
                          "type": "string",
                          "description": "Номер заказа",
                          "example": "234-564345"
                        },
                        "marketing_action": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "integer",
                                "description": "Статус",
                                "example": 2
                              },
                              "id": {
                                "type": "integer",
                                "description": "Идентификатор",
                                "example": 43523
                              },
                              "name": {
                                "type": "string",
                                "description": "Наименование",
                                "example": "Акция 123"
                              }
                            }
                          }
                        },
                        "possible_marketing_action": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "integer",
                                "description": "Статус",
                                "example": 2
                              },
                              "id": {
                                "type": "integer",
                                "description": "Идентификатор",
                                "example": 43523
                              },
                              "name": {
                                "type": "string",
                                "description": "Наименование",
                                "example": "Акция 123"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/promocodes/list-for-user/": {
      "get": {
        "tags": ["Промокоды"],
        "summary": "Получить спиcок промокодов клиента",
        "operationId": "promocodes-list-for-user",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "user_phone",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "79653215476",
            "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "promocodes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "issued_to": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Идентификатор клиента",
                                "example": 432435642
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "Григорий"
                              }
                            }
                          },
                          "purchase_id": {
                            "type": "integer",
                            "description": "Идентификатор покупки",
                            "example": 6529874583
                          },
                          "receipt_date": {
                            "type": "string",
                            "description": "Дата выдачи",
                            "example": "2020-03-28T11:01:54.503"
                          },
                          "number": {
                            "type": "string",
                            "description": "Номер",
                            "example": "PROMO"
                          },
                          "group": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "integer",
                                "description": "Статус",
                                "example": 2
                              },
                              "type": {
                                "type": "integer",
                                "description": "Тип",
                                "example": 3
                              },
                              "name": {
                                "type": "string",
                                "description": "Наименование",
                                "example": "Группа 123"
                              }
                            }
                          },
                          "issued_by": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Идентификатор клиента",
                                "example": 432435642
                              },
                              "name": {
                                "type": "string",
                                "description": "Имя",
                                "example": "Григорий"
                              }
                            }
                          },
                          "date_of_use": {
                            "type": "string",
                            "description": "Дата использования",
                            "example": "2020-05-28T11:01:54.503"
                          },
                          "order_num": {
                            "type": "string",
                            "description": "Номер заказа",
                            "example": "234-564345"
                          },
                          "marketing_action": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "integer",
                                  "description": "Статус",
                                  "example": 2
                                },
                                "id": {
                                  "type": "integer",
                                  "description": "Идентификатор",
                                  "example": 43523
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Наименование",
                                  "example": "Акция 123"
                                }
                              }
                            }
                          },
                          "possible_marketing_action": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "integer",
                                  "description": "Статус",
                                  "example": 2
                                },
                                "id": {
                                  "type": "integer",
                                  "description": "Идентификатор",
                                  "example": 43523
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Наименование",
                                  "example": "Акция 123"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/categories/add/": {
      "post": {
        "summary": "Создать категорию",
        "operationId": "basket-categories-add",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name", "sku"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование категории",
                        "example": "name"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор категории",
                        "example": "sku"
                      },
                      "parent_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор категории-родителя",
                        "example": "sku"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "id",
                    "name",
                    "sku",
                    "points_rate",
                    "pic",
                    "parent_sku",
                    "create_date"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование категории",
                      "example": "name"
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор категории",
                      "example": "sku"
                    },
                    "parent_sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор категории-родителя",
                      "example": "sku"
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент конвертации",
                      "example": 1
                    },
                    "pic": {
                      "type": "string",
                      "description": "Изображение"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Дата создания",
                      "example": "2021-04-30T12:23:17.003"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/categories/edit/": {
      "post": {
        "summary": "Редактировать категорию",
        "operationId": "basket-categories-edit",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name", "sku"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование категории",
                        "example": "name"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор категории",
                        "example": "sku"
                      },
                      "parent_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор категории-родителя",
                        "example": "sku"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "id",
                    "name",
                    "sku",
                    "points_rate",
                    "pic",
                    "parent_sku",
                    "create_date"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование категории",
                      "example": "name"
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор категории",
                      "example": "sku"
                    },
                    "parent_sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор категории-родителя",
                      "example": "sku"
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент конвертации",
                      "example": 1
                    },
                    "pic": {
                      "type": "string",
                      "description": "Изображение"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Дата создания",
                      "example": "2021-04-30T12:23:17.003"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/categories/list/": {
      "get": {
        "tags": ["Товарный справочник"],
        "summary": "Получить список категорий",
        "operationId": "basket-categories-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "sku",
            "required": false,
            "schema": {
              "type": "string",
              "example": "sku"
            },
            "description": "Внутренний идентификатор категории"
          },
          {
            "in": "query",
            "name": "parent_sku",
            "required": false,
            "schema": {
              "type": "string",
              "example": "sku"
            },
            "description": "Внутренний идентификатор категории-родителя"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status", "categories"],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "categories": {
                      "type": "array",
                      "description": "Список категорий",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "sku",
                          "points_rate",
                          "pic",
                          "parent_sku",
                          "create_date"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Наименование категории",
                            "example": "name"
                          },
                          "sku": {
                            "type": "string",
                            "description": "Внутренний идентификатор категории",
                            "example": "sku"
                          },
                          "parent_sku": {
                            "type": "string",
                            "description": "Внутренний идентификатор категории-родителя",
                            "example": "sku"
                          },
                          "points_rate": {
                            "type": "integer",
                            "description": "Коэффициент конвертации",
                            "example": 1
                          },
                          "pic": {
                            "type": "string",
                            "description": "Изображение"
                          },
                          "create_date": {
                            "type": "string",
                            "description": "Дата создания",
                            "example": "2021-04-30T12:23:17.003"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/products/add/": {
      "post": {
        "summary": "Создать товар",
        "operationId": "basket-products-add",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование товара",
                        "example": "name"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор товара",
                        "example": "sku"
                      },
                      "category_sku": {
                        "type": "string",
                        "description": "Внутренний идентифкатор категории",
                        "example": "default"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "ID",
                      "example": 1
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор товара",
                      "example": "sku"
                    },
                    "category_sku": {
                      "type": "string",
                      "description": "Внутренний идентифкатор категории",
                      "example": "default"
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент конвертации",
                      "example": 1
                    },
                    "pic": {
                      "type": "string",
                      "description": "Изображение"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Дата создания",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "category_name": {
                      "type": "string",
                      "description": "Имя категории товара",
                      "example": "default"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование товара",
                      "example": "name"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/products/edit/": {
      "post": {
        "summary": "Редактировать товар",
        "operationId": "basket-products-edit",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование товара",
                        "example": "name"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор товара",
                        "example": "sku"
                      },
                      "category_sku": {
                        "type": "string",
                        "description": "Внутренний идентифкатор категории",
                        "example": "default"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование товара",
                      "example": "name"
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент конвертации",
                      "example": 1
                    },
                    "pic": {
                      "type": "string",
                      "description": "Изображение"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Дата создания",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "category_sku": {
                      "type": "string",
                      "description": "Внутренний идентифкатор категории",
                      "example": "default"
                    },
                    "category_name": {
                      "type": "string",
                      "description": "Имя категории товара",
                      "example": "default"
                    },
                    "attributes": {
                      "type": "array",
                      "description": "Список атрибутов и значений",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Наименование атрибута",
                            "example": "name"
                          },
                          "sku": {
                            "type": "string",
                            "description": "Внутренний идентификатор атрибута",
                            "example": "sku"
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": ["sku", "value"],
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "description": "Внутренний идентификатор значения",
                                  "example": "sku_val"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Значение атрибута",
                                  "example": "value"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/products/list/": {
      "get": {
        "summary": "Получить список товаров",
        "operationId": "basket-products-list",
        "description": "",
        "tags": ["Товарный справочник"],
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "sku",
            "required": false,
            "schema": {
              "type": "string",
              "example": "sku"
            },
            "description": "Внутренний идентификатор категории"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование товара",
                      "example": "name"
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент конвертации",
                      "example": 1
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Дата создания",
                      "example": "2021-04-30T12:23:17.003"
                    },
                    "category_sku": {
                      "type": "string",
                      "description": "Внутренний идентифкатор категории",
                      "example": "default"
                    },
                    "category_name": {
                      "type": "string",
                      "description": "Имя категории товара",
                      "example": "default"
                    },
                    "attributes": {
                      "type": "array",
                      "description": "Список атрибутов и значений",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Наименование атрибута",
                            "example": "name"
                          },
                          "sku": {
                            "type": "string",
                            "description": "Внутренний идентификатор атрибута",
                            "example": "sku"
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": ["sku", "value"],
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "description": "Внутренний идентификатор значения",
                                  "example": "sku_val"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Значение атрибута",
                                  "example": "value"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/add/": {
      "post": {
        "summary": "Создать атрибут",
        "operationId": "basket-attributes-add",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku", "name", "data_type"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование атрибута",
                        "example": "name"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku"
                      },
                      "attr_type": {
                        "type": "string",
                        "description": "Тип атрибута",
                        "enum": ["single_value", "multi_value"],
                        "example": "single_value",
                        "default": "single_value"
                      },
                      "data_type": {
                        "type": "string",
                        "description": "Тип значения атрибута",
                        "enum": ["text", "float"],
                        "example": "text"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование атрибута",
                      "example": "name"
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор атрибута",
                      "example": "sku"
                    },
                    "data_type": {
                      "type": "string",
                      "description": "Тип значения атрибута",
                      "enum": ["text", "float"],
                      "example": "text"
                    },
                    "attr_type": {
                      "type": "string",
                      "description": "Тип атрибута",
                      "enum": ["single_value", "multi_value"],
                      "example": "single_value",
                      "default": "single_value"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/edit/": {
      "post": {
        "summary": "Редактировать атрибут",
        "operationId": "basket-attributes-edit",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование атрибута",
                        "example": "name"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование атрибута",
                      "example": "name"
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор атрибута",
                      "example": "sku"
                    },
                    "data_type": {
                      "type": "string",
                      "description": "Тип значения атрибута",
                      "enum": ["text", "float"],
                      "example": "text"
                    },
                    "attr_type": {
                      "type": "string",
                      "description": "Тип атрибута",
                      "enum": ["single_value", "multi_value"],
                      "example": "single_value",
                      "default": "single_value"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/list/": {
      "get": {
        "summary": "Получить список атрибутов",
        "operationId": "basket-attributes-list",
        "description": "",
        "tags": ["Товарный справочник"],
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "sku",
            "required": false,
            "schema": {
              "type": "string",
              "example": "sku"
            },
            "description": "Внутренний идентификатор категории"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "attributes": {
                      "type": "array",
                      "description": "Список аттрибутов",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Наименование атрибута",
                            "example": "name"
                          },
                          "sku": {
                            "type": "string",
                            "description": "Внутренний идентификатор атрибута",
                            "example": "sku"
                          },
                          "attr_type": {
                            "type": "string",
                            "description": "Тип атрибута",
                            "enum": ["single_value", "multi_value"],
                            "example": "single_value",
                            "default": "single_value"
                          },
                          "value_type": {
                            "type": "string",
                            "description": "Тип значения атрибута",
                            "enum": ["text", "float"],
                            "example": "text"
                          },
                          "values": {
                            "type": "array",
                            "description": "Список значений атрибутов",
                            "items": {
                              "type": "object",
                              "required": ["sku", "value_type", "value"],
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "description": "Внутренний идентификатор атрибута",
                                  "example": "sku"
                                },
                                "value_type": {
                                  "type": "string",
                                  "description": "Тип значения атрибута",
                                  "enum": ["text", "float"],
                                  "example": "text"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Значение атрибута",
                                  "example": "value"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/values/add/": {
      "post": {
        "summary": "Создать значение атрибута",
        "operationId": "basket-attributes-values-add",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku", "value_sku", "value"],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku"
                      },
                      "value_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор значения",
                        "example": "value_sku"
                      },
                      "value": {
                        "type": "string",
                        "description": "Значение",
                        "example": "value"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор значения",
                      "example": "value_sku"
                    },
                    "attribute_sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор атрибута",
                      "example": "sku"
                    },
                    "value": {
                      "type": "string",
                      "description": "Значение",
                      "example": "value"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/values/edit/": {
      "post": {
        "summary": "Редактировать значение атрибута",
        "operationId": "basket-attributes-values-edit",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku", "value_sku", "value"],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku"
                      },
                      "value_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор значения",
                        "example": "value_sku"
                      },
                      "value": {
                        "type": "string",
                        "description": "Значение",
                        "example": "value"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор значения",
                      "example": "value_sku"
                    },
                    "attribute_sku": {
                      "type": "string",
                      "description": "Внутренний идентификатор атрибута",
                      "example": "sku"
                    },
                    "value": {
                      "type": "string",
                      "description": "Значение",
                      "example": "value"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/values/list/": {
      "get": {
        "summary": "Получить список значений",
        "operationId": "basket-attributes-values-list",
        "description": "",
        "tags": ["Товарный справочник"],
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "sku",
            "required": false,
            "schema": {
              "type": "string",
              "example": "sku"
            },
            "description": "Внутренний идентификатор категории"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": ["sku", "value"],
                        "properties": {
                          "sku": {
                            "type": "string",
                            "description": "Внутренний идентификатор атрибута",
                            "example": "sku"
                          },
                          "value": {
                            "type": "string",
                            "description": "Значение",
                            "example": "value"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/attributes/values/delete/": {
      "post": {
        "summary": "Удалить значение атрибута",
        "operationId": "basket-attributes-values-delete",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku", "value_sku"],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku"
                      },
                      "value_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор значения",
                        "example": "value_sku"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/products/attributes/add/": {
      "post": {
        "summary": "Присвоить товару атрибут-значение",
        "operationId": "basket-products-attributes-add",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku", "attribute_sku", "value_sku"],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор товара",
                        "example": "sku"
                      },
                      "attribute_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku_val"
                      },
                      "value_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор значения",
                        "example": "sku_val"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status"],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/products/attributes/edit/": {
      "post": {
        "summary": "Редактировать атрибут-значение товара",
        "operationId": "basket-products-attributes-edit",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "sku",
                      "attribute_sku",
                      "value_sku_from",
                      "value_sku_to"
                    ],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор товара",
                        "example": "sku"
                      },
                      "attribute_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku_val"
                      },
                      "value_sku_from": {
                        "type": "string",
                        "description": "Внутренний идентификатор текущего значения",
                        "example": "sku_val"
                      },
                      "value_sku_to": {
                        "type": "string",
                        "description": "Внутренний идентификатор целевого значения",
                        "example": "sku_val"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status"],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/basket/products/attributes/delete/": {
      "post": {
        "summary": "Удалить атрибут-значение у товара",
        "operationId": "basket-products-attributes-delete",
        "description": "",
        "tags": ["Товарный справочник"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["sku", "attribute_sku"],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор товара",
                        "example": "sku"
                      },
                      "attribute_sku": {
                        "type": "string",
                        "description": "Внутренний идентификатор атрибута",
                        "example": "sku_val"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status"],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "enum": ["ok"],
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gifts/manage/create/": {
      "post": {
        "tags": ["Подарки"],
        "summary": "Создать подарок",
        "operationId": "gifts-manage-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "multipart/form-data": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "name",
                      "description",
                      "enabled",
                      "points",
                      "pic",
                      "pic_full"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование подарка",
                        "example": "Подарок 1"
                      },
                      "description": {
                        "type": "string",
                        "description": "Описание подарка",
                        "example": "Некоторый текст описания подарка"
                      },
                      "enabled": {
                        "type": "integer",
                        "description": "Флаг 'Активен ли подарок?'. Если равно 1 - подарок после создания будет доступен",
                        "example": 1
                      },
                      "points": {
                        "type": "integer",
                        "description": "Стоимость подарка в баллах",
                        "example": 100
                      },
                      "pic": {
                        "type": "string",
                        "format": "binary",
                        "description": "Изображение подарка"
                      },
                      "pic_full": {
                        "type": "string",
                        "format": "binary",
                        "description": "Полное изображение подарка"
                      },
                      "quantity": {
                        "type": "integer",
                        "description": "Количество подарков",
                        "example": 5
                      },
                      "category": {
                        "type": "string",
                        "description": "Категория подарка",
                        "example": "Категория 1"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Идентификатор подарка в вашей системе",
                        "example": "sku23"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "gift": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Идентификатор подарка",
                          "example": 32425
                        },
                        "sku": {
                          "type": "string",
                          "description": "Идентификатор подарка в вашей системе",
                          "example": "sku23"
                        },
                        "name": {
                          "type": "string",
                          "description": "Наименование подарка",
                          "example": "Подарок 1"
                        },
                        "enabled": {
                          "type": "integer",
                          "description": "Флаг 'Активен ли подарок?'. Если равно 1 - подарок после создания будет доступен",
                          "example": 1
                        },
                        "points": {
                          "type": "integer",
                          "description": "Стоимость подарка в баллах",
                          "example": 100
                        },
                        "type": {
                          "type": "string",
                          "description": "Тип подарка",
                          "example": "gift"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "Количество подарков"
                        },
                        "partner_url": {
                          "type": "string",
                          "description": "Ссылка на ресурс партнера",
                          "deprecated": true
                        },
                        "description": {
                          "type": "string",
                          "description": "Описание подарка",
                          "example": "Некоторый текст описания подарка"
                        },
                        "sms_msg": {
                          "type": "string",
                          "description": "Текст смс сообщения",
                          "deprecated": true
                        },
                        "pic": {
                          "type": "string",
                          "description": "Ссылка на изображение",
                          "example": "http://some/img/file.jpg"
                        },
                        "pic_full": {
                          "type": "string",
                          "description": "Ссылка на полное изображение",
                          "example": "http://some/img/file.jpg"
                        },
                        "help_text": {
                          "type": "string",
                          "description": "Текст сообщения-подсказки",
                          "deprecated": true
                        },
                        "share_msg": {
                          "type": "string",
                          "description": "Текст сообщения для шеринга",
                          "deprecated": true
                        },
                        "category": {
                          "type": "string",
                          "description": "Категория подарка",
                          "example": "Категория 1"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gifts/manage/edit/": {
      "post": {
        "tags": ["Подарки"],
        "summary": "Редактировать подарок",
        "operationId": "gifts-manage-edit",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "multipart/form-data": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["gift_id"],
                    "properties": {
                      "gift_id": {
                        "type": "integer",
                        "description": "Идентификатор редактируемого подарка",
                        "example": 5982
                      },
                      "name": {
                        "type": "string",
                        "description": "Наименование подарка",
                        "example": "Подарок 1"
                      },
                      "description": {
                        "type": "string",
                        "description": "Описание подарка",
                        "example": "Некоторый текст описания подарка"
                      },
                      "enabled": {
                        "type": "integer",
                        "description": "Флаг 'Активен ли подарок?'. Если равно 1 - подарок после создания будет доступен",
                        "example": 1
                      },
                      "points": {
                        "type": "integer",
                        "description": "Стоимость подарка в баллах",
                        "example": 100
                      },
                      "pic": {
                        "type": "string",
                        "format": "binary",
                        "description": "Изображение подарка"
                      },
                      "pic_full": {
                        "type": "string",
                        "format": "binary",
                        "description": "Полное изображение подарка"
                      },
                      "quantity": {
                        "type": "integer",
                        "description": "Количество подарков",
                        "example": 5
                      },
                      "category": {
                        "type": "string",
                        "description": "Категория подарка",
                        "example": "Категория 1"
                      },
                      "sku": {
                        "type": "string",
                        "description": "Идентификатор подарка в вашей системе",
                        "example": "sku23"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "gift": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Идентификатор подарка",
                          "example": 32425
                        },
                        "sku": {
                          "type": "string",
                          "description": "Идентификатор подарка в вашей системе",
                          "example": "sku23"
                        },
                        "name": {
                          "type": "string",
                          "description": "Наименование подарка",
                          "example": "Подарок 1"
                        },
                        "enabled": {
                          "type": "integer",
                          "description": "Флаг 'Активен ли подарок?'. Если равно 1 - подарок после создания будет доступен",
                          "example": 1
                        },
                        "points": {
                          "type": "integer",
                          "description": "Стоимость подарка в баллах",
                          "example": 100
                        },
                        "type": {
                          "type": "string",
                          "description": "Тип подарка",
                          "example": "gift"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "Количество подарков"
                        },
                        "partner_url": {
                          "type": "string",
                          "description": "Ссылка на ресурс партнера",
                          "deprecated": true
                        },
                        "description": {
                          "type": "string",
                          "description": "Описание подарка",
                          "example": "Некоторый текст описания подарка"
                        },
                        "sms_msg": {
                          "type": "string",
                          "description": "Текст смс сообщения",
                          "deprecated": true
                        },
                        "pic": {
                          "type": "string",
                          "description": "Ссылка на изображение",
                          "example": "http://some/img/file.jpg"
                        },
                        "pic_full": {
                          "type": "string",
                          "description": "Ссылка на полное изображение",
                          "example": "http://some/img/file.jpg"
                        },
                        "help_text": {
                          "type": "string",
                          "description": "Текст сообщения-подсказки",
                          "deprecated": true
                        },
                        "share_msg": {
                          "type": "string",
                          "description": "Текст сообщения для шеринга",
                          "deprecated": true
                        },
                        "category": {
                          "type": "string",
                          "description": "Категория подарка",
                          "example": "Категория 1"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gifts/list/": {
      "get": {
        "tags": ["Подарки"],
        "summary": "Получить список всех подарков",
        "description": "",
        "operationId": "gifts-list",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "gifts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sku": {
                            "type": "string",
                            "description": "Идентификатор подарка в вашей системе",
                            "example": "sku23"
                          },
                          "update_date": {
                            "type": "string",
                            "description": "Дата обновления",
                            "example": "2021-12-01T12:23:01"
                          },
                          "quantity_per_user": {
                            "type": "integer",
                            "description": "Ограничение на кол-во клиентов",
                            "example": 1
                          },
                          "balance": {
                            "type": "integer",
                            "description": "Остаток",
                            "example": 120
                          },
                          "create_date": {
                            "type": "string",
                            "description": "Дата создания",
                            "example": "2021-11-21T02:13:31"
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование подарка",
                            "example": "Подарок 1"
                          },
                          "end_date": {
                            "type": "string",
                            "description": "Дата окончания действия",
                            "example": "2022-01-01T00:00:00"
                          },
                          "events_config": {
                            "type": "object",
                            "description": "Конфигурация аудитории (системный)"
                          },
                          "url": {
                            "type": "string",
                            "description": "URL на сайте подарка",
                            "example": "http://some/site/link"
                          },
                          "type": {
                            "type": "string",
                            "description": "Тип подарка",
                            "example": "gift"
                          },
                          "pic": {
                            "type": "string",
                            "description": "Ссылка на изображение",
                            "example": "http://some/img/file.jpg"
                          },
                          "enabled": {
                            "type": "integer",
                            "description": "Флаг 'Активен ли подарок?'. Если равно 1 - подарок после создания будет доступен",
                            "example": 1
                          },
                          "start_date": {
                            "type": "string",
                            "description": "Дата начала действия",
                            "example": "2021-01-01T00:00:00"
                          },
                          "purchase_count": {
                            "type": "integer",
                            "description": "Кол-во выдачи подарка"
                          },
                          "points": {
                            "type": "integer",
                            "description": "Стоимость подарка в баллах",
                            "example": 100
                          },
                          "attributes": {
                            "type": "array",
                            "description": "Атрибуты подарка"
                          },
                          "category_id": {
                            "type": "integer",
                            "description": "Идентификатор категории",
                            "example": 5436
                          },
                          "pic_full": {
                            "type": "string",
                            "description": "Ссылка на полное изображение",
                            "example": "http://some/img/file.jpg"
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор подарка",
                            "example": 32425
                          },
                          "description": {
                            "type": "string",
                            "description": "Описание подарка",
                            "example": "Некоторый текст описания подарка"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gifts/purchases/new/": {
      "post": {
        "summary": "Выдать подарок",
        "operationId": "gifts-purchases-new",
        "description": "",
        "tags": ["Подарки"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "gift_id", "order_num"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "gift_id": {
                        "type": "integer",
                        "description": "Иденификатор подарка",
                        "example": 34566
                      },
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order23"
                      },
                      "purchase_dep_id": {
                        "type": "integer",
                        "description": "Идентификатор отдела (store_department_id), в котором был выдан подарок",
                        "example": 4356
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU подарка",
                      "example": "sku23"
                    },
                    "gift_id": {
                      "type": "integer",
                      "description": "Идентификатор подарка",
                      "example": 34566
                    },
                    "user": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "phone": {
                            "type": "string",
                            "description": "Номер телефона",
                            "example": "79551235476"
                          },
                          "origin_user_id": {
                            "type": "string",
                            "description": "Внутренний идентификатор клиента",
                            "example": "oid123"
                          }
                        }
                      }
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order23"
                    },
                    "points_delta": {
                      "type": "integer",
                      "description": "Cписанные баллы",
                      "example": 150
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gifts/purchases/delete/": {
      "post": {
        "summary": "Удалить выдачу подарка",
        "operationId": "gifts-purchases-delete",
        "description": "",
        "tags": ["Подарки"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["order_num"],
                    "properties": {
                      "order_num": {
                        "type": "string",
                        "description": "Номер заказа",
                        "example": "order23"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gifts/purchases/edit/": {
      "post": {
        "summary": "Редактировать выдачу подарка",
        "operationId": "gifts-purchases-edit",
        "description": "",
        "tags": ["Подарки"],
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["user_phone", "purchase_gift_id"],
                    "properties": {
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      },
                      "purchase_gift_id": {
                        "type": "integer",
                        "description": "Идентификатор выдачи подарка",
                        "example": 124566
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "user": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "phone": {
                            "type": "string",
                            "description": "Маскированный номер телефона",
                            "example": "7 (955) 12*-**-76"
                          },
                          "origin_user_id": {
                            "type": "string",
                            "description": "Внутренний идентификатор клиента",
                            "example": "oid123"
                          },
                          "full_phone": {
                            "type": "string",
                            "description": "Полный номер телефона",
                            "example": "7955 1236476"
                          },
                          "last_name": {
                            "type": "string",
                            "description": "Фамилия",
                            "example": "Петров"
                          },
                          "first_name": {
                            "type": "string",
                            "description": "Имя",
                            "example": "Иван"
                          },
                          "points": {
                            "type": "integer",
                            "description": "Баланс баллов",
                            "example": 500
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор",
                            "example": 43567542
                          },
                          "email": {
                            "type": "string",
                            "description": "Email",
                            "example": "example@example.com"
                          }
                        }
                      }
                    },
                    "order_num": {
                      "type": "string",
                      "description": "Номер заказа",
                      "example": "order23"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Cписанные баллы",
                      "example": 150
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/create/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Создать департамент",
        "operationId": "partners-departments-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование департамента",
                        "example": "Магазин 1"
                      },
                      "unit_id": {
                        "type": "integer",
                        "description": "Идентификатор подразделения",
                        "example": 5467
                      },
                      "origin_id": {
                        "type": "string",
                        "description": "Внутренний идентификатор департамента",
                        "example": "dep123"
                      },
                      "country": {
                        "type": "string",
                        "description": "Страна",
                        "example": "Россия"
                      },
                      "timezone": {
                        "type": "string",
                        "description": "Часовой пояс департамента",
                        "example": "Europe/Moscow"
                      },
                      "business_hours": {
                        "type": "string",
                        "description": "Рабочие часы департамента",
                        "example": ""
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "string",
                      "description": "Город",
                      "example": "Москва"
                    },
                    "can_edit": {
                      "type": "boolean",
                      "description": "Возможность отключения",
                      "example": true
                    },
                    "business_hours": {
                      "type": "string",
                      "description": "Рабочие часы",
                      "example": ""
                    },
                    "points_enabled": {
                      "type": "boolean",
                      "description": "Работа бонусных баллов",
                      "example": true
                    },
                    "tags": {
                      "type": "array",
                      "description": "Атрибуты департамента",
                      "items": {
                        "type": "string"
                      }
                    },
                    "country": {
                      "type": "string",
                      "description": "Страна",
                      "example": "Россия"
                    },
                    "origin_id": {
                      "type": "string",
                      "description": "Внутренний идентификатор департамента",
                      "example": "dep123"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Работа департамента",
                      "example": true
                    },
                    "unit_id": {
                      "type": "integer",
                      "description": "Идентификатор подразделения",
                      "example": 3465
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент баллов",
                      "example": 1
                    },
                    "store_department_key": {
                      "type": "string",
                      "description": "Ключ департамента",
                      "example": "4324532"
                    },
                    "status": {
                      "type": "string",
                      "description": "Статус запроса",
                      "example": "ok"
                    },
                    "can_delete": {
                      "type": "boolean",
                      "description": "Отключение департамента",
                      "example": false
                    },
                    "address": {
                      "type": "string",
                      "description": "Адрес"
                    },
                    "region_id": {
                      "type": "integer",
                      "description": "Идентификатор региона",
                      "example": 43
                    },
                    "timezone": {
                      "type": "string",
                      "description": "Часовой пояс",
                      "example": "Europe/Moscow"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 25467
                    },
                    "reg_points": {
                      "type": "integer",
                      "description": "Баллы за регистрацию в департаменте",
                      "example": 10
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование департамента"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/edit/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Редактировать департамент",
        "operationId": "partners-departments-edit",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["department_id"],
                    "properties": {
                      "department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 23656
                      },
                      "name": {
                        "type": "string",
                        "description": "Наименование департамента",
                        "example": "Магазин 23"
                      },
                      "unit_id": {
                        "type": "integer",
                        "description": "Идентификатор подразделения",
                        "example": 5467
                      },
                      "origin_id": {
                        "type": "string",
                        "description": "Внутренний идентификатор департамента",
                        "example": "dep123"
                      },
                      "country": {
                        "type": "string",
                        "description": "Страна",
                        "example": "Россия"
                      },
                      "timezone": {
                        "type": "string",
                        "description": "Часовой пояс департамента",
                        "example": "Europe/Moscow"
                      },
                      "business_hours": {
                        "type": "string",
                        "description": "Рабочие часы департамента",
                        "example": ""
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "string",
                      "description": "Город",
                      "example": "Москва"
                    },
                    "can_edit": {
                      "type": "boolean",
                      "description": "Возможность отключения",
                      "example": true
                    },
                    "business_hours": {
                      "type": "string",
                      "description": "Рабочие часы",
                      "example": ""
                    },
                    "points_enabled": {
                      "type": "boolean",
                      "description": "Работа бонусных баллов",
                      "example": true
                    },
                    "tags": {
                      "type": "array",
                      "description": "Атрибуты департамента",
                      "items": {
                        "type": "string"
                      }
                    },
                    "country": {
                      "type": "string",
                      "description": "Страна",
                      "example": "Россия"
                    },
                    "origin_id": {
                      "type": "string",
                      "description": "Внутренний идентификатор департамента",
                      "example": "dep123"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Работа департамента",
                      "example": true
                    },
                    "unit_id": {
                      "type": "integer",
                      "description": "Идентификатор подразделения",
                      "example": 3465
                    },
                    "points_rate": {
                      "type": "integer",
                      "description": "Коэффициент баллов",
                      "example": 1
                    },
                    "store_department_key": {
                      "type": "string",
                      "description": "Ключ департамента",
                      "example": "4324532"
                    },
                    "status": {
                      "type": "string",
                      "description": "Статус запроса",
                      "example": "ok"
                    },
                    "can_delete": {
                      "type": "boolean",
                      "description": "Отключение департамента",
                      "example": false
                    },
                    "address": {
                      "type": "string",
                      "description": "Адрес"
                    },
                    "region_id": {
                      "type": "integer",
                      "description": "Идентификатор региона",
                      "example": 43
                    },
                    "timezone": {
                      "type": "string",
                      "description": "Часовой пояс",
                      "example": "Europe/Moscow"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор департамента",
                      "example": 25467
                    },
                    "reg_points": {
                      "type": "integer",
                      "description": "Баллы за регистрацию в департаменте",
                      "example": 10
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование департамента"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/list/": {
      "get": {
        "tags": ["Департаменты"],
        "summary": "Получить список департаментов",
        "operationId": "partners-departments-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "unit_id",
            "schema": {
              "type": "integer",
              "example": 1
            },
            "description": "Идентификатор подразделения"
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "departments": {
                      "type": "array",
                      "description": "Департаменты",
                      "items": {
                        "type": "object",
                        "properties": {
                          "city": {
                            "type": "string",
                            "description": "Город",
                            "example": "Москва"
                          },
                          "can_edit": {
                            "type": "boolean",
                            "description": "Возможность отключения",
                            "example": true
                          },
                          "business_hours": {
                            "type": "string",
                            "description": "Рабочие часы",
                            "example": ""
                          },
                          "points_enabled": {
                            "type": "boolean",
                            "description": "Работа бонусных баллов",
                            "example": true
                          },
                          "tags": {
                            "type": "array",
                            "description": "Атрибуты департамента",
                            "items": {
                              "type": "string"
                            }
                          },
                          "country": {
                            "type": "string",
                            "description": "Страна",
                            "example": "Россия"
                          },
                          "origin_id": {
                            "type": "string",
                            "description": "Внутренний идентификатор департамента",
                            "example": "dep123"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Работа департамента",
                            "example": true
                          },
                          "unit_id": {
                            "type": "integer",
                            "description": "Идентификатор подразделения",
                            "example": 3465
                          },
                          "points_rate": {
                            "type": "integer",
                            "description": "Коэффициент баллов",
                            "example": 1
                          },
                          "store_department_key": {
                            "type": "string",
                            "description": "Ключ департамента",
                            "example": "4324532"
                          },
                          "status": {
                            "type": "string",
                            "description": "Статус запроса",
                            "example": "ok"
                          },
                          "can_delete": {
                            "type": "boolean",
                            "description": "Отключение департамента",
                            "example": false
                          },
                          "address": {
                            "type": "string",
                            "description": "Адрес"
                          },
                          "region_id": {
                            "type": "integer",
                            "description": "Идентификатор региона",
                            "example": 43
                          },
                          "timezone": {
                            "type": "string",
                            "description": "Часовой пояс",
                            "example": "Europe/Moscow"
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор департамента",
                            "example": 25467
                          },
                          "reg_points": {
                            "type": "integer",
                            "description": "Баллы за регистрацию в департаменте",
                            "example": 10
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование департамента"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/managers/create/": {
      "post": {
        "tags": ["Сотрудники"],
        "summary": "Создать сотрудника",
        "operationId": "partners-managers-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["dep_id", "role"],
                    "properties": {
                      "dep_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 43566
                      },
                      "role": {
                        "type": "string",
                        "description": "Роль сотрудника",
                        "example": "admin"
                      },
                      "phone": {
                        "type": "string",
                        "description": "Номер телефона сотрудника",
                        "example": "79003215678"
                      },
                      "password": {
                        "type": "string",
                        "description": "Пароль для входа",
                        "example": "QWErty123"
                      },
                      "first_name": {
                        "type": "string",
                        "description": "Имя сотрудника",
                        "example": "Иван"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "Фамилия сотрудника",
                        "example": "Абрамов"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус запроса",
                      "example": "ok"
                    },
                    "manager": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Идентификатор созданного сотрудника",
                          "example": 423567
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/managers/edit/": {
      "post": {
        "tags": ["Сотрудники"],
        "summary": "Редактировать сотрудника",
        "operationId": "partners-managers-edit",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["manager_id"],
                    "properties": {
                      "manager_id": {
                        "type": "integer",
                        "description": "Идентификатор сотрудника",
                        "example": 435674
                      },
                      "dep_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 43566
                      },
                      "role": {
                        "type": "string",
                        "description": "Роль сотрудника",
                        "example": "admin"
                      },
                      "phone": {
                        "type": "string",
                        "description": "Номер телефона сотрудника",
                        "example": "79003215678"
                      },
                      "first_name": {
                        "type": "string",
                        "description": "Имя сотрудника",
                        "example": "Иван"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "Фамилия сотрудника",
                        "example": "Абрамов"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус запроса",
                      "example": "ok"
                    },
                    "manager": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Идентификатор созданного сотрудника",
                          "example": 423567
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/managers/list/": {
      "get": {
        "tags": ["Сотрудники"],
        "summary": "Получить список сотрудников",
        "operationId": "partners-managers-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "total_pages": {
                      "type": "integer",
                      "description": "Количество страниц",
                      "example": 2
                    },
                    "managers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "last_name": {
                            "type": "string",
                            "description": "Фамилия",
                            "example": "Абрамов"
                          },
                          "phone": {
                            "type": "string",
                            "description": "Номер телефона",
                            "example": "79003214523"
                          },
                          "first_name": {
                            "type": "string",
                            "description": "Фамилия",
                            "example": "Иван"
                          },
                          "phone_humanized": {
                            "type": "string",
                            "description": "Форматированный телефон",
                            "example": "+7 (900) 321-45-23"
                          },
                          "role": {
                            "type": "string",
                            "description": "Роль",
                            "example": "admin"
                          },
                          "name": {
                            "type": "string",
                            "description": "Имя и фамилия",
                            "example": "Иван Абрамов"
                          },
                          "is_superuser": {
                            "type": "boolean",
                            "description": "Супер-пользователь",
                            "example": false
                          },
                          "department": {
                            "type": "integer",
                            "description": "Идентификатор родительского департамента",
                            "example": 23451
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор сотрудника",
                            "example": 4323567
                          },
                          "pin_code": {
                            "type": "string",
                            "description": "Пин-код сотрудника"
                          }
                        }
                      }
                    },
                    "page": {
                      "type": "integer",
                      "description": "Курсор",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/managers/delete/": {
      "post": {
        "tags": ["Сотрудники"],
        "summary": "Удалить сотрудника",
        "operationId": "partners-managers-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор сотрудника",
                            "example": 435674
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "phone": {
                            "type": "string",
                            "description": "Номер телефона сотрудника",
                            "example": "79003215678"
                          }
                        }
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус запроса",
                      "example": "ok"
                    },
                    "manager": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Идентификатор созданного сотрудника",
                          "example": 423567
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/category/create/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Создать характеристику",
        "operationId": "partners-departments-tags-category-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование",
                        "example": "Регион"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор",
                      "example": 321
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование",
                      "example": "Регион"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/category/delete/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Удалить характеристику",
        "operationId": "partners-departments-tags-category-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["category_id"],
                    "properties": {
                      "category_id": {
                        "type": "integer",
                        "description": "Идентификатор",
                        "example": 321
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/category/list/": {
      "get": {
        "tags": ["Департаменты"],
        "summary": "Получить список характеристик",
        "operationId": "partners-departments-tags-category-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "categories": {
                      "type": "array",
                      "description": "Характеристики",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tags": {
                            "type": "array",
                            "description": "Значения",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "Идентификатор",
                                  "example": 54366
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Наименование",
                                  "example": "Московский"
                                }
                              }
                            }
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор",
                            "example": 4325
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование",
                            "example": "Регион"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/create/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Создать значение характеристики",
        "operationId": "partners-departments-tags-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name", "category_id"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование",
                        "example": "Московский"
                      },
                      "category_id": {
                        "type": "integer",
                        "description": "Идентификатор характеристики",
                        "example": 2354
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "category_id": {
                      "type": "integer",
                      "description": "Идентификатор характеристики",
                      "example": 2354
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор значения",
                      "example": 53541
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование",
                      "example": "Москвоский"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/delete/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Удалить значение характеристики",
        "operationId": "partners-departments-tags-delete",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["tag_id"],
                    "properties": {
                      "tag_id": {
                        "type": "integer",
                        "description": "Идентификатор значения",
                        "example": 52343
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/list/": {
      "get": {
        "tags": ["Департаменты"],
        "summary": "Получить список значений характеристик",
        "operationId": "partners-departments-tags-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "tags": {
                      "type": "array",
                      "description": "Значения характеристик",
                      "items": {
                        "type": "object",
                        "properties": {
                          "category_id": {
                            "type": "integer",
                            "description": "Идентификатор характеристики",
                            "example": 2354
                          },
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор значения",
                            "example": 53465
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование",
                            "example": "Московский"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/add/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Задать департаменту характеристику",
        "operationId": "partners-departments-tags-add",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["tag_id", "department_id"],
                    "properties": {
                      "tag_id": {
                        "type": "integer",
                        "description": "Идентификатор характеристики",
                        "example": 52356
                      },
                      "department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 125671
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Индикатор создания",
                      "example": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/departments/tags/remove/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Удалить характеристику департамента",
        "operationId": "partners-departments-tags-remove",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["tag_id", "department_id"],
                    "properties": {
                      "tag_id": {
                        "type": "integer",
                        "description": "Идентификатор характеристики",
                        "example": 52356
                      },
                      "department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 125671
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/units/create/": {
      "post": {
        "tags": ["Департаменты"],
        "summary": "Создать подразделение",
        "operationId": "partners-units-create",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["name"],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Наименование",
                        "example": "Розничные магазины"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "id": {
                      "type": "integer",
                      "description": "Идентификатор",
                      "example": 1235
                    },
                    "name": {
                      "type": "string",
                      "description": "Наименование",
                      "example": "Розничные магазины"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/units/list/": {
      "get": {
        "tags": ["Департаменты"],
        "summary": "Получить список подразделений",
        "operationId": "partners-units-list",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Номер страницы",
              "example": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "units": {
                      "type": "array",
                      "description": "Подразделения",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Идентификатор",
                            "example": 1235
                          },
                          "name": {
                            "type": "string",
                            "description": "Наименование",
                            "example": "Розничные магазины"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "description": "Количество",
                          "example": 50
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Количество на страницу",
                          "example": 10
                        },
                        "total_pages": {
                          "type": "integer",
                          "description": "Всего страниц",
                          "example": 5
                        },
                        "page": {
                          "type": "integer",
                          "description": "Указатель",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/origin-user-ids/load/": {
      "post": {
        "tags": ["Кардпулы"],
        "summary": "Создать пул",
        "operationId": "partners-origin-user-ids-load",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "group_name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Карты розницы"
            },
            "description": "Наименование группы"
          }
        ],
        "requestBody": {
          "description": "Body params",
          "content": {
            "multipart/form-data": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["file"],
                    "properties": {
                      "file": {
                        "type": "string",
                        "description": "Файл",
                        "format": "binary"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/origin-user-ids/allocate/": {
      "get": {
        "tags": ["Кардпулы"],
        "summary": "Получить карту",
        "operationId": "partners-origin-user-ids-allocate",
        "description": "",
        "parameters": [
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00",
            "description": "Токен доступа к API"
          },
          {
            "in": "query",
            "name": "store_department_id",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 14864,
            "description": "Идентификатор департамента"
          },
          {
            "in": "query",
            "name": "group_name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Карты розницы"
            },
            "description": "Наименование группы"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "group_name": {
                      "type": "string",
                      "description": "Наименование группы",
                      "example": "Карты розницы"
                    },
                    "code": {
                      "type": "string",
                      "description": "Карта",
                      "example": "4100000000013"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/partners/origin-user-ids/allocate-and-assign/": {
      "post": {
        "tags": ["Кардпулы"],
        "summary": "Получить карту для клиента",
        "operationId": "partners-origin-user-ids-allocate-and-assign",
        "description": "",
        "requestBody": {
          "description": "Body params",
          "content": {
            "multipart/form-data": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": ["token", "store_department_id"],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Токен доступа к API",
                        "example": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
                      },
                      "store_department_id": {
                        "type": "integer",
                        "description": "Идентификатор департамента",
                        "example": 14864
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["group_name", "user_phone"],
                    "properties": {
                      "group_name": {
                        "type": "string",
                        "description": "Наименование группы",
                        "example": "Карты розницы"
                      },
                      "user_phone": {
                        "type": "string",
                        "description": "Номер телефона или другой [идентификатор](/reference/identifikaciya-po-klientu)",
                        "example": "70003214567"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Статус ответа",
                      "example": "ok"
                    },
                    "allocated_oid": {
                      "type": "string",
                      "description": "Карта",
                      "example": "41000000000012"
                    },
                    "user_id": {
                      "type": "integer",
                      "description": "Идентификатор клиента",
                      "example": 4325876
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/communications/": {
      "post": {
        "tags": ["Клиенты"],
        "summary": "История коммуникаций клиента",
        "description": "Позволяет получить информацию о персональных коммуникациях по клиенту",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Токен доступа к API"
          },
          {
            "name": "store_department_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Идентификатор департамента"
          },
          {
            "name": "phone",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Телефон пользователя"
          },
          {
            "name": "channel",
            "in": "query",
            "required": true,
            "schema": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": ["push", "sms"]
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": ["push", "sms"]
                  }
                }
              ]
            },
            "description": "Канал отправки. Можно передать одно значение (например, push) или массив значений (например, [sms,push])"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Номер страницы"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            },
            "description": "Количество записей на странице. Максимум 25"
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "integer"
                          },
                          "external_status": {
                            "type": "string"
                          },
                          "request_data": {
                            "type": "object",
                            "properties": {
                              "imageUrl": {
                                "type": "string"
                              },
                              "data": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "string"
                                    },
                                    "key": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "create_date": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "title": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "external_user_id": {
                            "type": "string"
                          },
                          "operation": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "integer"
                          },
                          "channel": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Успешный ответ": {
                    "value": {
                      "status": "ok",
                      "messages": [
                        {
                          "status": 1,
                          "external_status": null,
                          "request_data": {
                            "imageUrl": "https://events.retailrocket.ru/100625",
                            "data": [
                              {
                                "value": "app_redirect_to_chat",
                                "key": "event"
                              },
                              {
                                "value": "Хочу записаться на тест-драйв!",
                                "key": "chat_message"
                              }
                            ]
                          },
                          "create_date": "2025-05-23T12:22:57.712",
                          "title": "Ваши избранные – лидеры по просмотрам!",
                          "message": "Успей записаться на тест-драйв на любое удобное время🔥",
                          "external_user_id": "79534111111",
                          "operation": 8,
                          "id": 2251851309,
                          "channel": "push"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "users-communications"
      }
    },
    "/tags/add/bulk": {
      "post": {
        "tags": ["Теги клиентов"],
        "summary": "Массовое присвоение тегов",
        "description": "Позволяет присвоить несколько тегов нескольким пользователям за один запрос.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Токен доступа к API"
          },
          {
            "name": "store_department_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Идентификатор департамента"
          },
          {
            "name": "run_chains",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [0, 1],
              "title": "Run Chains"
            },
            "description": "Запустить триггерные сценарии: 1 - запускать, 0 - не запускать"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "nullable": true
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "nullable": true
                        },
                        "phone": {
                          "type": "string",
                          "nullable": true
                        },
                        "origin_user_id": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "params": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": ["name"]
                      }
                    }
                  },
                  "required": ["user", "tags"]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "examples": {
                  "Ответ в случае успеха": {
                    "value": "{\"accepted\": \"ok\"}"
                  },
                  "Ответ, если нет прав на использование ручки": {
                    "value": "{\"status\": \"error\",\n\"status_code\": -4,\n\"message\": \"403\"}"
                  },
                  "Ответ, если превышен лимит количества задач в очереди на исполнение": {
                    "value": "{\"status\": \"error\",\n\"status_code\": -200016}"
                  },
                  "Ответ, если тело запроса не является валидным джейсоном": {
                    "value": "{\"status\": \"error\",\n\"status_code\": -1211}"
                  },
                  "Ответ, если не удалось отправить задачу в очередь на исполнение": {
                    "value": "{\"status\": \"error\",\n\"status_code\": -1}"
                  },
                  "Ответ, если пользователь не авторизован": {
                    "value": "{\"status\": \"error\",\n\"status_code\": -1000}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/tags/delete/bulk/": {
      "post": {
        "tags": ["Теги клиентов"],
        "summary": "Массовое удаление тегов",
        "description": "Позволяет удалить один или несколько тегов у нескольких пользователей за один запрос.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Токен доступа к API"
          },
          {
            "name": "store_department_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Идентификатор департамента"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "user_id": {
                      "type": "integer",
                      "nullable": true
                    },
                    "origin_user_id": {
                      "type": "string",
                      "nullable": true
                    },
                    "phone": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "nullable": true
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": ["tags"],
                  "oneOf": [
                    {
                      "required": ["user_id"]
                    },
                    {
                      "required": ["origin_user_id"]
                    },
                    {
                      "required": ["phone"]
                    },
                    {
                      "required": ["email"]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "ok": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "examples": {
                  "Успешный ответ": {
                    "value": {
                      "status": "ok",
                      "ok": true
                    }
                  },
                  "Невалидный JSON": {
                    "value": {
                      "status": "error",
                      "status_code": -1211,
                      "message": "Must be valid json string {'valid_example': '[{\"user_id\": 1, \"attrs\": [{\"name\": \"phone\", \"value\": \"+6-666-6666-66\"}]}]', 'field': 'body', 'details': 'Invalid json content'}"
                    }
                  },
                  "Нет прав": {
                    "value": {
                      "status": "error",
                      "status_code": -4,
                      "message": "403",
                      "data": {
                        "details": "Special permissions required to perform this action."
                      }
                    }
                  },
                  "Сервис недоступен": {
                    "value": {
                      "status": "error",
                      "status_code": -1,
                      "message": "Custom attributes unavailable"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/marketing-actions/list/": {
      "post": {
        "summary": "Получить список маркетинговых акций",
        "description": "API метод позволяет получить как все акции, так и акции доступные для конкретного клиента",
        "operationId": "marketing-actions-list",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_phone",
            "in": "query",
            "description": "Телефон или другой идентификатор клиента",
            "schema": {
              "type": "string",
              "default": "70000000000"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"ok\",\n  \"marketing_actions\": [\n    {\n      \"dt_end\": null,\n      \"status\": 2,\n      \"current_limit\": null,\n      \"rewards\": [\n        {\n          \"tests\": [],\n          \"type\": \"cart.total_discount\",\n          \"value\": {\n            \"redistribute\": 0,\n            \"count_rules_match\": false,\n            \"val\": 0,\n            \"dynamic\": false,\n            \"user_attribute\": \"\",\n            \"purchase_attribute\": \"\",\n            \"type\": \"percent\"\n          }\n        }\n      ],\n      \"create_date\": \"2025-04-15T12:28:14.024\",\n      \"name\": \"Первая акция\",\n      \"update_date\": \"2025-04-15T12:28:26.239\",\n      \"rules\": [\n        {\n          \"agg_tests\": [],\n          \"tests\": [],\n          \"type\": \"purchase\"\n        }\n      ],\n      \"limit_per_user\": null,\n      \"dt_start\": \"2025-04-15T12:27:37\",\n      \"alias\": \"first_action_id\",\n      \"limit\": null,\n      \"positions_have_min_price\": false,\n      \"attributes\": {},\n      \"group_id\": 20522,\n      \"id\": 81320,\n      \"description\": \"\"\n    }\n  ],\n  \"pricing_stages\": [\n    {\n      \"is_default\": true,\n      \"parent_id\": null,\n      \"create_date\": \"2025-04-15T12:27:47.794\",\n      \"id\": 2102,\n      \"name\": \"Главный этап\"\n    }\n  ],\n  \"positions_attrs\": [],\n  \"groups\": [\n    {\n      \"alias\": \"20522\",\n      \"pricing_stage_id\": 2102,\n      \"create_date\": \"2025-04-15T12:27:47.818\",\n      \"id\": 20522,\n      \"name\": \"Первая кампания\"\n    }\n  ],\n  \"options\": {\n    \"rules\": {\n      \"datetime_time\": {\n        \"tests\": [\n          \"datetime_time\"\n        ],\n        \"multiple_tests\": false,\n        \"has_tests\": true\n      },\n      \"purchase\": {\n        \"agg_tests\": [\n          \"positions.sum\",\n          \"positions.count\",\n          \"cart.param\",\n          \"cart.params_tree\",\n          \"any_of\",\n          \"all_of\"\n        ],\n        \"multiple_tests\": false,\n        \"has_tests\": false\n      },\n      \"datetime_weekdays\": {\n        \"tests\": [\n          \"datetime_weekdays\"\n        ],\n        \"multiple_tests\": true,\n        \"has_tests\": true\n      },\n      \"tag_datetime\": {\n        \"tests\": [\n          \"tag_datetime\"\n        ],\n        \"multiple_tests\": false,\n        \"has_tests\": true\n      },\n      \"datetime_dates\": {\n        \"tests\": [\n          \"datetime_dates\"\n        ],\n        \"multiple_tests\": false,\n        \"has_tests\": true\n      },\n      \"cart_params\": {\n        \"tests\": [\n          \"cards.range\"\n        ],\n        \"multiple_tests\": true,\n        \"has_tests\": true\n      },\n      \"cart\": {\n        \"agg_tests\": [\n          \"positions.sum\",\n          \"positions.count\",\n          \"any_of\",\n          \"all_of\"\n        ],\n        \"tests\": [\n          \"position.attr_with_count\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.category_sku_with_count\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"multiple_tests\": true,\n        \"has_tests\": true\n      },\n      \"promocodes\": {\n        \"tests\": [\n          \"promocodes.group\"\n        ],\n        \"multiple_tests\": false,\n        \"has_tests\": true\n      }\n    },\n    \"fields\": {\n      \"position_attr_value\": {\n        \"type\": \"position_attr_value_form\",\n        \"order\": 2\n      },\n      \"attr_name_range\": {\n        \"value_type\": \"float\",\n        \"type\": \"attr_form_custom\",\n        \"order\": 1\n      },\n      \"promocode_group\": {\n        \"type\": \"promocode_group_form\",\n        \"order\": 1\n      },\n      \"time_configurable\": {\n        \"type\": \"time_configurable\",\n        \"order\": 1\n      },\n      \"weekdays\": {\n        \"type\": \"weekdays\",\n        \"order\": 1\n      },\n      \"category_sku\": {\n        \"type\": \"category_sku_form\",\n        \"order\": 1\n      },\n      \"sku\": {\n        \"type\": \"sku_form\",\n        \"order\": 1\n      },\n      \"nested_tests\": {\n        \"type\": \"nested_tests_form\",\n        \"order\": 2\n      },\n      \"event_id\": {\n        \"type\": \"event_selector\",\n        \"order\": 1\n      },\n      \"card_range_id\": {\n        \"type\": \"card_range_form\",\n        \"order\": 1\n      },\n      \"param\": {\n        \"type\": \"param\",\n        \"order\": 2\n      },\n      \"attr_value_range\": {\n        \"type\": \"attr_value_form_range\",\n        \"order\": 2\n      },\n      \"position_attr_name\": {\n        \"type\": \"position_attr_form\",\n        \"order\": 1\n      },\n      \"strict\": {\n        \"type\": \"strict_boolean\",\n        \"order\": 2\n      },\n      \"find_descendants\": {\n        \"type\": \"boolean\",\n        \"order\": 2\n      },\n      \"group_matched_by_sku\": {\n        \"type\": \"boolean\",\n        \"order\": 3\n      },\n      \"days_delta\": {\n        \"type\": \"days_delta\",\n        \"order\": 2\n      },\n      \"string\": {\n        \"type\": \"string_input\",\n        \"order\": 1\n      },\n      \"price_list\": {\n        \"type\": \"price_list\",\n        \"order\": 2\n      },\n      \"attr_name\": {\n        \"type\": \"attr_form\",\n        \"order\": 1\n      },\n      \"user_attribute\": {\n        \"value_type\": \"string\",\n        \"type\": \"user_attributes_form\",\n        \"order\": 1\n      },\n      \"attr_value\": {\n        \"type\": \"attr_value_form\",\n        \"order\": 2\n      },\n      \"max_promocode_count\": {\n        \"type\": \"input_max\",\n        \"order\": 2\n      },\n      \"count\": {\n        \"type\": \"input\",\n        \"order\": 10\n      },\n      \"dates\": {\n        \"type\": \"dates\",\n        \"order\": 2\n      },\n      \"time\": {\n        \"type\": \"time\",\n        \"order\": 3\n      }\n    },\n    \"tests\": {\n      \"datetime_time\": {\n        \"fields\": [\n          \"time\"\n        ]\n      },\n      \"datetime_weekdays\": {\n        \"fields\": [\n          \"weekdays\",\n          \"time_configurable\"\n        ]\n      },\n      \"position.name_substring\": {\n        \"fields\": [\n          \"string\",\n          \"strict\",\n          \"count\"\n        ]\n      },\n      \"tag_datetime\": {\n        \"fields\": [\n          \"event_id\",\n          \"days_delta\"\n        ]\n      },\n      \"position.attr_with_range\": {\n        \"fields\": [\n          \"attr_name_range\",\n          \"attr_value_range\",\n          \"count\"\n        ]\n      },\n      \"position.sku_substring\": {\n        \"fields\": [\n          \"string\",\n          \"strict\",\n          \"count\"\n        ]\n      },\n      \"cards.range\": {\n        \"fields\": [\n          \"card_range_id\"\n        ]\n      },\n      \"position.sku\": {\n        \"fields\": [\n          \"sku\"\n        ]\n      },\n      \"position.category_sku_with_count\": {\n        \"fields\": [\n          \"category_sku\",\n          \"count\",\n          \"find_descendants\"\n        ]\n      },\n      \"promocodes.group\": {\n        \"fields\": [\n          \"promocode_group\",\n          \"max_promocode_count\"\n        ]\n      },\n      \"position.all_nested\": {\n        \"fields\": [\n          \"nested_tests\",\n          \"count\"\n        ]\n      },\n      \"position.position_attr_with_count\": {\n        \"fields\": [\n          \"position_attr_name\",\n          \"position_attr_value\",\n          \"count\"\n        ]\n      },\n      \"position.category_sku\": {\n        \"fields\": [\n          \"category_sku\",\n          \"find_descendants\"\n        ]\n      },\n      \"position.attr_with_count\": {\n        \"fields\": [\n          \"attr_name\",\n          \"attr_value\",\n          \"count\"\n        ]\n      },\n      \"position.favorite_product\": {\n        \"fields\": [\n          \"user_attribute\",\n          \"count\"\n        ]\n      },\n      \"datetime_dates\": {\n        \"fields\": [\n          \"dates\",\n          \"time\"\n        ]\n      },\n      \"position.sku_with_count\": {\n        \"fields\": [\n          \"sku\",\n          \"count\"\n        ]\n      },\n      \"position.attr\": {\n        \"fields\": [\n          \"attr_name\",\n          \"attr_value\"\n        ]\n      }\n    },\n    \"rewards\": {\n      \"cart.all_points_rate\": {\n        \"multiple_tests\": false,\n        \"values_types\": [\n          \"decimal\"\n        ],\n        \"has_tests\": false\n      },\n      \"cart.print_text_block\": {\n        \"multiple_tests\": false,\n        \"values_types\": [\n          \"string_input\"\n        ],\n        \"has_tests\": false\n      },\n      \"cart.discount_on_quantity\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"percent\",\n          \"fixed\"\n        ],\n        \"has_tests\": true\n      },\n      \"cart.position_discount\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"percent\",\n          \"fixed\"\n        ],\n        \"has_tests\": true\n      },\n      \"cart.use_price_list\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"decimal\"\n        ],\n        \"has_tests\": true\n      },\n      \"cart.position_range_discount\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"percent\",\n          \"fixed\"\n        ],\n        \"has_tests\": true\n      },\n      \"cart.position_charge\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"percent\",\n          \"fixed\"\n        ],\n        \"has_tests\": true\n      },\n      \"user.add_product_category_event\": {\n        \"multiple_tests\": false,\n        \"values_types\": [\n          \"category_event\"\n        ],\n        \"has_tests\": false\n      },\n      \"cart.position_custom_attr\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"max_discount\"\n        ],\n        \"has_tests\": true\n      },\n      \"cart.position_points_rate\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"decimal\"\n        ],\n        \"has_tests\": true\n      },\n      \"cart.discount_points\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"reverse_rate\",\n          \"max_discount\"\n        ],\n        \"has_tests\": true\n      },\n      \"user.add_event\": {\n        \"multiple_tests\": false,\n        \"values_types\": [\n          \"event_id\"\n        ],\n        \"has_tests\": false\n      },\n      \"cart.total_discount\": {\n        \"values_types\": [\n          \"percent\",\n          \"fixed\"\n        ],\n        \"has_tests\": false\n      },\n      \"cart.position_fixed_price\": {\n        \"multiple_tests\": true,\n        \"tests\": [\n          \"position.sku\",\n          \"position.category_sku\",\n          \"position.attr\",\n          \"position.attr_with_range\",\n          \"position.position_attr_with_count\",\n          \"position.sku_substring\",\n          \"position.name_substring\",\n          \"position.all_nested\",\n          \"position.favorite_product\"\n        ],\n        \"values_types\": [\n          \"percent\",\n          \"fixed\"\n        ],\n        \"has_tests\": true\n      }\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "marketing_actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dt_end": {},
                          "status": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "current_limit": {},
                          "rewards": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "cart.total_discount"
                                },
                                "value": {
                                  "type": "object",
                                  "properties": {
                                    "redistribute": {
                                      "type": "integer",
                                      "example": 0,
                                      "default": 0
                                    },
                                    "count_rules_match": {
                                      "type": "boolean",
                                      "example": false,
                                      "default": true
                                    },
                                    "val": {
                                      "type": "integer",
                                      "example": 0,
                                      "default": 0
                                    },
                                    "dynamic": {
                                      "type": "boolean",
                                      "example": false,
                                      "default": true
                                    },
                                    "user_attribute": {
                                      "type": "string",
                                      "example": ""
                                    },
                                    "purchase_attribute": {
                                      "type": "string",
                                      "example": ""
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "percent"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "create_date": {
                            "type": "string",
                            "example": "2025-04-15T12:28:14.024"
                          },
                          "name": {
                            "type": "string",
                            "example": "Первая акция"
                          },
                          "update_date": {
                            "type": "string",
                            "example": "2025-04-15T12:28:26.239"
                          },
                          "rules": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "agg_tests": {
                                  "type": "array"
                                },
                                "tests": {
                                  "type": "array"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "purchase"
                                }
                              }
                            }
                          },
                          "limit_per_user": {},
                          "dt_start": {
                            "type": "string",
                            "example": "2025-04-15T12:27:37"
                          },
                          "alias": {
                            "type": "string",
                            "example": "first_action_id"
                          },
                          "limit": {},
                          "positions_have_min_price": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "attributes": {
                            "type": "object",
                            "properties": {}
                          },
                          "group_id": {
                            "type": "integer",
                            "example": 20522,
                            "default": 0
                          },
                          "id": {
                            "type": "integer",
                            "example": 81320,
                            "default": 0
                          },
                          "description": {
                            "type": "string",
                            "example": ""
                          }
                        }
                      }
                    },
                    "pricing_stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "is_default": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "parent_id": {},
                          "create_date": {
                            "type": "string",
                            "example": "2025-04-15T12:27:47.794"
                          },
                          "id": {
                            "type": "integer",
                            "example": 2102,
                            "default": 0
                          },
                          "name": {
                            "type": "string",
                            "example": "Главный этап"
                          }
                        }
                      }
                    },
                    "positions_attrs": {
                      "type": "array"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string",
                            "example": "20522"
                          },
                          "pricing_stage_id": {
                            "type": "integer",
                            "example": 2102,
                            "default": 0
                          },
                          "create_date": {
                            "type": "string",
                            "example": "2025-04-15T12:27:47.818"
                          },
                          "id": {
                            "type": "integer",
                            "example": 20522,
                            "default": 0
                          },
                          "name": {
                            "type": "string",
                            "example": "Первая кампания"
                          }
                        }
                      }
                    },
                    "options": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "object",
                          "properties": {
                            "datetime_time": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "datetime_time"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "purchase": {
                              "type": "object",
                              "properties": {
                                "agg_tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "positions.sum"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                }
                              }
                            },
                            "datetime_weekdays": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "datetime_weekdays"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "tag_datetime": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "tag_datetime"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "datetime_dates": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "datetime_dates"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart_params": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "cards.range"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart": {
                              "type": "object",
                              "properties": {
                                "agg_tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "positions.sum"
                                  }
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.attr_with_count"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "promocodes": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "promocodes.group"
                                  }
                                },
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            }
                          }
                        },
                        "fields": {
                          "type": "object",
                          "properties": {
                            "position_attr_value": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "position_attr_value_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "attr_name_range": {
                              "type": "object",
                              "properties": {
                                "value_type": {
                                  "type": "string",
                                  "example": "float"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "attr_form_custom"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "promocode_group": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "promocode_group_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "time_configurable": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "time_configurable"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "weekdays": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "weekdays"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "category_sku": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "category_sku_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "sku": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "sku_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "nested_tests": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "nested_tests_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "event_id": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "event_selector"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "card_range_id": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "card_range_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "param": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "param"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "attr_value_range": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "attr_value_form_range"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "position_attr_name": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "position_attr_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "strict": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "strict_boolean"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "find_descendants": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "boolean"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "group_matched_by_sku": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "boolean"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 3,
                                  "default": 0
                                }
                              }
                            },
                            "days_delta": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "days_delta"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "string": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "string_input"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "price_list": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "price_list"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "attr_name": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "attr_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "user_attribute": {
                              "type": "object",
                              "properties": {
                                "value_type": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "user_attributes_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                }
                              }
                            },
                            "attr_value": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "attr_value_form"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "max_promocode_count": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "input_max"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "count": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "input"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 10,
                                  "default": 0
                                }
                              }
                            },
                            "dates": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "dates"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                }
                              }
                            },
                            "time": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "time"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 3,
                                  "default": 0
                                }
                              }
                            }
                          }
                        },
                        "tests": {
                          "type": "object",
                          "properties": {
                            "datetime_time": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "time"
                                  }
                                }
                              }
                            },
                            "datetime_weekdays": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "weekdays"
                                  }
                                }
                              }
                            },
                            "position.name_substring": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "string"
                                  }
                                }
                              }
                            },
                            "tag_datetime": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "event_id"
                                  }
                                }
                              }
                            },
                            "position.attr_with_range": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "attr_name_range"
                                  }
                                }
                              }
                            },
                            "position.sku_substring": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "string"
                                  }
                                }
                              }
                            },
                            "cards.range": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "card_range_id"
                                  }
                                }
                              }
                            },
                            "position.sku": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "sku"
                                  }
                                }
                              }
                            },
                            "position.category_sku_with_count": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "category_sku"
                                  }
                                }
                              }
                            },
                            "promocodes.group": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "promocode_group"
                                  }
                                }
                              }
                            },
                            "position.all_nested": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "nested_tests"
                                  }
                                }
                              }
                            },
                            "position.position_attr_with_count": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position_attr_name"
                                  }
                                }
                              }
                            },
                            "position.category_sku": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "category_sku"
                                  }
                                }
                              }
                            },
                            "position.attr_with_count": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "attr_name"
                                  }
                                }
                              }
                            },
                            "position.favorite_product": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "user_attribute"
                                  }
                                }
                              }
                            },
                            "datetime_dates": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "dates"
                                  }
                                }
                              }
                            },
                            "position.sku_with_count": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "sku"
                                  }
                                }
                              }
                            },
                            "position.attr": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "attr_name"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "rewards": {
                          "type": "object",
                          "properties": {
                            "cart.all_points_rate": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "decimal"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                }
                              }
                            },
                            "cart.print_text_block": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "string_input"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                }
                              }
                            },
                            "cart.discount_on_quantity": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "percent"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart.position_discount": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "percent"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart.use_price_list": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "decimal"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart.position_range_discount": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "percent"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart.position_charge": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "percent"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "user.add_product_category_event": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "category_event"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                }
                              }
                            },
                            "cart.position_custom_attr": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "max_discount"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart.position_points_rate": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "decimal"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "cart.discount_points": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "reverse_rate"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            },
                            "user.add_event": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "event_id"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                }
                              }
                            },
                            "cart.total_discount": {
                              "type": "object",
                              "properties": {
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "percent"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                }
                              }
                            },
                            "cart.position_fixed_price": {
                              "type": "object",
                              "properties": {
                                "multiple_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "tests": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "position.sku"
                                  }
                                },
                                "values_types": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "example": "percent"
                                  }
                                },
                                "has_tests": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Маркетинговые акции"]
      }
    },
    "/api/v2/gift-cards/groups": {
      "get": {
        "summary": "Получить информацию о группе карт",
        "description": "Получите список групп и информацию о колличестве доступных карт в группе для на первом этапе приобретения карты",
        "operationId": "get-info-card-group",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Название группы сертификатов",
            "schema": {
              "type": "string",
              "default": "Group name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"ok\",\n  \"groups\": [\n    {\n      \"status\": \"active\",\n      \"expire_days\": null,\n      \"allowed_send_by_email\": true,\n      \"name\": \"TestGroup Name 484485\",\n      \"is_one_time_use\": false,\n      \"created_at\": \"2023-02-27T14:26:10.691057\",\n      \"store_department_id\": null,\n      \"updated_at\": \"2023-02-27T14:26:10.691060\",\n      \"allowed_send_by_sms\": false,\n      \"code_required\": true,\n      \"default_start_amount\": null,\n      \"owner_required\": false,\n      \"cards_count\": {\n        \"reserved\": 0,\n        \"locked\": 0,\n        \"deactivated\": 0,\n        \"active\": 0,\n        \"new\": 0,\n        \"removed\": 0\n      },\n      \"total_cards_count\": 0,\n      \"id\": 3,\n      \"expire_at\": null\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "example": "active"
                          },
                          "expire_days": {},
                          "allowed_send_by_email": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "name": {
                            "type": "string",
                            "example": "TestGroup Name 484485"
                          },
                          "is_one_time_use": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2023-02-27T14:26:10.691057"
                          },
                          "store_department_id": {},
                          "updated_at": {
                            "type": "string",
                            "example": "2023-02-27T14:26:10.691060"
                          },
                          "allowed_send_by_sms": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "code_required": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "default_start_amount": {},
                          "owner_required": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "cards_count": {
                            "type": "object",
                            "properties": {
                              "reserved": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "locked": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "deactivated": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "active": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "new": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "removed": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              }
                            }
                          },
                          "total_cards_count": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "id": {
                            "type": "integer",
                            "example": 3,
                            "default": 0
                          },
                          "expire_at": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/cards": {
      "get": {
        "summary": "Получить информацию о карте",
        "description": "Получите информацию о карте по ее номеру",
        "operationId": "get-info-card",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "number",
            "in": "query",
            "description": "Номер подарочной карты",
            "required": true,
            "schema": {
              "type": "string",
              "default": "PK189238923"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"cards\": [\n    {\n      \"status\": \"active\",\n      \"set_owner_at\": null,\n      \"activated_at\": \"2024-02-06T14:36:23.443787\",\n      \"is_one_time_use\": false,\n      \"created_at\": \"2024-02-05T15:03:06.832846\",\n      \"store_department_id\": null,\n      \"number\": \"11ZPYTVVZC\",\n      \"updated_at\": \"2024-02-06T14:36:23.444098\",\n      \"code_required\": true,\n      \"group_id\": 182,\n      \"amount\": 10000,\n      \"owner_required\": true,\n      \"owner\": null,\n      \"expire_at\": \"2025-02-05T14:36:23.443787\",\n      \"start_amount\": 10000,\n      \"customer\": {\n        \"id\": 175925170,\n        \"user_phone\": \"79534311113\",\n        \"user_email\": \"e.popov@sailplay.ru\",\n        \"user_firstname\": \"name\",\n        \"user_lastname\": \"name\"\n      },\n      \"id\": 9525\n    }\n  ],\n  \"status\": \"ok\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "cards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "example": "active"
                          },
                          "set_owner_at": {},
                          "activated_at": {
                            "type": "string",
                            "example": "2024-02-06T14:36:23.443787"
                          },
                          "is_one_time_use": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-02-05T15:03:06.832846"
                          },
                          "store_department_id": {},
                          "number": {
                            "type": "string",
                            "example": "11ZPYTVVZC"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2024-02-06T14:36:23.444098"
                          },
                          "code_required": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "group_id": {
                            "type": "integer",
                            "example": 182,
                            "default": 0
                          },
                          "amount": {
                            "type": "integer",
                            "example": 10000,
                            "default": 0
                          },
                          "owner_required": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "owner": {},
                          "expire_at": {
                            "type": "string",
                            "example": "2025-02-05T14:36:23.443787"
                          },
                          "start_amount": {
                            "type": "integer",
                            "example": 10000,
                            "default": 0
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 175925170,
                                "default": 0
                              },
                              "user_phone": {
                                "type": "string",
                                "example": "79534311113"
                              },
                              "user_email": {
                                "type": "string",
                                "example": "e.popov@sailplay.ru"
                              },
                              "user_firstname": {
                                "type": "string",
                                "example": "name"
                              },
                              "user_lastname": {
                                "type": "string",
                                "example": "name"
                              }
                            }
                          },
                          "id": {
                            "type": "integer",
                            "example": 9525,
                            "default": 0
                          }
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/cards/{id}/activate": {
      "put": {
        "summary": "Активировать новую карту",
        "description": "Активируйте карту после того как она была продана",
        "operationId": "card-activation",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор карты",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4343
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"active\",\n  \"set_owner_at\": null,\n  \"activated_at\": \"2024-02-06T14:36:23.443787\",\n  \"is_one_time_use\": false,\n  \"created_at\": \"2024-02-05T15:03:06.832846\",\n  \"store_department_id\": 2442,\n  \"number\": \"11ZPYTVVZC\",\n  \"updated_at\": \"2024-02-06T14:36:23.444098\",\n  \"code_required\": true,\n  \"group_id\": 182,\n  \"amount\": 10000,\n  \"transaction\": {\n    \"status\": \"done\",\n    \"source_status\": \"reserved\",\n    \"user_id\": null,\n    \"created_at\": \"2024-02-06T19:36:23.464215\",\n    \"store_department_id\": null,\n    \"card_id\": 9525,\n    \"updated_at\": \"2024-02-06T19:36:23.464219\",\n    \"amount_delta\": null,\n    \"target_status\": \"active\",\n    \"type\": \"status_update\",\n    \"id\": 499,\n    \"transaction_id\": null\n  },\n  \"owner_required\": true,\n  \"owner\": null,\n  \"expire_at\": \"2025-02-05T14:36:23.443787\",\n  \"start_amount\": 10000,\n  \"customer\": {\n    \"id\": 175925170,\n    \"user_phone\": \"79534311113\",\n    \"user_email\": \"e.popov@sailplay.ru\",\n    \"user_firstname\": \"name\",\n    \"user_lastname\": \"name\"\n  },\n  \"id\": 9525\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "active"
                    },
                    "set_owner_at": {},
                    "activated_at": {
                      "type": "string",
                      "example": "2024-02-06T14:36:23.443787"
                    },
                    "is_one_time_use": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2024-02-05T15:03:06.832846"
                    },
                    "store_department_id": {
                      "type": "integer",
                      "example": 2442,
                      "default": 0
                    },
                    "number": {
                      "type": "string",
                      "example": "11ZPYTVVZC"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2024-02-06T14:36:23.444098"
                    },
                    "code_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "group_id": {
                      "type": "integer",
                      "example": 182,
                      "default": 0
                    },
                    "amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "transaction": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "done"
                        },
                        "source_status": {
                          "type": "string",
                          "example": "reserved"
                        },
                        "user_id": {},
                        "created_at": {
                          "type": "string",
                          "example": "2024-02-06T19:36:23.464215"
                        },
                        "store_department_id": {},
                        "card_id": {
                          "type": "integer",
                          "example": 9525,
                          "default": 0
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-02-06T19:36:23.464219"
                        },
                        "amount_delta": {},
                        "target_status": {
                          "type": "string",
                          "example": "active"
                        },
                        "type": {
                          "type": "string",
                          "example": "status_update"
                        },
                        "id": {
                          "type": "integer",
                          "example": 499,
                          "default": 0
                        },
                        "transaction_id": {}
                      }
                    },
                    "owner_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "owner": {},
                    "expire_at": {
                      "type": "string",
                      "example": "2025-02-05T14:36:23.443787"
                    },
                    "start_amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 175925170,
                          "default": 0
                        },
                        "user_phone": {
                          "type": "string",
                          "example": "79534311113"
                        },
                        "user_email": {
                          "type": "string",
                          "example": "e.popov@sailplay.ru"
                        },
                        "user_firstname": {
                          "type": "string",
                          "example": "name"
                        },
                        "user_lastname": {
                          "type": "string",
                          "example": "name"
                        }
                      }
                    },
                    "id": {
                      "type": "integer",
                      "example": 9525,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/cards/{id}/unreserve": {
      "put": {
        "summary": "Снять резерв с новой карты",
        "description": "Если на этапе продажи карты, подготовка была не выполнена, переведите карту в свободный статус",
        "operationId": "unreserve-card-from-group",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор карты",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4343
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"new\",\n  \"set_owner_at\": null,\n  \"activated_at\": null,\n  \"is_one_time_use\": false,\n  \"created_at\": \"2024-02-05T15:03:06.832893\",\n  \"store_department_id\": 2442,\n  \"number\": \"11JBYUNBIW\",\n  \"updated_at\": \"2024-02-06T14:37:33.342805\",\n  \"code_required\": true,\n  \"group_id\": 182,\n  \"amount\": 10000,\n  \"transaction\": {\n    \"status\": \"done\",\n    \"source_status\": \"reserved\",\n    \"user_id\": null,\n    \"created_at\": \"2024-02-06T19:37:33.363666\",\n    \"store_department_id\": null,\n    \"card_id\": 9526,\n    \"updated_at\": \"2024-02-06T19:37:33.363669\",\n    \"amount_delta\": null,\n    \"target_status\": \"new\",\n    \"type\": \"status_update\",\n    \"id\": 501,\n    \"transaction_id\": null\n  },\n  \"owner_required\": true,\n  \"owner\": null,\n  \"expire_at\": null,\n  \"start_amount\": 10000,\n  \"customer\": null,\n  \"id\": 9526\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "new"
                    },
                    "set_owner_at": {},
                    "activated_at": {},
                    "is_one_time_use": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2024-02-05T15:03:06.832893"
                    },
                    "store_department_id": {
                      "type": "integer",
                      "example": 2442,
                      "default": 0
                    },
                    "number": {
                      "type": "string",
                      "example": "11JBYUNBIW"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2024-02-06T14:37:33.342805"
                    },
                    "code_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "group_id": {
                      "type": "integer",
                      "example": 182,
                      "default": 0
                    },
                    "amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "transaction": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "done"
                        },
                        "source_status": {
                          "type": "string",
                          "example": "reserved"
                        },
                        "user_id": {},
                        "created_at": {
                          "type": "string",
                          "example": "2024-02-06T19:37:33.363666"
                        },
                        "store_department_id": {},
                        "card_id": {
                          "type": "integer",
                          "example": 9526,
                          "default": 0
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-02-06T19:37:33.363669"
                        },
                        "amount_delta": {},
                        "target_status": {
                          "type": "string",
                          "example": "new"
                        },
                        "type": {
                          "type": "string",
                          "example": "status_update"
                        },
                        "id": {
                          "type": "integer",
                          "example": 501,
                          "default": 0
                        },
                        "transaction_id": {}
                      }
                    },
                    "owner_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "owner": {},
                    "expire_at": {},
                    "start_amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "customer": {},
                    "id": {
                      "type": "integer",
                      "example": 9526,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/cards/{id}/lock": {
      "put": {
        "summary": "Зарезервировать выданную карту",
        "description": "Когда номинал планируется к использованию, зарезервируйте карту на кассе, для того чтобы предварительно провести внутренние процессы по оплате",
        "operationId": "lock-card",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор карты",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4343
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Укажите проверочный код карты, если ранее он был отправлен клиенту",
                    "default": "14245"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"locked\",\n  \"set_owner_at\": null,\n  \"activated_at\": \"2024-02-06T14:56:35.204244\",\n  \"is_one_time_use\": false,\n  \"created_at\": \"2024-02-05T15:03:06.832780\",\n  \"store_department_id\": 2442,\n  \"number\": \"11CYTPVZZV\",\n  \"updated_at\": \"2024-02-06T15:01:47.536652\",\n  \"code_required\": true,\n  \"group_id\": 182,\n  \"amount\": 10000,\n  \"transaction\": {\n    \"status\": \"done\",\n    \"source_status\": \"active\",\n    \"user_id\": null,\n    \"created_at\": \"2024-02-06T20:01:47.548695\",\n    \"store_department_id\": null,\n    \"card_id\": 9524,\n    \"updated_at\": \"2024-02-06T20:01:47.548698\",\n    \"amount_delta\": null,\n    \"target_status\": \"locked\",\n    \"type\": \"status_update\",\n    \"id\": 503,\n    \"transaction_id\": null\n  },\n  \"owner_required\": true,\n  \"owner\": null,\n  \"expire_at\": \"2025-02-05T14:56:35.204244\",\n  \"start_amount\": 10000,\n  \"customer\": {\n    \"id\": 175925170,\n    \"user_phone\": \"79534311113\",\n    \"user_email\": \"e.popov@sailplay.ru\",\n    \"user_firstname\": \"name\",\n    \"user_lastname\": \"name\"\n  },\n  \"id\": 9524\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "locked"
                    },
                    "set_owner_at": {},
                    "activated_at": {
                      "type": "string",
                      "example": "2024-02-06T14:56:35.204244"
                    },
                    "is_one_time_use": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2024-02-05T15:03:06.832780"
                    },
                    "store_department_id": {
                      "type": "integer",
                      "example": 2442,
                      "default": 0
                    },
                    "number": {
                      "type": "string",
                      "example": "11CYTPVZZV"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2024-02-06T15:01:47.536652"
                    },
                    "code_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "group_id": {
                      "type": "integer",
                      "example": 182,
                      "default": 0
                    },
                    "amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "transaction": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "done"
                        },
                        "source_status": {
                          "type": "string",
                          "example": "active"
                        },
                        "user_id": {},
                        "created_at": {
                          "type": "string",
                          "example": "2024-02-06T20:01:47.548695"
                        },
                        "store_department_id": {},
                        "card_id": {
                          "type": "integer",
                          "example": 9524,
                          "default": 0
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-02-06T20:01:47.548698"
                        },
                        "amount_delta": {},
                        "target_status": {
                          "type": "string",
                          "example": "locked"
                        },
                        "type": {
                          "type": "string",
                          "example": "status_update"
                        },
                        "id": {
                          "type": "integer",
                          "example": 503,
                          "default": 0
                        },
                        "transaction_id": {}
                      }
                    },
                    "owner_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "owner": {},
                    "expire_at": {
                      "type": "string",
                      "example": "2025-02-05T14:56:35.204244"
                    },
                    "start_amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 175925170,
                          "default": 0
                        },
                        "user_phone": {
                          "type": "string",
                          "example": "79534311113"
                        },
                        "user_email": {
                          "type": "string",
                          "example": "e.popov@sailplay.ru"
                        },
                        "user_firstname": {
                          "type": "string",
                          "example": "name"
                        },
                        "user_lastname": {
                          "type": "string",
                          "example": "name"
                        }
                      }
                    },
                    "id": {
                      "type": "integer",
                      "example": 9524,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/cards/{id}/unlock": {
      "put": {
        "summary": "Снять резерв с выданной карты",
        "description": "Если на этапе использования карты, транзакция так и не была выполнена, снимите резерв с карты для дальнейшей возможности воспользоваться ей в другом отделе",
        "operationId": "unlock-card",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор карты",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4343
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"active\",\n  \"set_owner_at\": null,\n  \"activated_at\": \"2024-02-06T14:36:23.443787\",\n  \"is_one_time_use\": false,\n  \"created_at\": \"2024-02-05T15:03:06.832846\",\n  \"store_department_id\": 2442,\n  \"number\": \"11ZPYTVVZC\",\n  \"updated_at\": \"2024-02-06T14:36:23.444098\",\n  \"code_required\": true,\n  \"group_id\": 182,\n  \"amount\": 10000,\n  \"transaction\": {\n    \"status\": \"done\",\n    \"source_status\": \"reserved\",\n    \"user_id\": null,\n    \"created_at\": \"2024-02-06T19:36:23.464215\",\n    \"store_department_id\": null,\n    \"card_id\": 9525,\n    \"updated_at\": \"2024-02-06T19:36:23.464219\",\n    \"amount_delta\": null,\n    \"target_status\": \"active\",\n    \"type\": \"status_update\",\n    \"id\": 499,\n    \"transaction_id\": null\n  },\n  \"owner_required\": true,\n  \"owner\": null,\n  \"expire_at\": \"2025-02-05T14:36:23.443787\",\n  \"start_amount\": 10000,\n  \"customer\": {\n    \"id\": 175925170,\n    \"user_phone\": \"79534311113\",\n    \"user_email\": \"e.popov@sailplay.ru\",\n    \"user_firstname\": \"name\",\n    \"user_lastname\": \"name\"\n  },\n  \"id\": 9525\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "active"
                    },
                    "set_owner_at": {},
                    "activated_at": {
                      "type": "string",
                      "example": "2024-02-06T14:36:23.443787"
                    },
                    "is_one_time_use": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2024-02-05T15:03:06.832846"
                    },
                    "store_department_id": {
                      "type": "integer",
                      "example": 2442,
                      "default": 0
                    },
                    "number": {
                      "type": "string",
                      "example": "11ZPYTVVZC"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2024-02-06T14:36:23.444098"
                    },
                    "code_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "group_id": {
                      "type": "integer",
                      "example": 182,
                      "default": 0
                    },
                    "amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "transaction": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "done"
                        },
                        "source_status": {
                          "type": "string",
                          "example": "reserved"
                        },
                        "user_id": {},
                        "created_at": {
                          "type": "string",
                          "example": "2024-02-06T19:36:23.464215"
                        },
                        "store_department_id": {},
                        "card_id": {
                          "type": "integer",
                          "example": 9525,
                          "default": 0
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-02-06T19:36:23.464219"
                        },
                        "amount_delta": {},
                        "target_status": {
                          "type": "string",
                          "example": "active"
                        },
                        "type": {
                          "type": "string",
                          "example": "status_update"
                        },
                        "id": {
                          "type": "integer",
                          "example": 499,
                          "default": 0
                        },
                        "transaction_id": {}
                      }
                    },
                    "owner_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "owner": {},
                    "expire_at": {
                      "type": "string",
                      "example": "2025-02-05T14:36:23.443787"
                    },
                    "start_amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 175925170,
                          "default": 0
                        },
                        "user_phone": {
                          "type": "string",
                          "example": "79534311113"
                        },
                        "user_email": {
                          "type": "string",
                          "example": "e.popov@sailplay.ru"
                        },
                        "user_firstname": {
                          "type": "string",
                          "example": "name"
                        },
                        "user_lastname": {
                          "type": "string",
                          "example": "name"
                        }
                      }
                    },
                    "id": {
                      "type": "integer",
                      "example": 9525,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/transactions": {
      "post": {
        "summary": "Провести транзакцию",
        "description": "Выполните запрос чтобы списать номинал с подарочной карты",
        "operationId": "card-transaction",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "user_phone",
            "in": "query",
            "description": "Телефон клиента или другой идентификатор",
            "schema": {
              "type": "string",
              "default": "79998887766"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["transaction_id", "gift_cards"],
                "properties": {
                  "transaction_id": {
                    "type": "string",
                    "description": "Внешний дентификатор транзакции",
                    "default": "tr_id_1234573"
                  },
                  "gift_cards": {
                    "type": "array",
                    "description": "Укажите с какой карты и сколько требуется списать. Можно указать несколько карт в одной транзакции.",
                    "items": {
                      "properties": {
                        "card_number": {
                          "type": "string",
                          "description": "Номер подарочной карты",
                          "default": "PK123980471234"
                        },
                        "amount_delta": {
                          "type": "integer",
                          "description": "Для проведения списания укажите отрицательную сумму",
                          "default": -10000,
                          "format": "int32"
                        }
                      },
                      "required": ["card_number"],
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"cards\": [\n    {\n      \"status\": \"active\",\n      \"customer\": {\n        \"id\": 175925170,\n        \"user_phone\": \"79534311113\",\n        \"user_email\": \"e.popov@sailplay.ru\",\n        \"user_firstname\": \"name\",\n        \"user_lastname\": \"name\"\n      },\n      \"created_at\": \"2024-02-05T15:03:06.832780\",\n      \"activated_at\": \"2024-02-06T14:56:35.204244\",\n      \"number\": \"11CYTPVZZV\",\n      \"updated_at\": \"2024-02-06T18:04:09.064588\",\n      \"group_id\": 182,\n      \"amount\": 9000,\n      \"owner\": null,\n      \"start_amount\": 10000,\n      \"id\": 9524\n    }\n  ],\n  \"transactions\": [\n    {\n      \"status\": \"done\",\n      \"user_id\": 175925170,\n      \"created_at\": \"2024-02-06T15:04:09.007367\",\n      \"store_department_id\": 2442,\n      \"card_id\": 9524,\n      \"updated_at\": \"2024-02-06T15:04:09.007368\",\n      \"amount_delta\": -1000,\n      \"user\": {\n        \"id\": 175925170,\n        \"user_phone\": \"79534311113\",\n        \"user_email\": \"e.popov@sailplay.ru\",\n        \"user_firstname\": \"name\",\n        \"user_lastname\": \"name\"\n      },\n      \"type\": \"amount_update\",\n      \"id\": 504,\n      \"transaction_id\": \"tr_id_12345734\"\n    }\n  ]\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "cards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "example": "active"
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 175925170,
                                "default": 0
                              },
                              "user_phone": {
                                "type": "string",
                                "example": "79534311113"
                              },
                              "user_email": {
                                "type": "string",
                                "example": "e.popov@sailplay.ru"
                              },
                              "user_firstname": {
                                "type": "string",
                                "example": "name"
                              },
                              "user_lastname": {
                                "type": "string",
                                "example": "name"
                              }
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-02-05T15:03:06.832780"
                          },
                          "activated_at": {
                            "type": "string",
                            "example": "2024-02-06T14:56:35.204244"
                          },
                          "number": {
                            "type": "string",
                            "example": "11CYTPVZZV"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2024-02-06T18:04:09.064588"
                          },
                          "group_id": {
                            "type": "integer",
                            "example": 182,
                            "default": 0
                          },
                          "amount": {
                            "type": "integer",
                            "example": 9000,
                            "default": 0
                          },
                          "owner": {},
                          "start_amount": {
                            "type": "integer",
                            "example": 10000,
                            "default": 0
                          },
                          "id": {
                            "type": "integer",
                            "example": 9524,
                            "default": 0
                          }
                        }
                      }
                    },
                    "transactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "example": "done"
                          },
                          "user_id": {
                            "type": "integer",
                            "example": 175925170,
                            "default": 0
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-02-06T15:04:09.007367"
                          },
                          "store_department_id": {
                            "type": "integer",
                            "example": 2442,
                            "default": 0
                          },
                          "card_id": {
                            "type": "integer",
                            "example": 9524,
                            "default": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2024-02-06T15:04:09.007368"
                          },
                          "amount_delta": {
                            "type": "integer",
                            "example": -1000,
                            "default": 0
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 175925170,
                                "default": 0
                              },
                              "user_phone": {
                                "type": "string",
                                "example": "79534311113"
                              },
                              "user_email": {
                                "type": "string",
                                "example": "e.popov@sailplay.ru"
                              },
                              "user_firstname": {
                                "type": "string",
                                "example": "name"
                              },
                              "user_lastname": {
                                "type": "string",
                                "example": "name"
                              }
                            }
                          },
                          "type": {
                            "type": "string",
                            "example": "amount_update"
                          },
                          "id": {
                            "type": "integer",
                            "example": 504,
                            "default": 0
                          },
                          "transaction_id": {
                            "type": "string",
                            "example": "tr_id_12345734"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    },
    "/api/v2/gift-cards/groups/{id}/cards/reserve": {
      "post": {
        "summary": "Зарезервировать новую карту",
        "description": "Зарезервируйте новую карту из группы для подготовки к продаже",
        "operationId": "reserve-card-from-group",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Токен доступа к API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "d21a23d5ff695377ca99a3a6cf9b4a1ec6452b00"
            }
          },
          {
            "name": "store_department_id",
            "in": "query",
            "description": "Идентификатор департамента",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14565
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор группы",
            "schema": {
              "type": "string",
              "default": "123"
            },
            "required": true
          },
          {
            "name": "user_phone",
            "in": "query",
            "description": "Телефон клиента или другой идентификатор",
            "schema": {
              "type": "string",
              "default": "79167778899"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_amount": {
                    "type": "integer",
                    "description": "Укажите баланс карты, если баланс не был указан на уровне группы",
                    "default": 10000,
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"reserved\",\n  \"set_owner_at\": null,\n  \"activated_at\": null,\n  \"is_one_time_use\": false,\n  \"created_at\": \"2024-02-05T15:03:06.832780\",\n  \"store_department_id\": 2442,\n  \"number\": \"11CYTPVZZV\",\n  \"updated_at\": \"2024-02-05T16:07:31.418570\",\n  \"code_required\": true,\n  \"group_id\": 182,\n  \"amount\": 10000,\n  \"transaction\": {\n    \"status\": \"done\",\n    \"source_status\": \"new\",\n    \"user_id\": null,\n    \"created_at\": \"2024-02-05T21:07:31.454102\",\n    \"store_department_id\": null,\n    \"card_id\": 9524,\n    \"updated_at\": \"2024-02-05T21:07:31.454103\",\n    \"amount_delta\": null,\n    \"target_status\": \"reserved\",\n    \"type\": \"status_update\",\n    \"id\": 497,\n    \"transaction_id\": null\n  },\n  \"owner_required\": true,\n  \"owner\": null,\n  \"expire_at\": \"2030-01-01T10:00:00\",\n  \"start_amount\": 10000,\n  \"customer\": {\n    \"id\": 175925170,\n    \"user_phone\": \"79534311113\",\n    \"user_email\": \"e.popov@sailplay.ru\",\n    \"user_firstname\": \"name\",\n    \"user_lastname\": \"name\"\n  },\n  \"id\": 9524\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "reserved"
                    },
                    "set_owner_at": {},
                    "activated_at": {},
                    "is_one_time_use": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2024-02-05T15:03:06.832780"
                    },
                    "store_department_id": {
                      "type": "integer",
                      "example": 2442,
                      "default": 0
                    },
                    "number": {
                      "type": "string",
                      "example": "11CYTPVZZV"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2024-02-05T16:07:31.418570"
                    },
                    "code_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "group_id": {
                      "type": "integer",
                      "example": 182,
                      "default": 0
                    },
                    "amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "transaction": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "done"
                        },
                        "source_status": {
                          "type": "string",
                          "example": "new"
                        },
                        "user_id": {},
                        "created_at": {
                          "type": "string",
                          "example": "2024-02-05T21:07:31.454102"
                        },
                        "store_department_id": {},
                        "card_id": {
                          "type": "integer",
                          "example": 9524,
                          "default": 0
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-02-05T21:07:31.454103"
                        },
                        "amount_delta": {},
                        "target_status": {
                          "type": "string",
                          "example": "reserved"
                        },
                        "type": {
                          "type": "string",
                          "example": "status_update"
                        },
                        "id": {
                          "type": "integer",
                          "example": 497,
                          "default": 0
                        },
                        "transaction_id": {}
                      }
                    },
                    "owner_required": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "owner": {},
                    "expire_at": {
                      "type": "string",
                      "example": "2030-01-01T10:00:00"
                    },
                    "start_amount": {
                      "type": "integer",
                      "example": 10000,
                      "default": 0
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 175925170,
                          "default": 0
                        },
                        "user_phone": {
                          "type": "string",
                          "example": "79534311113"
                        },
                        "user_email": {
                          "type": "string",
                          "example": "e.popov@sailplay.ru"
                        },
                        "user_firstname": {
                          "type": "string",
                          "example": "name"
                        },
                        "user_lastname": {
                          "type": "string",
                          "example": "name"
                        }
                      }
                    },
                    "id": {
                      "type": "integer",
                      "example": 9524,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": ["Подарочные карты"]
      }
    }
  },
  "components": {}
}
