{
  "openapi": "3.1.0",
  "info": {
    "title": "Справочник интеграций TRIDE",
    "version": "1.1.0",
    "description": "Методы для сервера клуба, внешнего сайта и клиентского кабинета. Для каждого вызова указано, чей доступ требуется. Примеры используют синтетические данные. Замените обозначения в угловых скобках и демонстрационные идентификаторы значениями своего тестового подключения."
  },
  "servers": [
    {
      "url": "https://api.tride.ru"
    }
  ],
  "tags": [
    {
      "name": "Клубный EX"
    },
    {
      "name": "Витрина сайта"
    },
    {
      "name": "Личный кабинет"
    },
    {
      "name": "Вход с сайта"
    },
    {
      "name": "Счёт и дополнения"
    },
    {
      "name": "Заявки из CRM"
    },
    {
      "name": "Рекомендации"
    },
    {
      "name": "Контроль доступа"
    },
    {
      "name": "Звонки"
    },
    {
      "name": "Данные для аналитики"
    },
    {
      "name": "Запись и покупки клиента"
    },
    {
      "name": "Подарочные сертификаты"
    },
    {
      "name": "Оплата по ссылке"
    },
    {
      "name": "Формы сайта"
    },
    {
      "name": "OAuth"
    }
  ],
  "paths": {
    "/ex/find.class": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "find-class",
        "summary": "Найти занятие внешней системы",
        "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_class_type_id": {
                    "type": "string",
                    "description": "Идентификатор типа занятия во внешней системе"
                  },
                  "class_type_id": {
                    "type": "string",
                    "description": "Идентификатор типа занятия в TRIDE"
                  },
                  "external_class_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе. Если занятие с таким id не найдено — подходящее по типу и времени занятие без внешнего идентификатора получит переданный внешний идентификатор"
                  },
                  "zone_id": {
                    "type": "string",
                    "description": "Идентификатор зоны в TRIDE — сужает поиск при поиске занятия"
                  },
                  "time": {
                    "type": "string",
                    "description": "Дата и время занятия в часовом поясе клуба, ДД.ММ.ГГГГ ЧЧ:ММ."
                  }
                },
                "required": [
                  "key",
                  "time"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "time": "07.12.2026 10:00",
                "class_type_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор занятия"
                        },
                        "use_teams": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Количество команд в занятии (больше 1 для занятий вида Bootcamp)"
                        },
                        "club_id": {
                          "type": "string"
                        },
                        "class_type": {},
                        "external_class_type_id": {}
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "session_id": "000000000000000000000001"
                }
              }
            }
          }
        }
      }
    },
    "/ex/create.class": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "create-class",
        "summary": "Добавить занятие в расписание",
        "description": "Передайте ключ клуба, тип занятия и местное время начала. Передайте external_class_id для последующих синхронизаций. Если тренер известен, укажите coach_id или coach_external_id. [Синхронизация расписания](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_class_type_id": {
                    "type": "string",
                    "description": "Идентификатор типа занятия во внешней системе"
                  },
                  "class_type_id": {
                    "type": "string",
                    "description": "Идентификатор типа занятия в TRIDE, если известен"
                  },
                  "external_class_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе"
                  },
                  "zone_id": {
                    "type": "string",
                    "description": "Идентификатор зоны (помещения) в TRIDE — если внешняя система знает, где проходит занятие. Без параметра зоны берутся из вида занятия. Чужая, удалённая или неизвестная зона игнорируется"
                  },
                  "time": {
                    "type": "string",
                    "description": "Дата и время занятия в часовом поясе клуба, ДД.ММ.ГГГГ ЧЧ:ММ."
                  },
                  "coach_id": {
                    "type": "integer",
                    "description": "Идентификатор тренера в TRIDE (если известен)"
                  },
                  "coach_external_id": {
                    "type": "string",
                    "description": "Идентификатор тренера во внешней системе (если был ранее присвоен)"
                  },
                  "max_capacity": {
                    "type": "integer",
                    "description": "Максимальное количество участников занятия (если нужно переопределить значение из типа занятия)"
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Длительность занятия в минутах (если отличается от длительности типа занятия)"
                  },
                  "theme": {
                    "type": "string",
                    "description": "Тема занятия — тематическое название поверх вида занятия; пустая строка снимает тему"
                  },
                  "equipment_ids": {
                    "type": "array",
                    "description": "Набор мест занятия (id мест TRIDE); пусто — все места зоны",
                    "items": {}
                  }
                },
                "required": [
                  "key",
                  "time"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "time": "07.12.2026 10:00",
                "class_type_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор занятия"
                        },
                        "existing": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "session_id": "000000000000000000000001"
                }
              }
            }
          }
        }
      }
    },
    "/ex/edit.class": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "edit-class",
        "summary": "Изменить занятие в расписании",
        "description": "Передайте ключ клуба, session_id или external_session_id и новое время занятия. Для смены тренера укажите coach_id или coach_external_id. [Синхронизация расписания](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в TRIDE, если известен"
                  },
                  "time": {
                    "type": "string",
                    "description": "Дата и время занятия в часовом поясе клуба, ДД.ММ.ГГГГ ЧЧ:ММ."
                  },
                  "external_class_type_id": {
                    "type": "string",
                    "description": "Идентификатор типа занятия во внешней системе"
                  },
                  "class_type_id": {
                    "type": "string",
                    "description": "Идентификатор типа занятия в TRIDE, если известен"
                  },
                  "zone_id": {
                    "type": "string",
                    "description": "Идентификатор зоны (помещения) в TRIDE, если помещение занятия во внешней системе изменилось. Без параметра текущая зона занятия сохраняется"
                  },
                  "coach_id": {
                    "type": "integer",
                    "description": "Идентификатор тренера в TRIDE (если известен)"
                  },
                  "coach_external_id": {
                    "type": "string",
                    "description": "Идентификатор тренера во внешней системе (если был ранее присвоен)"
                  },
                  "coach_none": {
                    "type": "boolean",
                    "description": "Во внешней системе тренера у занятия нет — снять тренера и в TRIDE. Без этого флага отсутствие coach_id означает «тренера не трогать»"
                  },
                  "max_capacity": {
                    "type": "integer",
                    "description": "Максимальное количество участников занятия (если нужно обновить)"
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Длительность занятия в минутах. Без параметра текущая длительность занятия сохраняется (при смене типа занятия берётся длительность нового типа)"
                  },
                  "theme": {
                    "type": "string",
                    "description": "Тема занятия — тематическое название поверх вида занятия; пустая строка снимает тему"
                  },
                  "equipment_ids": {
                    "type": "array",
                    "description": "Набор мест занятия (id мест TRIDE); пусто — все места зоны",
                    "items": {}
                  }
                },
                "required": [
                  "key",
                  "time"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "time": "07.12.2026 10:00",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "updated": {
                          "type": "boolean",
                          "description": "true если изменение успешно"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/remove.class": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "remove-class",
        "summary": "Отменить занятие",
        "description": "Удалить занятие. Возможно удалить только занятие, которое еще не началось. Обязательно указать какой либо идентификатор. Брони занятия отменяются как отмена клубом: визит и деньги клиентам возвращаются полностью, без штрафа политики отмены. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в TRIDE, если известен"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "removed": {
                          "type": "boolean",
                          "description": "true если удаление успешно"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/list.class.types": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "list-class-types",
        "summary": "Сопоставить виды занятий",
        "description": "Получить список видов занятий в клубе. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "types": {
                          "type": "array",
                          "description": "Массив объектов данных по типам занятий",
                          "items": {
                            "type": "object",
                            "properties": {
                              "class_type_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор вида занятия"
                              },
                              "external_class_type_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор вида занятия во внешней системе"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название вида занятия"
                              },
                              "sport_types": {
                                "type": "array",
                                "description": "Массив объектов с данными по видам спорта",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "description": "Идентификатор вида спорта"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Название вида спорта"
                                    }
                                  }
                                }
                              },
                              "zones": {
                                "type": "array",
                                "description": "Массив объектов с данными по зонам в клубе",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Идентификатор зоны"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Название зоны"
                                    }
                                  }
                                }
                              },
                              "status": {
                                "type": "boolean",
                                "description": "Вид активен (true) или выключен/в архиве (false); черновики не отдаются"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/check.auth": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "check-auth",
        "summary": "Обменять одноразовый идентификатор клиента",
        "description": "Произвести разовую идентификацию клиента. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "auth_id": {
                    "type": "string",
                    "description": "Ключ идентификации клиента"
                  }
                },
                "required": [
                  "key",
                  "auth_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "auth_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента в TRIDE"
                        },
                        "external_client_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор клиента во внешней системе"
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Номер телефона клиента"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Email клиента"
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор клуба в TRIDE"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.info": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "client-info",
        "summary": "Получить профиль клиента сети",
        "description": "Получить данные клиента в системе TRIDE. Обязательно должен быть передан либо идентификатор клиента, либо номер телефона клиента. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999…, 8999…, 7999…); основной и дополнительные номера"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента в системе TRIDE"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента в системе TRIDE"
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Номер телефона клиента в формате 79XXXXXXXXX"
                        },
                        "firstname": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Имя клиента"
                        },
                        "lastname": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Фамилия клиента"
                        },
                        "nickname": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Отображаемое на экране имя"
                        },
                        "weight": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Вес клиента"
                        },
                        "ftp": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "FTP клиента"
                        },
                        "height": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "рост клиента"
                        },
                        "birthdate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Дата рождения клиента в формате ДД.ММ.ГГГГ"
                        },
                        "maxhr": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Максимальный пульс для построения зон"
                        },
                        "gender": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Пол клиента (1 - мужчина, 2 - женщина)"
                        },
                        "rowing_ftp": {}
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.register": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "client-register",
        "summary": "Зарегистрировать клиента",
        "description": "Зарегистрировать клиента в TRIDE. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Номер телефона клиента в формате 79XXXXXXXXX"
                  },
                  "firstname": {
                    "type": "string",
                    "description": "Имя клиента"
                  },
                  "lastname": {
                    "type": "string",
                    "description": "Фамилия клиента"
                  },
                  "nickname": {
                    "type": "string",
                    "description": "Отображаемое на экране имя"
                  },
                  "weight": {
                    "type": "string",
                    "description": "Вес клиента (по умолчанию 50)"
                  },
                  "ftp": {
                    "type": "integer",
                    "description": "FTP клиента (по умолчанию 100)"
                  },
                  "height": {
                    "type": "integer",
                    "description": "рост клиента (по умолчанию 170)"
                  },
                  "birthdate": {
                    "type": "string",
                    "description": "Дата рождения клиента в формате ДД.ММ.ГГГГ"
                  },
                  "gender": {
                    "type": "integer",
                    "description": "Пол клиента (1 - мужчина (по умолчанию), 2 - женщина)"
                  },
                  "email": {
                    "type": "string",
                    "description": "Email клиента. У клиента своей сети заменяет прежний, у человека из другой сети — только если был пустым; уходит в карточку клиента внешней системы клуба"
                  },
                  "attribution": {
                    "type": "object",
                    "description": "Откуда пришёл клиент: {source: site|app|admin, utm: {source, medium, campaign, term, content}, yclid, ym_client_id, referrer, landing_url} — первое касание в карточке клиента клуба"
                  },
                  "utm": {
                    "type": "object",
                    "description": "Метки посетителя — то же, что attribution.utm"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid — то же, что attribution.yclid"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID — то же, что attribution.ym_client_id"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе"
                  }
                },
                "required": [
                  "key",
                  "phone"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "phone": "<телефон тестового клиента>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента в системе TRIDE"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/class.set.participant": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "class-set-participant",
        "summary": "Назначить участнику тренажёр",
        "description": "Передайте ключ клуба, идентификаторы участника, занятия и выбранного тренажёра. Сервер регистрирует участника на занятии. Привязка пульсометра выполняется в карточке участника в приложении клуба. [Инструкция для клуба](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "equipment_id": {
                    "type": "string",
                    "description": "Идентификатор тренажёра из поля equipment[].eqid."
                  },
                  "team_id": {
                    "type": [
                      "integer",
                      "string"
                    ],
                    "description": "Номер команды"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в TRIDE"
                  },
                  "external_session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента в во внешней системе"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999…, 8999…, 7999…); основной и дополнительные номера"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента в системе TRIDE"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "session_id": "000000000000000000000001",
                "client_id": 1001,
                "equipment_id": "000000000000000000000002"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор тренировки в TRIDE"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента в системе TRIDE"
                        },
                        "result": {
                          "type": "boolean",
                          "description": "результат операции"
                        },
                        "booking_id": {
                          "type": "string"
                        },
                        "reused": {
                          "type": "boolean"
                        },
                        "deduplicated": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/class.unset.participant": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "class-unset-participant",
        "summary": "Освободить место участника",
        "description": "Снимает участника с занятия и освобождает тренажёр. Передайте ключ клуба и идентификаторы занятия и клиента. Условия отмены определяют возврат визита и денег. [Инструкция для клуба](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента в во внешней системе"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999…, 8999…, 7999…); основной и дополнительные номера"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента в системе TRIDE"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в TRIDE"
                  },
                  "external_session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "session_id": "000000000000000000000001",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean",
                          "description": "результат операции"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "client_id": {
                          "type": "integer"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/listequipment": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "listequipment",
        "summary": "Получить места и их занятость на занятии",
        "description": "Передайте ключ клуба и session_id или external_session_id. Используйте eqid из списка свободных мест. При передаче идентификатора клиента ismy указывает на его место. [Инструкция для клуба](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия во внешней системе"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор тренировки"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "equipment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "eqid": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор оборудования"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название/номер оборудования"
                              },
                              "teams": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Объект данных о доступности оборудования в рамках разных команд. Ключи объекта это номера команд, значения true/false означающий занят ли тренажер, в рамках команды, true - уже занят  (если команды актуальны)"
                              },
                              "occupied": {
                                "type": "boolean",
                                "description": "Занят ли тренажер"
                              },
                              "ismy": {
                                "type": "boolean",
                                "description": "Клиент уже зарегистрирован на данном оборудовании (если был передан идентификатор клиента)"
                              },
                              "myteam": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Номер команды клиента (если команды актуальны)  (если был передан идентификатор клиента)"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/club.listequipment": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "club-listequipment",
        "summary": "Получить оборудование клуба",
        "description": "Получить список оборудования в клубе. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "equipment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "eqid": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор оборудования"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название/номер оборудования"
                              },
                              "enabled": {
                                "type": "boolean",
                                "description": "Включено ли оборудование (true/false)"
                              },
                              "sport_type": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Идентификатор вида спорта (1 сайкл, 2 гребля)"
                              },
                              "zone_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название зоны в клубе"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/sensors.list.hr": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "sensors-list-hr",
        "summary": "Получить доступные датчики пульса",
        "description": "Получите список видимых пульсометров по session_id или external_session_id с ключом внешней системы клуба. Пустой массив sensors означает, что подходящих устройств сейчас нет. [Инструкция для клуба](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в системе TRIDE"
                  },
                  "external_session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в во внешней системе"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "sensors": {
                          "type": "array",
                          "description": "Массив объектов данных по датчикам",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор устройства"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название устройства"
                              },
                              "serial": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Серийный номер устройства если есть"
                              },
                              "protocol": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Протокол устройства (1 - ANT, 2 - BLE, 3 - WIFI)"
                              },
                              "value": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Крайнее переданное датчиком значение пульса"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/activities.list": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "activities-list",
        "summary": "Получить историю тренировок",
        "description": "Получить историю активностей клиента. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Количество записей в 1 выдаче, максимум 30"
                  },
                  "skip": {
                    "type": "integer",
                    "description": "Сколько записей необходимо пропустить"
                  },
                  "order": {
                    "type": "string",
                    "description": "Сортировка записей.'desc' в прошлое 'asc' в будущее"
                  },
                  "start_ts": {
                    "type": "integer",
                    "description": "unixtimestamp начала периода"
                  },
                  "end_ts": {
                    "type": "integer",
                    "description": "unixtimestamp конца периода"
                  },
                  "sport_type": {
                    "type": "integer",
                    "description": "Идентификатор вида спорта"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей отвечающих критериям запроса"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {},
                              "session_id": {},
                              "club_ids": {
                                "type": "array",
                                "items": {}
                              },
                              "sport_type": {},
                              "duration": {
                                "type": "number"
                              },
                              "started_ts": {
                                "type": "integer"
                              },
                              "totals": {
                                "type": "object"
                              }
                            }
                          }
                        },
                        "limit": {},
                        "skip": {
                          "type": "integer"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/activities.get": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "activities-get",
        "summary": "Получить показатели тренировки",
        "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор активности"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор активности"
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Название активности"
                        },
                        "sport_type": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Вид спорта"
                        },
                        "uid": {
                          "type": "integer"
                        },
                        "athlete": {},
                        "session_id": {},
                        "club_ids": {
                          "type": "array",
                          "items": {}
                        },
                        "duration": {
                          "type": "number"
                        },
                        "started_ts": {
                          "type": "integer"
                        },
                        "kind": {},
                        "has_analytics": {
                          "type": "boolean"
                        },
                        "totals": {
                          "type": "object"
                        },
                        "averages": {
                          "type": "object"
                        },
                        "maximums": {
                          "type": "object"
                        },
                        "graphs": {},
                        "splits": {},
                        "can_show_splits": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.schedule.list": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "schedule-list",
        "summary": "Расписание клуба",
        "description": "Расписание клуба так, как его видит клиент в приложении (и виджет расписания на сайте): групповые занятия клуба за период с тренерами, зонами, занятостью, условиями записи и ссылкой на запись в веб-приложении. Без дат — окно клиентского расписания клуба (с сегодня или с понедельника на N дней по настройкам). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "date_from": {
                    "type": "string",
                    "description": "Первый день периода (дд.мм.гггг или гггг-мм-дд) в таймзоне клуба; по умолчанию — как в приложении"
                  },
                  "date_to": {
                    "type": "string",
                    "description": "Последний день периода включительно; по умолчанию — горизонт клиентского расписания. Не больше 92 дней"
                  },
                  "class_type_id": {
                    "type": "string",
                    "description": "Только занятия вида тренировки (id из public.class_types.list)"
                  },
                  "coach_id": {
                    "type": "integer",
                    "description": "Только занятия тренера (id из coaches)"
                  },
                  "zone_id": {
                    "type": "string",
                    "description": "Только занятия зоны (id из zones)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "timezone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Таймзона клуба (IANA), в ней даты и время"
                        },
                        "app_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Корень веб-приложения клуба, из которого собраны ссылки на запись"
                        },
                        "section": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Раздел у клиента",
                          "properties": {
                            "visible": {
                              "type": "boolean",
                              "description": "Раздел есть в меню клиента (или витрина включена)"
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Название раздела в приложении клуба"
                            }
                          }
                        },
                        "period": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Период ответа (гггг-мм-дд, включительно)",
                          "properties": {
                            "from": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "to": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "display": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Что клуб показывает в клиентском расписании",
                          "properties": {
                            "coaches": {
                              "type": "boolean"
                            },
                            "zones": {
                              "type": "boolean"
                            },
                            "occupancy": {
                              "type": "boolean"
                            },
                            "duration": {
                              "type": "boolean"
                            },
                            "end": {
                              "type": "boolean",
                              "description": "Время окончания"
                            },
                            "waitlist": {
                              "type": "boolean",
                              "description": "Клуб разрешает клиентам вставать в лист ожидания (выключено — waitlist_enabled у всех занятий false)"
                            },
                            "start_of_week": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "today — окно с сегодня; monday — с понедельника недели"
                            },
                            "horizon_days": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Горизонт клиентского расписания в днях"
                            }
                          }
                        },
                        "items": {
                          "type": "array",
                          "description": "Занятия по времени начала",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор занятия"
                              },
                              "club_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Клуб занятия"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "theme": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Тема занятия"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цвет занятия (своё или цвет вида)"
                              },
                              "class_type": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Вид тренировки (id — как в public.class_types.*)",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "start": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Начало, ISO 8601 со смещением таймзоны клуба (2026-10-12T19:00:00+03:00)"
                              },
                              "start_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Начало, unix-секунды"
                              },
                              "end": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Окончание, ISO 8601"
                              },
                              "end_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Окончание, unix-секунды"
                              },
                              "duration_minutes": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "coaches": {
                                "type": "array",
                                "description": "Тренеры так, как их показывает клиентское расписание (имя и фото по настройкам клуба)",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "description": "Идентификатор сотрудника"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "photo": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "description": "Картинка или null",
                                      "properties": {
                                        "fileid": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "Идентификатор файла медиа-сервера"
                                        },
                                        "url": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "Готовая ссылка нужного размера"
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "zones": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Название зоны для клиентов"
                                    },
                                    "external": {
                                      "type": "boolean",
                                      "description": "Зона другого клуба (шаринг зон)"
                                    },
                                    "club_name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Клуб-владелец внешней зоны, иначе null"
                                    }
                                  }
                                }
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "scheduled | started | finished"
                              },
                              "is_past": {
                                "type": "boolean",
                                "description": "Занятие завершено или уже прошло по времени"
                              },
                              "capacity": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Занятость по местам, как в приложении",
                                "properties": {
                                  "max": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Вместимость; null — без ограничения"
                                  },
                                  "occupied": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Занято мест"
                                  },
                                  "available": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Свободно мест; null — без ограничения"
                                  },
                                  "is_full": {
                                    "type": "boolean"
                                  },
                                  "occupancy_percent": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "waitlist_enabled": {
                                "type": "boolean",
                                "description": "Лист ожидания включён — по политике листа: клуб не выключил запись в лист (display.waitlist), флаг занятия или вида услуги; у занятия внешней системы (внешней системы/1С) — её настройка"
                              },
                              "booking": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Запись на занятие",
                                "properties": {
                                  "allowed": {
                                    "type": "boolean",
                                    "description": "Запись на занятие открыта клубом"
                                  },
                                  "state": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "open — можно записаться; waitlist — мест нет, клиент может встать в лист ожидания (booking.url ведёт на ту же карточку занятия); full — мест нет и листа нет; closed — запись закрыта; past — занятие прошло"
                                  },
                                  "mode": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "none | membership | package | any — что нужно для записи"
                                  },
                                  "requires_product": {
                                    "type": "boolean",
                                    "description": "Нужен абонемент или пакет"
                                  },
                                  "allows_drop_in": {
                                    "type": "boolean",
                                    "description": "Можно разово оплатить"
                                  },
                                  "is_free": {
                                    "type": "boolean"
                                  },
                                  "price": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Цена разового посещения строкой с двумя знаками или null"
                                  },
                                  "currency": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Ссылка на запись в веб-приложении клуба (домен клуба, его поддомен или app.tride.ru): открывает карточку занятия, после входа клиент записывается"
                                  }
                                }
                              },
                              "sport_types": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              },
                              "online_enabled": {
                                "type": "boolean"
                              },
                              "only_online": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "class_types": {
                          "type": "array",
                          "description": "Виды тренировок занятий периода (фильтр приложения)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "image": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "coaches": {
                          "type": "array",
                          "description": "Тренеры занятий периода (фильтр приложения)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Идентификатор сотрудника"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "photo": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "zones": {
                          "type": "array",
                          "description": "Зоны занятий периода (фильтр приложения)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название зоны для клиентов"
                              },
                              "external": {
                                "type": "boolean",
                                "description": "Зона другого клуба (шаринг зон)"
                              },
                              "club_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Клуб-владелец внешней зоны, иначе null"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "timezone": "Europe/Moscow",
                  "items": [
                    {
                      "id": "demo-session",
                      "name": "Стретчинг",
                      "start": "2026-12-07T10:00:00+03:00",
                      "duration_minutes": 50,
                      "booking": {
                        "state": "open",
                        "url": "https://club.example.com/venue/schedule?session=demo-session"
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.schedule.get": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-schedule-get",
        "summary": "Открыть карточку занятия",
        "description": "Одно занятие клиентского расписания с условиями записи и ссылкой на запись. Занятие не видно клиенту (отменено, удалено, скрытый вид или зона, чужой клуб) — not_found. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор занятия"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "timezone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Таймзона клуба (IANA), в ней даты и время"
                        },
                        "app_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Корень веб-приложения клуба, из которого собраны ссылки на запись"
                        },
                        "item": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Идентификатор занятия"
                            },
                            "club_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Клуб занятия"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "theme": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Тема занятия"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "color": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цвет занятия (своё или цвет вида)"
                            },
                            "class_type": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Вид тренировки (id — как в public.class_types.*)",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            },
                            "start": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Начало, ISO 8601 со смещением таймзоны клуба (2026-10-12T19:00:00+03:00)"
                            },
                            "start_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Начало, unix-секунды"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Окончание, ISO 8601"
                            },
                            "end_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Окончание, unix-секунды"
                            },
                            "duration_minutes": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "coaches": {
                              "type": "array",
                              "description": "Тренеры так, как их показывает клиентское расписание (имя и фото по настройкам клуба)",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Идентификатор сотрудника"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "photo": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "Картинка или null",
                                    "properties": {
                                      "fileid": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "description": "Идентификатор файла медиа-сервера"
                                      },
                                      "url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "description": "Готовая ссылка нужного размера"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "zones": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Название зоны для клиентов"
                                  },
                                  "external": {
                                    "type": "boolean",
                                    "description": "Зона другого клуба (шаринг зон)"
                                  },
                                  "club_name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Клуб-владелец внешней зоны, иначе null"
                                  }
                                }
                              }
                            },
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "scheduled | started | finished"
                            },
                            "is_past": {
                              "type": "boolean",
                              "description": "Занятие завершено или уже прошло по времени"
                            },
                            "capacity": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Занятость по местам, как в приложении",
                              "properties": {
                                "max": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "description": "Вместимость; null — без ограничения"
                                },
                                "occupied": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "description": "Занято мест"
                                },
                                "available": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "description": "Свободно мест; null — без ограничения"
                                },
                                "is_full": {
                                  "type": "boolean"
                                },
                                "occupancy_percent": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                }
                              }
                            },
                            "waitlist_enabled": {
                              "type": "boolean",
                              "description": "Лист ожидания включён — по политике листа: клуб не выключил запись в лист (display.waitlist), флаг занятия или вида услуги; у занятия внешней системы (внешней системы/1С) — её настройка"
                            },
                            "booking": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Запись на занятие",
                              "properties": {
                                "allowed": {
                                  "type": "boolean",
                                  "description": "Запись на занятие открыта клубом"
                                },
                                "state": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "open — можно записаться; waitlist — мест нет, клиент может встать в лист ожидания (booking.url ведёт на ту же карточку занятия); full — мест нет и листа нет; closed — запись закрыта; past — занятие прошло"
                                },
                                "mode": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "none | membership | package | any — что нужно для записи"
                                },
                                "requires_product": {
                                  "type": "boolean",
                                  "description": "Нужен абонемент или пакет"
                                },
                                "allows_drop_in": {
                                  "type": "boolean",
                                  "description": "Можно разово оплатить"
                                },
                                "is_free": {
                                  "type": "boolean"
                                },
                                "price": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Цена разового посещения строкой с двумя знаками или null"
                                },
                                "currency": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Ссылка на запись в веб-приложении клуба (домен клуба, его поддомен или app.tride.ru): открывает карточку занятия, после входа клиент записывается"
                                }
                              }
                            },
                            "sport_types": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            "online_enabled": {
                              "type": "boolean"
                            },
                            "only_online": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.schedule.seats": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-schedule-seats",
        "summary": "Получить план мест на занятии",
        "description": "Места, карта зоны и занятость одного занятия — как в модалке записи приложения: какие места есть у занятия, свободны они или заняты, карта зоны с координатами (если у зоны включена карта), команды буткемпа. Записавшиеся (include=participants) отдаются только если клуб разрешил показывать их сайту (настройка «Внешние системы → записавшиеся на занятие»). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор занятия"
                  },
                  "include": {
                    "type": "string",
                    "description": "participants — добавить записавшихся (ник, аватар, место), если клуб разрешил"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "session": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "theme": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "start": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ISO 8601 со смещением клуба"
                            },
                            "start_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "end_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "duration_minutes": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "scheduled | started | finished"
                            },
                            "is_past": {
                              "type": "boolean"
                            }
                          }
                        },
                        "capacity": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Занятость: у занятия с местами — по местам, иначе по количеству",
                          "properties": {
                            "max": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Мест всего (null — без ограничения)"
                            },
                            "occupied": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "available": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "is_full": {
                              "type": "boolean"
                            },
                            "by_seats": {
                              "type": "boolean"
                            },
                            "unlimited": {
                              "type": "boolean"
                            },
                            "seatless_occupied": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Записавшиеся без места (резервы, посадка с экрана)"
                            }
                          }
                        },
                        "seat_selection": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "enabled": {
                              "type": "boolean",
                              "description": "Приложение показывает выбор места"
                            },
                            "skip": {
                              "type": "boolean",
                              "description": "Клуб выключил выбор места"
                            },
                            "required": {
                              "type": "boolean",
                              "description": "При записи место обязательно"
                            }
                          }
                        },
                        "bootcamp": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "teams": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        },
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название зоны для клиентов"
                              },
                              "use_map": {
                                "type": "boolean"
                              },
                              "map": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Карта зоны (null без карты): холст width×height, элементы (coach, screen, entrance, stage, wall) и места с координатами редактора; legend — цвета подсказки",
                                "properties": {
                                  "width": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "height": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "elements": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "x": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "y": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "rotation": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  "seats": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "x": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "y": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "rotation": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "shape": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "circle | square | rect"
                                        }
                                      }
                                    }
                                  },
                                  "legend": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "{free, occupied, mine} — цвета из редактора зоны или null"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "seats": {
                          "type": "array",
                          "description": "Места занятия по номеру",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор места (тренажёра)"
                              },
                              "number": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Номер места, как на схеме зала"
                              },
                              "zone_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sport_type": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{id, name} вида спорта места или null"
                              },
                              "state": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "free — свободно, occupied — занято (в т.ч. резерв), mine — место смотрящего клиента"
                              },
                              "teams": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Буткемп: {team_1: занято?, …}"
                              },
                              "hr_only": {
                                "type": "boolean",
                                "description": "Место только с датчиком пульса (без тренажёра)"
                              }
                            }
                          }
                        },
                        "waitlist_enabled": {
                          "type": "boolean",
                          "description": "Лист ожидания включён — по политике листа: клуб не выключил запись в лист, флаг занятия или вида услуги; у занятия внешней системы (внешней системы/1С) — её настройка"
                        },
                        "booking": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "allowed": {
                              "type": "boolean"
                            },
                            "state": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "open | waitlist (мест нет, можно встать в лист ожидания) | full | closed | past"
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Ссылка на запись в веб-приложении клуба"
                            }
                          }
                        },
                        "participants_allowed": {
                          "type": "boolean",
                          "description": "include=participants: разрешил ли клуб отдавать записавшихся сайту"
                        },
                        "participants": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Записавшиеся как в модалке записи: только ник и аватар, скрывшие себя не отдаются и не считаются",
                          "properties": {
                            "total": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "client_id": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "nickname": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "display_name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Ник или «Участник» на языке запроса"
                                  },
                                  "photo": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "{fileid, url} или null"
                                  },
                                  "seat_number": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "is_me": {
                                    "type": "boolean",
                                    "description": "Смотрящий клиент (у анонимного вызова всегда false)"
                                  },
                                  "is_following": {
                                    "type": "boolean",
                                    "description": "Смотрящий подписан на участника"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.shop.list": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-shop-list",
        "summary": "Получить витрину покупок",
        "description": "Магазин клуба так, как его видит клиент в приложении: вкладки в порядке приложения (включая вкладку «Товары» и «Без категории»), абонементы и пакеты с ценами, продлением и составом. Клиент анонимный: видны и продукты «только для новых клиентов». Подарочные сертификаты — только у клуба, где они включены в настройках: иначе сертификатных вкладок нет, продукты только из них не показываются, giftable = false, gift_url = null. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "section": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Раздел у клиента",
                          "properties": {
                            "visible": {
                              "type": "boolean",
                              "description": "Раздел есть в меню клиента (или витрина включена)"
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Название раздела в приложении клуба"
                            }
                          }
                        },
                        "tabs": {
                          "type": "array",
                          "description": "Вкладки магазина по порядку",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "id категории, uncategorized или goods"
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "products | uncategorized | goods (содержимое — public.goods.list)"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "image": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              },
                              "is_certificate": {
                                "type": "boolean",
                                "description": "Вкладка сертификатов"
                              },
                              "order": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Ссылка на вкладку в магазине клиента (tab=&club_id=)"
                              }
                            }
                          }
                        },
                        "products": {
                          "type": "array",
                          "description": "Абонементы и пакеты по порядку",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор абонемента или пакета"
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "membership — абонемент, package — пакет"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "short_description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Краткое описание (строка под названием в списке)"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Описание (раскрытая карточка, HTML/markdown как в приложении)"
                              },
                              "cert_short_description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Краткое описание в режиме сертификата/подарка; не заведено — short_description (как в приложении)"
                              },
                              "cert_description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Описание в режиме сертификата/подарка; не заведено — description (как в приложении)"
                              },
                              "category_ids": {
                                "type": "array",
                                "description": "Вкладки магазина, где показывается продукт",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "categories": {
                                "type": "array",
                                "description": "Вкладки магазина продукта в порядке приложения, у каждой — ссылка на продукт в этой вкладке",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Вкладка: id категории или uncategorized"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "is_certificate": {
                                      "type": "boolean",
                                      "description": "Вкладка сертификатов: продукт открывается в подарочном режиме"
                                    },
                                    "url": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Ссылка на продукт во вкладке (tab=&product=&club_id=)"
                                    }
                                  }
                                }
                              },
                              "image": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Валюта, по умолчанию RUB"
                              },
                              "price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена в клубе (с клубной ценой сети), строка с двумя знаками"
                              },
                              "setup_fee": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Вступительный взнос"
                              },
                              "display_price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена в строке списка приложения: взнос, если он есть, иначе цена"
                              },
                              "renewal_price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена со второго периода или null"
                              },
                              "pricing_tiers": {
                                "type": "array",
                                "description": "Ступени цены продления",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "from_period": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ]
                                    },
                                    "price": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "discount_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "fixed_price | percentage"
                                    },
                                    "discount_value": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              },
                              "is_recurrent": {
                                "type": "boolean",
                                "description": "Подписка с регулярным списанием"
                              },
                              "billing_cycle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "one_time | monthly | …"
                              },
                              "visits_total": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Тренировок в пакете или null"
                              },
                              "time_limit_minutes": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Минут в пакете или null"
                              },
                              "duration": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Срок действия",
                                "properties": {
                                  "value": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "giftable": {
                                "type": "boolean",
                                "description": "Можно купить в подарок; false, если у клуба выключены подарочные сертификаты"
                              },
                              "requires_certificate": {
                                "type": "boolean",
                                "description": "Продаётся только как сертификат"
                              },
                              "network_access": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Доступ в клубах сети",
                                "properties": {
                                  "mode": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "home | network | home_plus | scope"
                                  },
                                  "clubs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Прямая ссылка на покупку в магазине клиента: открывает карточку продукта и переключает клиента на клуб продукта (club_id). Цена — цена магазина; скидки и условия — только у ручных ссылок клуба"
                              },
                              "gift_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Ссылка на продукт во вкладке сертификатов (подарочный режим: сертификатные тексты, получатель) или null, если продукт в такой вкладке не лежит или у клуба выключены подарочные сертификаты"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.shop.product.get": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-shop-product-get",
        "summary": "Открыть продукт магазина",
        "description": "Один абонемент или пакет из магазина клуба. Не виден в магазине (не публичный, вне окна продаж, корпоративный, в скрытой категории) — not_found. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор абонемента или пакета"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "product": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Идентификатор абонемента или пакета"
                            },
                            "kind": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "membership — абонемент, package — пакет"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Краткое описание (строка под названием в списке)"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Описание (раскрытая карточка, HTML/markdown как в приложении)"
                            },
                            "cert_short_description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Краткое описание в режиме сертификата/подарка; не заведено — short_description (как в приложении)"
                            },
                            "cert_description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Описание в режиме сертификата/подарка; не заведено — description (как в приложении)"
                            },
                            "category_ids": {
                              "type": "array",
                              "description": "Вкладки магазина, где показывается продукт",
                              "items": {
                                "type": "string"
                              }
                            },
                            "categories": {
                              "type": "array",
                              "description": "Вкладки магазина продукта в порядке приложения, у каждой — ссылка на продукт в этой вкладке",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Вкладка: id категории или uncategorized"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "is_certificate": {
                                    "type": "boolean",
                                    "description": "Вкладка сертификатов: продукт открывается в подарочном режиме"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Ссылка на продукт во вкладке (tab=&product=&club_id=)"
                                  }
                                }
                              }
                            },
                            "image": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Картинка или null",
                              "properties": {
                                "fileid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Идентификатор файла медиа-сервера"
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Готовая ссылка нужного размера"
                                }
                              }
                            },
                            "color": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "currency": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Валюта, по умолчанию RUB"
                            },
                            "price": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цена в клубе (с клубной ценой сети), строка с двумя знаками"
                            },
                            "setup_fee": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Вступительный взнос"
                            },
                            "display_price": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цена в строке списка приложения: взнос, если он есть, иначе цена"
                            },
                            "renewal_price": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цена со второго периода или null"
                            },
                            "pricing_tiers": {
                              "type": "array",
                              "description": "Ступени цены продления",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "from_period": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "price": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "discount_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "fixed_price | percentage"
                                  },
                                  "discount_value": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            "is_recurrent": {
                              "type": "boolean",
                              "description": "Подписка с регулярным списанием"
                            },
                            "billing_cycle": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "one_time | monthly | …"
                            },
                            "visits_total": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Тренировок в пакете или null"
                            },
                            "time_limit_minutes": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Минут в пакете или null"
                            },
                            "duration": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Срок действия",
                              "properties": {
                                "value": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "unit": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            },
                            "giftable": {
                              "type": "boolean",
                              "description": "Можно купить в подарок; false, если у клуба выключены подарочные сертификаты"
                            },
                            "requires_certificate": {
                              "type": "boolean",
                              "description": "Продаётся только как сертификат"
                            },
                            "network_access": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Доступ в клубах сети",
                              "properties": {
                                "mode": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "home | network | home_plus | scope"
                                },
                                "clubs": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Прямая ссылка на покупку в магазине клиента: открывает карточку продукта и переключает клиента на клуб продукта (club_id). Цена — цена магазина; скидки и условия — только у ручных ссылок клуба"
                            },
                            "gift_url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Ссылка на продукт во вкладке сертификатов (подарочный режим: сертификатные тексты, получатель) или null, если продукт в такой вкладке не лежит или у клуба выключены подарочные сертификаты"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.goods.list": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-goods-list",
        "summary": "Получить список товаров",
        "description": "Вкладка «Товары» магазина: товары, видимые клиенту, с ценами, наличием и замком по правилам доступа. Выключенная витрина — section.visible: false и пустой список. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "source": {
                    "type": "string",
                    "description": "Подборка: all (по умолчанию) | featured | new | sale | category"
                  },
                  "category_id": {
                    "type": "string",
                    "description": "Категория для source=category"
                  },
                  "search": {
                    "type": "string",
                    "description": "Поиск по названию, артикулу, штрихкоду (от 2 символов)"
                  },
                  "sort": {
                    "type": "string",
                    "description": "featured | new | price_asc | price_desc | name (по умолчанию — как в клубе)"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "1–200, по умолчанию 200"
                  },
                  "skip": {
                    "type": "integer",
                    "description": "Сколько пропустить"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "section": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Раздел у клиента",
                          "properties": {
                            "visible": {
                              "type": "boolean",
                              "description": "Раздел есть в меню клиента (или витрина включена)"
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Название раздела в приложении клуба"
                            }
                          }
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "short_description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "image": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              },
                              "category_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "badges": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "hit": {
                                    "type": "boolean"
                                  },
                                  "new": {
                                    "type": "boolean"
                                  },
                                  "sale": {
                                    "type": "boolean"
                                  },
                                  "bestseller": {
                                    "type": "boolean"
                                  }
                                }
                              },
                              "price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена для клиента (null, если клуб скрывает цены)"
                              },
                              "base_price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена без акции"
                              },
                              "price_kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "base | sale | member"
                              },
                              "member_price_teaser": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "«Членам клуба — N», если клуб это показывает"
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "unit": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "pcs | kg | l | …"
                              },
                              "has_variants": {
                                "type": "boolean"
                              },
                              "variants": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "value": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "price": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "stock_state": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "stock_left": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              },
                              "stock_state": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "in_stock | low | out | untracked"
                              },
                              "stock_left": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Остаток, когда клуб показывает «осталось N»"
                              },
                              "purchasable": {
                                "type": "boolean",
                                "description": "Можно купить в приложении"
                              },
                              "not_purchasable_reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "catalog | locked | marked | fractional | free | out_of_stock"
                              },
                              "access": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "open — доступен всем; locked — с замком и причиной (имена сегментов не раскрываются)",
                                "properties": {
                                  "state": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "reasons": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "text": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Прямая ссылка на карточку товара в приложении клуба (club_id переключает клиента на клуб товара)"
                              }
                            }
                          }
                        },
                        "categories": {
                          "type": "array",
                          "description": "Категории с товарами (чипы приложения)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "image": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              },
                              "order": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "count": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Товаров, видимых клиенту"
                              }
                            }
                          }
                        },
                        "settings": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Как клуб показывает витрину",
                          "properties": {
                            "mode": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "sale — продажа, catalog — только показ"
                            },
                            "show_prices": {
                              "type": "boolean"
                            },
                            "stock_display": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "none | in_stock | low"
                            },
                            "catalog_cta": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "none | chat"
                            },
                            "out_of_stock": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "hide | show"
                            },
                            "sort": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего товаров по запросу (до limit/skip)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.goods.get": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-goods-get",
        "summary": "Открыть карточку товара",
        "description": "Карточка товара: всё из списка плюс описание и все фото. Скрытый клиенту или снятый с витрины — not_found. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор товара"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "item": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "image": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Картинка или null",
                              "properties": {
                                "fileid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Идентификатор файла медиа-сервера"
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Готовая ссылка нужного размера"
                                }
                              }
                            },
                            "category_ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "badges": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "hit": {
                                  "type": "boolean"
                                },
                                "new": {
                                  "type": "boolean"
                                },
                                "sale": {
                                  "type": "boolean"
                                },
                                "bestseller": {
                                  "type": "boolean"
                                }
                              }
                            },
                            "price": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цена для клиента (null, если клуб скрывает цены)"
                            },
                            "base_price": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цена без акции"
                            },
                            "price_kind": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "base | sale | member"
                            },
                            "member_price_teaser": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "«Членам клуба — N», если клуб это показывает"
                            },
                            "currency": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "unit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "pcs | kg | l | …"
                            },
                            "has_variants": {
                              "type": "boolean"
                            },
                            "variants": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "value": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "price": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "stock_state": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "stock_left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            "stock_state": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "in_stock | low | out | untracked"
                            },
                            "stock_left": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Остаток, когда клуб показывает «осталось N»"
                            },
                            "purchasable": {
                              "type": "boolean",
                              "description": "Можно купить в приложении"
                            },
                            "not_purchasable_reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "catalog | locked | marked | fractional | free | out_of_stock"
                            },
                            "access": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "open — доступен всем; locked — с замком и причиной (имена сегментов не раскрываются)",
                              "properties": {
                                "state": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "reasons": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "text": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Прямая ссылка на карточку товара в приложении клуба (club_id переключает клиента на клуб товара)"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "images": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.team.list": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-team-list",
        "summary": "Показать команду клуба",
        "description": "Раздел «Команда»: сотрудники, которых видит клиент (по категориям и настройкам раздела), с именем и фото так, как их показывает приложение. Телефоны, email и пол не отдаются. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "section": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Раздел у клиента",
                          "properties": {
                            "visible": {
                              "type": "boolean",
                              "description": "Раздел есть в меню клиента (или витрина включена)"
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Название раздела в приложении клуба"
                            }
                          }
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Идентификатор сотрудника"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Имя так, как его показывает приложение клуба"
                              },
                              "photo": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              },
                              "job_title": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Должность"
                              },
                              "categories": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "categories": {
                          "type": "array",
                          "description": "Вкладки категорий в порядке приложения",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "display": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "view": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "list | grid"
                            },
                            "aspect": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Пропорции фото: 16:9 | 1:1 | 4:3"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.team.get": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-team-get",
        "summary": "Открыть карточку сотрудника",
        "description": "Карточка сотрудника из «Команды». Сотрудник не виден клиенту — not_found. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "id": {
                    "type": "integer",
                    "description": "Идентификатор сотрудника (id из public.team.list)"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "item": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Идентификатор сотрудника"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Имя так, как его показывает приложение клуба"
                            },
                            "photo": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Картинка или null",
                              "properties": {
                                "fileid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Идентификатор файла медиа-сервера"
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Готовая ссылка нужного размера"
                                }
                              }
                            },
                            "job_title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Должность"
                            },
                            "categories": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "О сотруднике (markdown)"
                            },
                            "media": {
                              "type": "array",
                              "description": "Галерея: только то, что видит клиент",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "image | video"
                                  },
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла (у видео — превью или файл)"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Ссылка на картинку нужного размера (у видео — null)"
                                  },
                                  "video_id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Видео медиатеки клуба"
                                  },
                                  "video_urls": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "Ссылки видео медиатеки (качества), если есть"
                                  }
                                }
                              }
                            },
                            "has_personal_booking": {
                              "type": "boolean",
                              "description": "К сотруднику можно записаться персонально"
                            },
                            "shows": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Что ещё показывает карточка приложения",
                              "properties": {
                                "schedule": {
                                  "type": "boolean"
                                },
                                "personal_slots": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.class_types.list": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-class-types-list",
        "summary": "Получить виды занятий витрины",
        "description": "Раздел «Виды тренировок»: виды занятий, которые видит клиент, в порядке приложения. Не путать с list.class.types — справочником сопоставления для интеграций. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "section": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Раздел у клиента",
                          "properties": {
                            "visible": {
                              "type": "boolean",
                              "description": "Раздел есть в меню клиента (или витрина включена)"
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Название раздела в приложении клуба"
                            }
                          }
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "short_description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Описание (markdown)"
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цвет вида для клиента"
                              },
                              "image": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Картинка или null",
                                "properties": {
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла медиа-сервера"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Готовая ссылка нужного размера"
                                  }
                                }
                              },
                              "service_type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "group_class | personal_training"
                              },
                              "sport_types": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              },
                              "difficulty_level": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Сложность 1–10"
                              },
                              "duration_minutes": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "max_participants": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "online_enabled": {
                                "type": "boolean"
                              },
                              "is_bookable": {
                                "type": "boolean",
                                "description": "Запись на занятия открыта"
                              },
                              "personal_booking_available": {
                                "type": "boolean",
                                "description": "Можно записаться персонально"
                              }
                            }
                          }
                        },
                        "display": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "view": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "aspect": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "avatar_position": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "behind | left | right | top | bottom | none"
                            },
                            "show_intensity": {
                              "type": "boolean",
                              "description": "Клуб показывает интенсивность"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.class_types.get": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-class-types-get",
        "summary": "Открыть вид занятия",
        "description": "Карточка вида тренировки. Вид не виден клиенту (черновик, скрыт со страницы видов, чужой клуб, не занятие) — not_found. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор вида тренировки"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "item": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Описание (markdown)"
                            },
                            "color": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Цвет вида для клиента"
                            },
                            "image": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Картинка или null",
                              "properties": {
                                "fileid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Идентификатор файла медиа-сервера"
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Готовая ссылка нужного размера"
                                }
                              }
                            },
                            "service_type": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "group_class | personal_training"
                            },
                            "sport_types": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            "difficulty_level": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Сложность 1–10"
                            },
                            "duration_minutes": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "max_participants": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "online_enabled": {
                              "type": "boolean"
                            },
                            "is_bookable": {
                              "type": "boolean",
                              "description": "Запись на занятия открыта"
                            },
                            "personal_booking_available": {
                              "type": "boolean",
                              "description": "Можно записаться персонально"
                            },
                            "media": {
                              "type": "array",
                              "description": "Галерея: только то, что видит клиент",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "image | video"
                                  },
                                  "fileid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Идентификатор файла (у видео — превью или файл)"
                                  },
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Ссылка на картинку нужного размера (у видео — null)"
                                  },
                                  "video_id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Видео медиатеки клуба"
                                  },
                                  "video_urls": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "Ссылки видео медиатеки (качества), если есть"
                                  }
                                }
                              }
                            },
                            "intensity": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Интенсивность, если клуб её показывает, иначе null"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.card.get": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-card-get",
        "summary": "Получить карточку клиента",
        "description": "Карточка клиента клуба/сети: профиль, клубные поля, сегменты, сетевой профиль (домашний клуб, город), сводка; по флагам include — действующие покупки, ближайшие записи и последние занятия одним вызовом. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) — вся сеть клуба, club — только филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "include": {
                    "type": "string",
                    "description": "Блоки через запятую: fields, segments, network, summary, purchases, bookings, sessions; по умолчанию fields,segments,network"
                  },
                  "all_fields": {
                    "type": "boolean",
                    "description": "true — все включённые клубные поля (и системные с клубным значением), не только показываемые в профиле"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "network | club — область ответа"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "locale": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "client": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Профиль клиента: имя и FTP — с клубными системными полями, как видит клуб",
                          "properties": {
                            "id": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "external_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Идентификатор во внешней системе клуба (client.register) или null"
                            },
                            "firstname": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "lastname": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "patronymic": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "nickname": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Имя для показа"
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "birthdate": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "гггг-мм-дд или null"
                            },
                            "gender": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "male | female | null"
                            },
                            "photo": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Картинка или null",
                              "properties": {
                                "fileid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Идентификатор файла медиа-сервера"
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Готовая ссылка нужного размера"
                                }
                              }
                            },
                            "blocked": {
                              "type": "boolean"
                            },
                            "registered_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Регистрация в TRIDE"
                            },
                            "added_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Когда стал клиентом клуба/сети"
                            },
                            "status": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "{code, name, color} статуса клиента в клубе или null"
                            },
                            "source": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "{id, name} источника клиента или null"
                            },
                            "manager": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "{id, name} ответственного сотрудника или null"
                            },
                            "tags": {
                              "type": "array",
                              "description": "Теги клиента, видимые в клубе",
                              "items": {
                                "type": "string"
                              }
                            },
                            "consents": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "{push, email, sms, calls} — согласия на каналы"
                            },
                            "fitness": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "{weight, height, ftp, rowing_ftp, maxhr} как в client.info"
                            }
                          }
                        },
                        "clubs": {
                          "type": "array",
                          "description": "Клубы сети, где человек клиент",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "is_home": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "network": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сетевой профиль клиента (null у клуба без сети)",
                          "properties": {
                            "home_club": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Домашний клуб или null",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            },
                            "home_club_since_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "attributes": {
                              "type": "array",
                              "description": "Признаки сети со значением у клиента (город и другие включённые признаки группы)",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "city, level или свой ключ группы"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "value_id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "value": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Название значения на языке запроса"
                                  }
                                }
                              }
                            },
                            "origin_club": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Клуб первого добавления или null",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "fields": {
                          "type": "array",
                          "description": "Клубные поля клиента (общие для сети): по умолчанию — показываемые в профиле, без системных",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Код системного поля (firstname, lastname, nickname, ftp, rowing_ftp) или null"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название на языке запроса"
                              },
                              "group": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Группа полей в профиле"
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "text | select | boolean | number | date"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "show_profile": {
                                "type": "boolean"
                              },
                              "value": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Значение как хранится: строка, число, boolean, дата дд.мм.гггг, id опции или массив id"
                              },
                              "value_label": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название опции (или массив названий) у select, иначе null"
                              }
                            }
                          }
                        },
                        "segments": {
                          "type": "array",
                          "description": "Сегменты клуба и сети, в которых клиент состоит сейчас (активные сегменты, живое членство)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "club": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Клуб ответа",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "added_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Когда попал в сегмент"
                              }
                            }
                          }
                        },
                        "summary": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сводка клиента (как в списке клиентов у сотрудника): null, если ещё не посчитана",
                          "properties": {
                            "last_visit": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Последний визит по всем источникам (занятия, брони с приходом, внешние CRM, СКУД) или null",
                              "properties": {
                                "ts": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ISO 8601"
                                },
                                "kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "booking | access | external | training"
                                },
                                "club": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "description": "Клуб ответа",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              }
                            },
                            "first_visit_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "visits": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Дней с визитами за 30/90/365 дней и всего",
                              "properties": {
                                "d30": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "d90": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "d365": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "total": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                }
                              }
                            },
                            "next_booking_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "no_shows_90": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "has_active_membership": {
                              "type": "boolean"
                            },
                            "ltv": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Сумма покупок, строка с двумя знаками"
                            },
                            "last_purchase_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "balance": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "bonus": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Бонусный баланс клиента (счёт сети или клуба, тот же, что в приложении)"
                            },
                            "bonus_next_expiry": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Ближайшее сгорание бонусов {amount, expires_at} или null"
                            },
                            "risk": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "none | low | mid | high — риск оттока"
                            },
                            "added_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Когда стал клиентом"
                            },
                            "computed_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Когда посчитана сводка"
                            }
                          }
                        },
                        "purchases": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "include=purchases: {items[], past_total} как client.purchases.list (без товаров)"
                        },
                        "bookings": {
                          "type": "array",
                          "description": "include=bookings: до 10 ближайших записей как client.bookings.upcoming",
                          "items": {
                            "type": "object"
                          }
                        },
                        "sessions": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "include=sessions: {total, items[]} — до 10 последних занятий как client.sessions.last"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.purchases.list": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-purchases-list",
        "summary": "Получить действующие покупки",
        "description": "Действующие покупки клиента (абонементы, пакеты, подписки): тот же список, что на странице «Покупки» приложения — статусы active, frozen, pending_activation; по сети или филиалу. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) — вся сеть клуба, club — только филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "with_goods": {
                    "type": "boolean",
                    "description": "true — добавить товары клиента (блок «Товары» страницы)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "network | club — область ответа"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "items": {
                          "type": "array",
                          "description": "Покупки в порядке страницы «Покупки»",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор покупки (экземпляра абонемента или пакета)"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "membership — абонемент (безлимит на срок), package — пакет тренировок или минут"
                              },
                              "product_type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "unlimited | limited_visits | class_pack | limited_time"
                              },
                              "product_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Продукт магазина (public.shop.product.get)"
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "active | frozen | pending_activation | expired | cancelled"
                              },
                              "payment_type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "single — разовая, recurrent — подписка"
                              },
                              "is_subscription": {
                                "type": "boolean"
                              },
                              "club": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Клуб покупки",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "visits": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Тренировки пакета или null",
                                "properties": {
                                  "total": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "minutes": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Минуты пакета или null",
                                "properties": {
                                  "total": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "days": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Срок в днях или null",
                                "properties": {
                                  "total": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Осталось дней (у ожидающих активации — null)"
                                  }
                                }
                              },
                              "purchased_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Дата покупки ISO 8601 со смещением клуба"
                              },
                              "purchased_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Дата покупки, unix-секунды"
                              },
                              "starts_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Начало срока, гггг-мм-дд"
                              },
                              "activated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Когда активирована, ISO 8601"
                              },
                              "activate_until": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Активировать до, гггг-мм-дд (ожидающие активации)"
                              },
                              "expires_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Действует до, гггг-мм-дд (у ожидающих активации — null)"
                              },
                              "price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена покупки, строка с двумя знаками, или null"
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "frozen": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "is_frozen": {
                                    "type": "boolean"
                                  },
                                  "until": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "гггг-мм-дд или null"
                                  }
                                }
                              },
                              "autopay": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Автопродление подписки или null (у архивных — всегда null)",
                                "properties": {
                                  "enabled": {
                                    "type": "boolean"
                                  },
                                  "managed_by": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "tride — продлевает TRIDE, external — внешняя CRM"
                                  },
                                  "method": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "{brand, last4} сохранённой карты или null"
                                  },
                                  "next_payment_ts": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "clubs": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Где действует: тип доступа сети и список клубов (пустой — вся сеть)",
                                "properties": {
                                  "type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "single_club | network | global | selected"
                                  },
                                  "home_club_id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "allowed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "sponsor": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Компания или семья, оплатившая покупку, или null"
                              },
                              "external": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{id, system: psport | onec} у зеркал внешних CRM, иначе null"
                              }
                            }
                          }
                        },
                        "past_total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Сколько покупок в архиве (client.purchases.history)"
                        },
                        "goods": {
                          "type": "array",
                          "description": "Товары клиента (блок «Товары» страницы «Покупки»): ожидают выдачи или проданы за 90 дней",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "qty": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "unit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "total": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "sold | awaiting_pickup | issued | partially_refunded | refunded"
                              },
                              "sold_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ISO 8601"
                              },
                              "sold_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "club": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Клуб ответа",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "pickup_code": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Код самовывоза (режим QR), иначе null"
                              },
                              "pickup_mode": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "refunded_qty": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.purchases.history": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-purchases-history",
        "summary": "Загрузить историю покупок",
        "description": "Прошлые покупки клиента (архив страницы «Покупки»): статусы expired и cancelled, новые первыми. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) — вся сеть клуба, club — только филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "1..200, по умолчанию 50"
                  },
                  "offset": {
                    "type": "integer",
                    "description": "Смещение, по умолчанию 0"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "network | club — область ответа"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "limit": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "offset": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор покупки (экземпляра абонемента или пакета)"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "membership — абонемент (безлимит на срок), package — пакет тренировок или минут"
                              },
                              "product_type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "unlimited | limited_visits | class_pack | limited_time"
                              },
                              "product_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Продукт магазина (public.shop.product.get)"
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "active | frozen | pending_activation | expired | cancelled"
                              },
                              "payment_type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "single — разовая, recurrent — подписка"
                              },
                              "is_subscription": {
                                "type": "boolean"
                              },
                              "club": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Клуб покупки",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "visits": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Тренировки пакета или null",
                                "properties": {
                                  "total": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "minutes": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Минуты пакета или null",
                                "properties": {
                                  "total": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "days": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Срок в днях или null",
                                "properties": {
                                  "total": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "left": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Осталось дней (у ожидающих активации — null)"
                                  }
                                }
                              },
                              "purchased_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Дата покупки ISO 8601 со смещением клуба"
                              },
                              "purchased_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Дата покупки, unix-секунды"
                              },
                              "starts_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Начало срока, гггг-мм-дд"
                              },
                              "activated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Когда активирована, ISO 8601"
                              },
                              "activate_until": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Активировать до, гггг-мм-дд (ожидающие активации)"
                              },
                              "expires_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Действует до, гггг-мм-дд (у ожидающих активации — null)"
                              },
                              "price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Цена покупки, строка с двумя знаками, или null"
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "frozen": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "is_frozen": {
                                    "type": "boolean"
                                  },
                                  "until": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "гггг-мм-дд или null"
                                  }
                                }
                              },
                              "autopay": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Автопродление подписки или null (у архивных — всегда null)",
                                "properties": {
                                  "enabled": {
                                    "type": "boolean"
                                  },
                                  "managed_by": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "tride — продлевает TRIDE, external — внешняя CRM"
                                  },
                                  "method": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "{brand, last4} сохранённой карты или null"
                                  },
                                  "next_payment_ts": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "clubs": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Где действует: тип доступа сети и список клубов (пустой — вся сеть)",
                                "properties": {
                                  "type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "single_club | network | global | selected"
                                  },
                                  "home_club_id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "allowed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "sponsor": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Компания или семья, оплатившая покупку, или null"
                              },
                              "external": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{id, system: psport | onec} у зеркал внешних CRM, иначе null"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.bookings.upcoming": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-bookings-upcoming",
        "summary": "Получить ближайшие записи клиента",
        "description": "Ближайшие записи клиента — как страница «Мои записи» и виджет «Ближайшие записи»: групповые занятия и персональные записи со статусами confirmed, pending, in_progress, completed (приход отмечен), начиная с двух часов назад. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) — вся сеть клуба, club — только филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "1..200, по умолчанию 20"
                  },
                  "with_waitlist": {
                    "type": "boolean",
                    "description": "true — добавить записи в листе ожидания (status waitlisted)"
                  },
                  "date_to": {
                    "type": "string",
                    "description": "Не позже этого дня (дд.мм.гггг или гггг-мм-дд, таймзона клуба)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "network | club — область ответа"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "timezone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Таймзона клуба настроек"
                        },
                        "items": {
                          "type": "array",
                          "description": "По времени начала",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор брони"
                              },
                              "session_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Занятие расписания (public.schedule.get) или null у персональной записи"
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "class — групповое занятие, personal — персональная запись к специалисту"
                              },
                              "booking_type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Технический тип брони: class | service | …"
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "confirmed | pending | in_progress | completed | waitlisted"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "theme": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Тема занятия"
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "start": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Начало ISO 8601 со смещением клуба записи"
                              },
                              "start_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "duration_minutes": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "in_progress": {
                                "type": "boolean",
                                "description": "Занятие уже идёт"
                              },
                              "club": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Клуб ответа",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "zones": {
                                "type": "array",
                                "description": "Названия зон для клиентов",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "coaches": {
                                "type": "array",
                                "description": "Сотрудники как в «Команде» клуба (имя и фото по настройкам клуба)",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "description": "uid сотрудника"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "photo": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "description": "{fileid, url} или null"
                                    }
                                  }
                                }
                              },
                              "seat": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Место или null",
                                "properties": {
                                  "number": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Номер тренажёра/места"
                                  },
                                  "is_group": {
                                    "type": "boolean",
                                    "description": "Групповая бронь на несколько мест"
                                  },
                                  "seats": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "numbers": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "sport_types": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              },
                              "created_in_app": {
                                "type": "boolean",
                                "description": "Запись сделана в TRIDE (клиент может отменить её в приложении)"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Ссылка на занятие в веб-приложении клуба или null"
                              },
                              "waitlist": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "У брони листа ожидания (status waitlisted): очередь и предложение места, иначе null",
                                "properties": {
                                  "mode": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "local — очередь ведёт TRIDE, external — внешняя система клуба"
                                  },
                                  "managed_by": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "tride | psport | onec"
                                  },
                                  "position": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Позиция в очереди (только mode local), иначе null"
                                  },
                                  "offer_pending": {
                                    "type": "boolean",
                                    "description": "Клиенту предложено освободившееся место (локальный режим без автоподнятия), дедлайн не истёк"
                                  },
                                  "offer_expires_at": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Дедлайн предложения ISO 8601 со смещением клуба или null"
                                  },
                                  "offer_expires_ts": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Дедлайн предложения, unix-секунды, или null"
                                  },
                                  "can_confirm": {
                                    "type": "boolean",
                                    "description": "Предложение можно подтвердить: клиентским токеном club/bookings.waitlist.confirm (отказ — club/bookings.waitlist.decline)"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.sessions.last": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-sessions-last",
        "summary": "Получить прошедшие занятия клиента",
        "description": "Последние занятия, на которых был клиент — как раздел «Занятия» приложения: интерактивные тренировки и посещения групповых занятий с отметкой прихода в клубах области, новые первыми. Персональные записи, визиты из внешних CRM и проходы СКУД сюда не входят (см. client.card.get → summary.last_visit). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) — вся сеть клуба, club — только филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "1..100, по умолчанию 10"
                  },
                  "offset": {
                    "type": "integer",
                    "description": "Смещение, по умолчанию 0"
                  },
                  "date_from": {
                    "type": "string",
                    "description": "С этого дня включительно (дд.мм.гггг или гггг-мм-дд)"
                  },
                  "date_to": {
                    "type": "string",
                    "description": "По этот день включительно; период не длиннее 366 дней"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "network | club — область ответа"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "timezone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего занятий по фильтру"
                        },
                        "limit": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "offset": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор записи истории (activities.get)"
                              },
                              "session_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "training — интерактивная тренировка с данными, attendance — посещение занятия"
                              },
                              "source": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "tride | booking | внешний источник (часы, приложения)"
                              },
                              "start": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ISO 8601 со смещением клуба занятия"
                              },
                              "start_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "duration_minutes": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "clubs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              },
                              "coaches": {
                                "type": "array",
                                "description": "Сотрудники как в «Команде» клуба (имя и фото по настройкам клуба)",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "description": "uid сотрудника"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "photo": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "description": "{fileid, url} или null"
                                    }
                                  }
                                }
                              },
                              "sport_type": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{id, name} или null",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "totals": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{calories, distance, points, meps} у тренировок, null у посещений"
                              },
                              "has_analytics": {
                                "type": "boolean",
                                "description": "Есть графики и аналитика (activities.get)"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.activity.summary": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-activity-summary",
        "summary": "Получить сводку активности",
        "description": "Сводка активности клиента по тому же расчёту, что у виджета Home: visits — уникальные дни посещений, sessions — занятия, bookings — записи; всего, календарные месяц/год, первая/последняя дата, club/network/compare. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) | club | compare; compare требует филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "source": {
                    "type": "string",
                    "description": "visits (по умолчанию) — дни посещений, sessions — занятия, bookings — записи"
                  },
                  "booking_mode": {
                    "type": "string",
                    "description": "Для source=bookings: all (по умолчанию) — все прошедшие неотменённые записи, visited — только посещённые записи"
                  },
                  "include_series": {
                    "type": "boolean",
                    "description": "true — шесть календарных месяцев в series каждой области, включая нулевые"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network | compare; у одиночного клуба club"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "source": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "visits | sessions | bookings"
                        },
                        "booking_mode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "all | visited; режим подсчёта bookings, по умолчанию all"
                        },
                        "timezone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "generated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Момент расчёта ISO 8601"
                        },
                        "summary": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "club/network — Summary или null. Summary: {id,name,total,month:{key,count},year:{key,count},first,last,series?}; EventRef: {ts,date,at,club|null}; series — шесть точек {key,count}"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.schedule.session": {
      "post": {
        "tags": [
          "Личный кабинет"
        ],
        "operationId": "client-schedule-session",
        "summary": "Показать занятие с учётом статуса клиента",
        "description": "Занятие глазами клиента — как модалка записи приложения: места с отметкой «моё», карта зоны, занятость, моя бронь и условия отмены, лист ожидания; include=participants — записавшиеся (ник, аватар, место, is_me, is_following) по правилам приватности приложения. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/guides/client-account/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE (client_id из client.info / check.auth)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании (+7 999 …, 8999…, 7999…); ищется основной номер и дополнительные"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба (как в client.register), в любом клубе сети ключа"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа клуба — необязателен (клуб той же сети); для ключа группы — сужает ответ до филиала, без него область — вся сеть"
                  },
                  "scope": {
                    "type": "string",
                    "description": "network (по умолчанию) — вся сеть клуба, club — только филиал (club_id или клуб ключа)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык подписей: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm, md (по умолчанию), lg"
                  },
                  "id": {
                    "type": "string",
                    "description": "Идентификатор занятия"
                  },
                  "include": {
                    "type": "string",
                    "description": "participants — добавить записавшихся"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб настроек ответа (явный club_id, клуб ключа или клуб клиента в сети)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "network | club — область ответа"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "session": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "theme": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "start": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ISO 8601 со смещением клуба"
                            },
                            "start_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "end_ts": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "duration_minutes": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "scheduled | started | finished"
                            },
                            "is_past": {
                              "type": "boolean"
                            }
                          }
                        },
                        "capacity": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Занятость: у занятия с местами — по местам, иначе по количеству",
                          "properties": {
                            "max": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Мест всего (null — без ограничения)"
                            },
                            "occupied": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "available": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "is_full": {
                              "type": "boolean"
                            },
                            "by_seats": {
                              "type": "boolean"
                            },
                            "unlimited": {
                              "type": "boolean"
                            },
                            "seatless_occupied": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Записавшиеся без места (резервы, посадка с экрана)"
                            }
                          }
                        },
                        "seat_selection": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "enabled": {
                              "type": "boolean",
                              "description": "Приложение показывает выбор места"
                            },
                            "skip": {
                              "type": "boolean",
                              "description": "Клуб выключил выбор места"
                            },
                            "required": {
                              "type": "boolean",
                              "description": "При записи место обязательно"
                            }
                          }
                        },
                        "bootcamp": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "teams": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        },
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Название зоны для клиентов"
                              },
                              "use_map": {
                                "type": "boolean"
                              },
                              "map": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Карта зоны (null без карты): холст width×height, элементы (coach, screen, entrance, stage, wall) и места с координатами редактора; legend — цвета подсказки",
                                "properties": {
                                  "width": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "height": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "elements": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "x": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "y": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "rotation": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  "seats": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "x": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "y": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "rotation": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "shape": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "description": "circle | square | rect"
                                        }
                                      }
                                    }
                                  },
                                  "legend": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "{free, occupied, mine} — цвета из редактора зоны или null"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "seats": {
                          "type": "array",
                          "description": "Места занятия по номеру",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Идентификатор места (тренажёра)"
                              },
                              "number": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Номер места, как на схеме зала"
                              },
                              "zone_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sport_type": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{id, name} вида спорта места или null"
                              },
                              "state": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "free — свободно, occupied — занято (в т.ч. резерв), mine — место смотрящего клиента"
                              },
                              "teams": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "Буткемп: {team_1: занято?, …}"
                              },
                              "hr_only": {
                                "type": "boolean",
                                "description": "Место только с датчиком пульса (без тренажёра)"
                              }
                            }
                          }
                        },
                        "waitlist_enabled": {
                          "type": "boolean",
                          "description": "Лист ожидания включён — по политике листа: клуб не выключил запись в лист, флаг занятия или вида услуги; у занятия внешней системы (внешней системы/1С) — её настройка"
                        },
                        "booking": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "allowed": {
                              "type": "boolean"
                            },
                            "state": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "open | waitlist (мест нет, можно встать в лист ожидания) | full | closed | past"
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Ссылка на запись в веб-приложении клуба"
                            }
                          }
                        },
                        "my_booking": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Моя запись (или лист ожидания) на занятие, иначе null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "confirmed | pending | in_progress | completed | waitlisted"
                            },
                            "seat": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "{id, number} или null"
                            },
                            "team_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Команда буткемпа или null"
                            },
                            "can_cancel": {
                              "type": "boolean"
                            },
                            "cancellation": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "Условия отмены (как в модалке) или null",
                              "properties": {
                                "can_cancel": {
                                  "type": "boolean"
                                },
                                "has_penalty": {
                                  "type": "boolean"
                                },
                                "penalty_type": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "penalty_amount": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "hours_until_start": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "deadline_hours": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "is_past_deadline": {
                                  "type": "boolean"
                                },
                                "refundable": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        },
                        "waitlist": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Лист ожидания глазами клиента (как bookings.session.get.waitlist в приложении)",
                          "properties": {
                            "enabled": {
                              "type": "boolean",
                              "description": "Лист включён по политике листа (клуб, занятие или вид услуги)"
                            },
                            "mode": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "local — очередь ведёт TRIDE (позиция, предложение места с дедлайном); external — лист ведёт внешняя система клуба (внешней системы/1С): поднятие приходит её синком, позиции и предложений нет"
                            },
                            "managed_by": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "tride | psport | onec"
                            },
                            "on_waitlist": {
                              "type": "boolean",
                              "description": "Клиент стоит в листе этого занятия"
                            },
                            "position": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Позиция клиента в очереди (по приоритету, затем по времени постановки) — только своя бронь листа и только mode local, иначе null"
                            },
                            "offer_pending": {
                              "type": "boolean",
                              "description": "Клиенту предложено освободившееся место (локальный режим без автоподнятия), дедлайн не истёк"
                            },
                            "offer_expires_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Дедлайн предложения ISO 8601 со смещением клуба или null"
                            },
                            "offer_expires_ts": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Дедлайн предложения, unix-секунды, или null"
                            },
                            "can_confirm": {
                              "type": "boolean",
                              "description": "Предложение можно подтвердить: клиентским токеном club/bookings.waitlist.confirm (отказ — club/bookings.waitlist.decline)"
                            }
                          }
                        },
                        "can_book": {
                          "type": "boolean",
                          "description": "Клиент может записаться (не записан, не в листе, есть места)"
                        },
                        "participants": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Записавшиеся как в модалке записи: только ник и аватар, скрывшие себя не отдаются и не считаются",
                          "properties": {
                            "total": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "client_id": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "nickname": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "display_name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Ник или «Участник» на языке запроса"
                                  },
                                  "photo": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "description": "{fileid, url} или null"
                                  },
                                  "seat_number": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "is_me": {
                                    "type": "boolean",
                                    "description": "Смотрящий клиент (у анонимного вызова всегда false)"
                                  },
                                  "is_following": {
                                    "type": "boolean",
                                    "description": "Смотрящий подписан на участника"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.methods": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-methods",
        "summary": "Узнать способы входа клиента",
        "description": "Способы входа в приложение клуба, как их видит экран входа: SMS (код шлёт TRIDE или внешняя система клуба), боты Telegram/MAX, капча. Mobile ID отдельным способом не является — он пробуется внутри client.auth.init (ответ step: mobileid). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения, в котором идёт вход (id клуба/группы)"
                        },
                        "app_origin": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Адрес приложения клуба из настроек клуба (для SDK /sso/sdk.js)"
                        },
                        "methods": {
                          "type": "array",
                          "description": "Способы входа",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "sms | telegram | max"
                              },
                              "primary": {
                                "type": "boolean"
                              },
                              "bot_username": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "level": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "own | group | tride — чей бот"
                              }
                            }
                          }
                        },
                        "code_sender": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Кто шлёт код: tride | onec | psport"
                        },
                        "number_match": {
                          "type": "boolean",
                          "description": "Сверка числа в боте включена"
                        },
                        "captcha": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{provider: none | yandex | psport, sitekey} — какую капчу рендерить на сайте при captcha_required: yandex — SmartCaptcha, psport — reCAPTCHA внешнего провайдера"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.init": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-init",
        "summary": "Начать вход по телефону",
        "description": "Запрос кода входа по телефону — ровно auth/init приложения: лимиты по IP/устройству/номеру и ключу, капча, код от TRIDE или внешней системы клуба, Mobile ID. Ответ step: code — ждать код и звать client.auth.confirm; step: mobileid — опрашивать client.auth.check. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании"
                  },
                  "captcha_token": {
                    "type": "string",
                    "description": "Токен капчи после captcha_required"
                  },
                  "force_sms": {
                    "type": "boolean",
                    "description": "true — не пробовать Mobile ID, сразу код"
                  },
                  "attribution": {
                    "type": "object",
                    "description": "Откуда пришёл клиент (можно и в confirm): {utm: {source, medium, campaign, term, content}, yclid, ym_client_id, referrer, landing_url}. Источник — сайт клуба (определяется сервером)"
                  },
                  "utm": {
                    "type": "object",
                    "description": "Метки посетителя — то же, что attribution.utm"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid — то же, что attribution.yclid"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID — то же, что attribution.ym_client_id"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "phone"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "phone": "<телефон тестового клиента>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "step": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "code — ждём код; mobileid — подтверждение на телефоне (client.auth.check)"
                        },
                        "code_sender": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "tride | onec | psport"
                        },
                        "authrequest": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "step=mobileid: идентификатор для client.auth.check"
                        },
                        "auth_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "step=mobileid: SIM-PUSH | SMS"
                        },
                        "needs_code": {
                          "type": "boolean",
                          "description": "step=mobileid: нужен код из SMS (client.auth.mobileid.confirm)"
                        },
                        "captcha": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{provider: none | yandex | psport, sitekey} — какую капчу рендерить на сайте при captcha_required: yandex — SmartCaptcha, psport — reCAPTCHA внешнего провайдера"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.confirm": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-confirm",
        "summary": "Подтвердить код входа",
        "description": "Подтверждение кода — ровно auth/confirm приложения: проверка кода (5 попыток, 10 минут), правила клуба (clients_only_auth, закрытая регистрация), клиент становится клиентом клуба, учётка во внешней системе, лид, журнал. Возвращает сессию клиента (access_token работает на всех клиентских методах API). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "ref": {
                    "type": "string",
                    "description": "Код «Приведи друга» из ссылки /r/<код> — закрепится после входа"
                  },
                  "attribution": {
                    "type": "object",
                    "description": "Откуда пришёл клиент: {utm: {source, medium, campaign, term, content}, yclid, ym_client_id, referrer, landing_url}. Источник — сайт клуба (определяется сервером)"
                  },
                  "utm": {
                    "type": "object",
                    "description": "Метки посетителя — то же, что attribution.utm"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid — то же, что attribution.yclid"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID — то же, что attribution.ym_client_id"
                  },
                  "pd_consent": {
                    "type": "boolean",
                    "description": "true — клиент принял политику обработки ПД клуба на форме сайта: согласие записывается в карточку клиента («Принято: дата · сайт»)"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "phone",
                  "code"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "phone": "<телефон тестового клиента>",
                "code": "<код из предыдущего шага>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "access_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Токен сессии клиента — работает на всех клиентских методах API (access_token в теле POST). Сессия «только клиент»: роли сотрудника не выдаются"
                        },
                        "refresh_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Для client.auth.refresh (одноразовый, ротируется)"
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения сессии (id клуба/группы)"
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Клуб сессии"
                        },
                        "integration_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус учётки во внешней системе клуба, если она не ok: registration_forbidden, unavailable, …"
                        },
                        "registered": {
                          "type": "boolean",
                          "description": "Клиент завершил регистрацию (cycle/setmydata с registered: true). false — сайт собирает профиль сам или ведёт клиента в приложение клуба"
                        },
                        "profile_missing": {
                          "type": "array",
                          "description": "Обязательные поля клуба, которых у клиента нет (те же правила, что у приложения: настройка регистрации клуба/сети; у завершившего регистрацию — только при включённом дозапросе). Пустой массив — спрашивать нечего. Заполняются через cycle/setmydata с access_token клиента",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile | physical | network | club_field"
                              },
                              "key": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile: firstname, lastname, birthdate, gender, email; physical: weight, height, ftp, rowing_ftp, nickname; network: city"
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "club_field: id клубного поля (ключ в club_fields)"
                              },
                              "field": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "club_field: {id, name, type, group, required, values?, multiple?}"
                              },
                              "values": {
                                "type": "array",
                                "description": "network city: варианты значения",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        },
                        "is_new": {
                          "type": "boolean",
                          "description": "Клиент создан этим входом"
                        },
                        "referral": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Только с ref: {result: attributed|rejected|invalid|not_active|error, reason, gift}"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.check": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-check",
        "summary": "Узнать состояние запроса Mobile ID",
        "description": "Mobile ID: статус подтверждения на телефоне (long-poll до 20 с). confirmed — сессия выдана (один раз); pending — ждать; failed — показать ввод по SMS (client.auth.init с force_sms). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "authrequest": {
                    "type": "string"
                  },
                  "wait": {
                    "type": "integer",
                    "description": "Сколько секунд держать запрос (0–20)"
                  },
                  "pd_consent": {
                    "type": "boolean",
                    "description": "true — клиент принял политику обработки ПД клуба на форме сайта: согласие записывается в карточку клиента («Принято: дата · сайт»)"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "authrequest"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "authrequest": "<authrequest>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "pending | confirmed | consumed | failed"
                        },
                        "auth_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "needs_code": {
                          "type": "boolean"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "failed: mobileid_failed | expired"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "access_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Токен сессии клиента — работает на всех клиентских методах API (access_token в теле POST). Сессия «только клиент»: роли сотрудника не выдаются"
                        },
                        "refresh_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Для client.auth.refresh (одноразовый, ротируется)"
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения сессии (id клуба/группы)"
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Клуб сессии"
                        },
                        "integration_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус учётки во внешней системе клуба, если она не ok: registration_forbidden, unavailable, …"
                        },
                        "registered": {
                          "type": "boolean",
                          "description": "Клиент завершил регистрацию (cycle/setmydata с registered: true). false — сайт собирает профиль сам или ведёт клиента в приложение клуба"
                        },
                        "profile_missing": {
                          "type": "array",
                          "description": "Обязательные поля клуба, которых у клиента нет (те же правила, что у приложения: настройка регистрации клуба/сети; у завершившего регистрацию — только при включённом дозапросе). Пустой массив — спрашивать нечего. Заполняются через cycle/setmydata с access_token клиента",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile | physical | network | club_field"
                              },
                              "key": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile: firstname, lastname, birthdate, gender, email; physical: weight, height, ftp, rowing_ftp, nickname; network: city"
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "club_field: id клубного поля (ключ в club_fields)"
                              },
                              "field": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "club_field: {id, name, type, group, required, values?, multiple?}"
                              },
                              "values": {
                                "type": "array",
                                "description": "network city: варианты значения",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.mobileid.confirm": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-mobileid-confirm",
        "summary": "Подтвердить код Mobile ID",
        "description": "Mobile ID: код из SMS, когда check вернул needs_code. Сессию после подтверждения отдаёт client.auth.check. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "authrequest": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "authrequest",
                  "code"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "authrequest": "<authrequest>",
                "code": "<код из предыдущего шага>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "confirmed": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.messenger.init": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-messenger-init",
        "summary": "Начать вход через мессенджер",
        "description": "Вход через бота Telegram или MAX — ровно auth/messenger.init приложения. Сайт показывает кнопку с deep_link (и QR), короткий код, опрашивает client.auth.messenger.check. Кнопка «вернуться» в боте ведёт на return_url (только origin из настроек клуба); её можно убрать (return_button: false) или подписать по-своему (return_button_text). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "channel": {
                    "type": "string",
                    "description": "telegram | max"
                  },
                  "return_url": {
                    "type": "string",
                    "description": "Куда вернуть клиента из бота (origin из «Адресов сайта» клуба)"
                  },
                  "attribution": {
                    "type": "object",
                    "description": "Откуда пришёл клиент: {utm: {source, medium, campaign, term, content}, yclid, ym_client_id, referrer, landing_url}. Применяются, когда клиент подтвердит вход в боте"
                  },
                  "utm": {
                    "type": "object",
                    "description": "Метки посетителя — то же, что attribution.utm"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid — то же, что attribution.yclid"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID — то же, что attribution.ym_client_id"
                  },
                  "pd_consent": {
                    "type": "boolean",
                    "description": "true — клиент принял политику обработки ПД клуба на форме сайта (записывается, когда клиент подтвердит вход в боте): согласие записывается в карточку клиента («Принято: дата · сайт»)"
                  },
                  "return_button": {
                    "type": "boolean",
                    "description": "false — бот не шлёт кнопку возврата после входа, true — шлёт, даже если клуб её выключил"
                  },
                  "return_button_text": {
                    "type": "string",
                    "description": "Свой текст кнопки возврата, до 64 символов. Без него — «Вернуться на сайт» при return_url, иначе текст из настроек клуба"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "channel"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "channel": "telegram"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "challenge_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "poll_secret": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Секрет опроса — только для client.auth.messenger.check/cancel"
                        },
                        "deep_link": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "bot_username": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "short_code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Код для ввода в боте вручную"
                        },
                        "match_code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Число для сверки в боте (если включена)"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.messenger.check": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-messenger-check",
        "summary": "Получить результат входа через мессенджер",
        "description": "Статус входа через бота. confirmed — сессия (выдаётся один раз, дальше consumed); denied — клиент отказал или заблокирован (error_code); expired. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "challenge_id": {
                    "type": "string"
                  },
                  "poll_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "challenge_id",
                  "poll_secret"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "challenge_id": "000000000000000000000001",
                "poll_secret": "<poll_secret>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "pending | confirmed | consumed | denied | expired"
                        },
                        "error_code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "denied: причина"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "access_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Токен сессии клиента — работает на всех клиентских методах API (access_token в теле POST). Сессия «только клиент»: роли сотрудника не выдаются"
                        },
                        "refresh_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Для client.auth.refresh (одноразовый, ротируется)"
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения сессии (id клуба/группы)"
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Клуб сессии"
                        },
                        "integration_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус учётки во внешней системе клуба, если она не ok: registration_forbidden, unavailable, …"
                        },
                        "registered": {
                          "type": "boolean",
                          "description": "Клиент завершил регистрацию (cycle/setmydata с registered: true). false — сайт собирает профиль сам или ведёт клиента в приложение клуба"
                        },
                        "profile_missing": {
                          "type": "array",
                          "description": "Обязательные поля клуба, которых у клиента нет (те же правила, что у приложения: настройка регистрации клуба/сети; у завершившего регистрацию — только при включённом дозапросе). Пустой массив — спрашивать нечего. Заполняются через cycle/setmydata с access_token клиента",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile | physical | network | club_field"
                              },
                              "key": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile: firstname, lastname, birthdate, gender, email; physical: weight, height, ftp, rowing_ftp, nickname; network: city"
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "club_field: id клубного поля (ключ в club_fields)"
                              },
                              "field": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "club_field: {id, name, type, group, required, values?, multiple?}"
                              },
                              "values": {
                                "type": "array",
                                "description": "network city: варианты значения",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.messenger.cancel": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-messenger-cancel",
        "summary": "Отменить вход через мессенджер",
        "description": "Отменить вход через бота (клиент закрыл форму). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "challenge_id": {
                    "type": "string"
                  },
                  "poll_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "challenge_id",
                  "poll_secret"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "challenge_id": "000000000000000000000001",
                "poll_secret": "<poll_secret>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.refresh": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-refresh",
        "summary": "Обновить клиентскую сессию",
        "description": "Ротация сессии по refresh_token (старая отзывается). Только сессии, выданные через внешний API этой сети. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "refresh_token": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "refresh_token"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "refresh_token": "<refresh_token>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Идентификатор клиента TRIDE"
                        },
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "access_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Токен сессии клиента — работает на всех клиентских методах API (access_token в теле POST). Сессия «только клиент»: роли сотрудника не выдаются"
                        },
                        "refresh_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Для client.auth.refresh (одноразовый, ротируется)"
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения сессии (id клуба/группы)"
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Клуб сессии"
                        },
                        "integration_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус учётки во внешней системе клуба, если она не ok: registration_forbidden, unavailable, …"
                        },
                        "registered": {
                          "type": "boolean",
                          "description": "Клиент завершил регистрацию (cycle/setmydata с registered: true). false — сайт собирает профиль сам или ведёт клиента в приложение клуба"
                        },
                        "profile_missing": {
                          "type": "array",
                          "description": "Обязательные поля клуба, которых у клиента нет (те же правила, что у приложения: настройка регистрации клуба/сети; у завершившего регистрацию — только при включённом дозапросе). Пустой массив — спрашивать нечего. Заполняются через cycle/setmydata с access_token клиента",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile | physical | network | club_field"
                              },
                              "key": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile: firstname, lastname, birthdate, gender, email; physical: weight, height, ftp, rowing_ftp, nickname; network: city"
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "club_field: id клубного поля (ключ в club_fields)"
                              },
                              "field": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "club_field: {id, name, type, group, required, values?, multiple?}"
                              },
                              "values": {
                                "type": "array",
                                "description": "network city: варианты значения",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.logout": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-logout",
        "summary": "Завершить сессию клиента",
        "description": "Отзыв сессии: session_id — одна сессия; клиент (client_id/phone/external_client_id) — все сессии клиента, выданные через внешний API этой сети, и сессии браузера, созданные по их билетам. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.ticket": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-ticket",
        "summary": "Выдать одноразовый билет входа",
        "description": "Одноразовый SSO-билет (120 с): адрес приложения клуба на хосте из настроек клуба, по которому клиент оказывается авторизован без ввода. Вход за клиента без кода — закрыт тумблером «Вход клиентов через внешний API»; сессия браузера — только клиентская. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба"
                  },
                  "path": {
                    "type": "string",
                    "description": "Путь в приложении: /home, /pay/, /venue/shop?tab=…&product=… (по умолчанию /)"
                  },
                  "kind": {
                    "type": "string",
                    "description": "login (по умолчанию) — билет входа в приложение; chat — билет для виджета чата на сайте: TRIDEChat.identify(ticket) привязывает переписку к клиенту (url не возвращается)"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Сессия сайта, от которой выдаётся билет (по умолчанию последняя сессия клиента через этот ключ)"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "client_id": 1001,
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "ticket": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Для TRIDESSO.login(ticket) во фрейме"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Готовый адрес с ?sso= и club_id — редирект клиента"
                        },
                        "app_origin": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения на этом хосте"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.identify": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-identify",
        "summary": "Принять билет из приложения",
        "description": "Обратное SSO («Продолжить как…»): билет «кто я», полученный сайтом из приложения (TRIDESSO.identify()), → клиент и его сессия сайта — как после client.auth.confirm (access_token, refresh_token, session_id; дочерняя к сессии приложения). Билет одноразовый, только своей сети. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "ticket": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "ticket"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "ticket": "<ticket>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "access_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Токен сессии клиента — работает на всех клиентских методах API (access_token в теле POST). Сессия «только клиент»: роли сотрудника не выдаются"
                        },
                        "refresh_token": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Для client.auth.refresh (одноразовый, ротируется)"
                        },
                        "app_version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Контекст приложения сессии (id клуба/группы)"
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Клуб сессии приложения"
                        },
                        "integration_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус учётки во внешней системе клуба, если она не ok: registration_forbidden, unavailable, …"
                        },
                        "registered": {
                          "type": "boolean",
                          "description": "Клиент завершил регистрацию (cycle/setmydata с registered: true). false — сайт собирает профиль сам или ведёт клиента в приложение клуба"
                        },
                        "profile_missing": {
                          "type": "array",
                          "description": "Обязательные поля клуба, которых у клиента нет (те же правила, что у приложения: настройка регистрации клуба/сети; у завершившего регистрацию — только при включённом дозапросе). Пустой массив — спрашивать нечего. Заполняются через cycle/setmydata с access_token клиента",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile | physical | network | club_field"
                              },
                              "key": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "profile: firstname, lastname, birthdate, gender, email; physical: weight, height, ftp, rowing_ftp, nickname; network: city"
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "club_field: id клубного поля (ключ в club_fields)"
                              },
                              "field": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "club_field: {id, name, type, group, required, values?, multiple?}"
                              },
                              "values": {
                                "type": "array",
                                "description": "network city: варианты значения",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Маска номера"
                        },
                        "external_client_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/client.auth.session.get": {
      "post": {
        "tags": [
          "Вход с сайта"
        ],
        "operationId": "client-auth-session-get",
        "summary": "Проверить состояние сессии",
        "description": "Состояние сессии, выданной через внешний API (или браузерной по её билету). Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/auth/site-sso/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети: для ключа группы задаёт клуб сессии и подсказку club_id в адресах; для ключа клуба — необязателен"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_ip": {
                    "type": "string",
                    "description": "IP клиента (браузера) — по нему работают лимиты, капча и журнал входов; IP сервера сайта пишется отдельно"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "Идентификатор браузера клиента (до 64 символов), сайт хранит его в cookie/localStorage своего домена"
                  },
                  "user_agent": {
                    "type": "string",
                    "description": "User-Agent браузера клиента (для подписи сессии и бота)"
                  },
                  "session_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "client_ip",
                  "device_id",
                  "session_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_ip": "192.0.2.10",
                "device_id": "demo-site-browser",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб контекста (филиал или клуб ключа)",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club | network"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "session_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "active | revoked"
                        },
                        "created_at": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "unix"
                        },
                        "auth_method": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "sms | integration | mobileid | telegram | max | refresh"
                        },
                        "via": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ex | sso"
                        },
                        "revoke_reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/sale.create": {
      "post": {
        "tags": [
          "Счёт и дополнения"
        ],
        "operationId": "sale-create",
        "summary": "Выставить счёт с сайта",
        "description": "Счёт на оплату: тот же оффер продажи, что создаёт сотрудник кнопкой «Продать», с оплатой на нашей странице /pay/. Маршрут оплаты — по настройкам клуба, как в магазине приложения: эквайринг клуба, без него — платформы; у клуба с внешней системы/1С и оплатой через внешнюю систему синхронизируемый абонемент оплачивается на её странице (external_system). Правила продукта по клиенту («только новым», «один раз», лимит, возраст, пол, справка, обязательные/несовместимые) — как в магазине: адресный счёт неподходящему клиенту не создаётся (not_eligible), открытую ссылку он не присвоит; у подарка (gift) их не проверяют на покупателе — их проверяет активация сертификата получателем. С клиентом — адресный счёт: pay_url оплачивается без входа (картой или СБП, за клиента счёта; бонусы, сохранённые карты и сертификат клиента — после входа), без клиента — открытая ссылка, по ней нужен вход. Цена — витрины; ручных скидок нет. sso: true с клиентом — pay_url_sso: адрес с одноразовым входом (120 с), клиент попадает на оплату вошедшим (бонусы, сохранённые карты). На странице /pay клиент может зачесть свой денежный подарочный сертификат (у клуба с включёнными сертификатами и оплатой через TRIDE): полное покрытие закрывает счёт без эквайринга. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/checkout/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (счёт принадлежит клубу); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "attribution": {
                    "type": "object",
                    "description": "Источник покупки и метки посетителя: {utm: {source, medium, campaign, term, content}, yclid, ym_client_id, referrer, landing_url}. Источник — сайт: в заказ и в чек внешней системы (metrics.source = site)"
                  },
                  "utm": {
                    "type": "object",
                    "description": "Метки посетителя — то же, что attribution.utm"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid — то же, что attribution.yclid"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID — то же, что attribution.ym_client_id"
                  },
                  "items": {
                    "type": "array",
                    "description": "Позиции счёта. Типы: membership, product, gift_certificate, service, modifier, early_renewal.",
                    "items": {
                      "type": "object"
                    }
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Клиент TRIDE"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента (любое написание)"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба"
                  },
                  "intended": {
                    "type": "object",
                    "description": "Открытая ссылка: {name, phone, email} — кому предназначена"
                  },
                  "claim_policy": {
                    "type": "string",
                    "description": "anyone (по умолчанию) | phone_match — открытую ссылку присвоит только указанный номер"
                  },
                  "promo_code": {
                    "type": "string"
                  },
                  "account_context": {
                    "type": "object",
                    "description": "Выбранная клиентом компания или семья: {account_id, self_pay?}. Требуется адресный счёт. Применяются договорная цена, доступ по спискам и доля по настройкам участника. self_pay: true — полная договорная цена за счёт клиента."
                  },
                  "gift": {
                    "type": "object",
                    "description": "Подарочный сертификат: {recipient_name, recipient_email, sender_name?, sender_email?}; у клуба должны быть включены подарочные сертификаты, продукт должен допускать подарок"
                  },
                  "expires_in_hours": {
                    "type": "integer",
                    "description": "Срок ссылки (по умолчанию как у продукта)"
                  },
                  "note": {
                    "type": "string"
                  },
                  "idempotency_key": {
                    "type": "string",
                    "description": "Повтор с тем же ключом вернёт тот же счёт; ключ действует в пределах сети клуба"
                  },
                  "return_url": {
                    "type": "string",
                    "description": "Куда увести клиента после успешной оплаты на /pay (страница «спасибо» сайта): только адрес с origin из «Адресов сайта» клуба. В браузере (и мобильном) редирект — после вердикта оплаты, в том числе без входа клиента и со страницы возврата банка; если счёт оплачивают в мобильном приложении клуба, редиректа нет"
                  },
                  "sso": {
                    "type": "boolean",
                    "description": "true — с клиентом вернуть pay_url_sso (одноразовый вход, 120 с)"
                  },
                  "ref": {
                    "type": "string",
                    "description": "Код «Приведи друга» из ссылки /r/<код>: с клиентом закрепляется сразу, у открытой ссылки — за тем, кто её присвоит"
                  },
                  "lead_id": {
                    "type": "string",
                    "description": "Заявка сети ключа, из которой продажа: оплата закроет заявку успехом. У заявки с клиентом клиент счёта должен совпадать"
                  }
                },
                "required": [
                  "key",
                  "items"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "items": [
                  {
                    "type": "membership",
                    "item_id": "000000000000000000000001"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб счёта",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор счёта (для sale.get / sale.revoke)"
                        },
                        "sale_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Номер счёта (SALE-…)"
                        },
                        "ledger_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Сквозной номер продажи клуба (S-ГГГГ-NNNNNN) — как в журнале продаж; null, пока продажа не учтена"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "issued | claimed | paid | cancelled | expired | refunded"
                        },
                        "mode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "addressed — клиенту, open — открытая ссылка"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Клиент счёта (null у открытой ссылки до присвоения)"
                        },
                        "items": {
                          "type": "array",
                          "description": "Позиции",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "item_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "unit_price": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "pricing": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{subtotal, discount, total, currency}, при выборе компании или семьи также sponsor_amount. total — оплата клиента."
                        },
                        "pay_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Ссылка на оплату на хосте клуба. Обычный счёт — /pay/, досрочное продление — /buy/ с входом владельца подписки. Срок оплаты — expires_at."
                        },
                        "requires_auth": {
                          "type": "boolean",
                          "description": "Вход владельца подписки обязателен для досрочного продления"
                        },
                        "renewal_checkout": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Для досрочного периода: подтверждение оплаты и применение периода отдельными блоками payment и execution"
                        },
                        "external_system": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "psport | onec — оплата пройдёт на странице внешней системы клуба (у клуба включена оплата через неё, в счёте синхронизируемый абонемент); null — эквайринг клуба или платформы"
                        },
                        "short_code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Короткий код счёта (продиктовать)"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "paid_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "order_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "gift": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{recipient_name, recipient_email} у подарочного сертификата"
                        },
                        "fulfillment_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "pending | completed | partial | failed; external — выдаёт внешняя система. Оплата модификатора не означает его применение: см. modifier_checkout.operations"
                        },
                        "modifier_checkout": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Для модификаторов: null до подготовки заказа; затем order_id, order_version, order_status, fulfillment_status и operations с отдельными payment, approval, execution. Чтение не создаёт заказ и не запускает оплату или сверку CRM"
                        },
                        "refund_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "none — возвратов нет; pending — возврат в процессе у банка; partial — вернули часть; full — вернули всё; failed — банк отклонил возврат"
                        },
                        "refunded_amount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Возвращено клиенту — строка с двумя знаками"
                        },
                        "receipt": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{fd, ofd_url} — чек прихода (номер ФД и ссылка ОФД) или null"
                        },
                        "created_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "return_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Куда /pay уведёт клиента после успешной оплаты (sale.create) или null"
                        },
                        "self_pay_offer": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "При отказе в финансировании: {account_context: {account_id, self_pay: true}, requires_requote: true}. Повторный расчёт выполняется после выбора клиента."
                        },
                        "warnings": {
                          "type": "array",
                          "description": "Предупреждения правил (как у сотрудника)",
                          "items": {
                            "type": "object"
                          }
                        },
                        "pay_url_sso": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "sso: true — адрес оплаты с одноразовым входом клиента"
                        },
                        "referral": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Только с ref и клиентом: {result: attributed|rejected|invalid|not_active|error, reason, gift}"
                        },
                        "pay_url_sso_expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/sale.get": {
      "post": {
        "tags": [
          "Счёт и дополнения"
        ],
        "operationId": "sale-get",
        "summary": "Проверить счёт и выдачу покупки",
        "description": "Состояние счёта, выставленного с сайта: статус, оплата, выдача, возврат денег и чек прихода. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/checkout/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (счёт принадлежит клубу); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб счёта",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Идентификатор счёта (для sale.get / sale.revoke)"
                        },
                        "sale_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Номер счёта (SALE-…)"
                        },
                        "ledger_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Сквозной номер продажи клуба (S-ГГГГ-NNNNNN) — как в журнале продаж; null, пока продажа не учтена"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "issued | claimed | paid | cancelled | expired | refunded"
                        },
                        "mode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "addressed — клиенту, open — открытая ссылка"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Клиент счёта (null у открытой ссылки до присвоения)"
                        },
                        "items": {
                          "type": "array",
                          "description": "Позиции",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "item_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "unit_price": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "pricing": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{subtotal, discount, total, currency}, при выборе компании или семьи также sponsor_amount. total — оплата клиента."
                        },
                        "pay_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Ссылка на оплату на хосте клуба. Обычный счёт — /pay/, досрочное продление — /buy/ с входом владельца подписки. Срок оплаты — expires_at."
                        },
                        "requires_auth": {
                          "type": "boolean",
                          "description": "Вход владельца подписки обязателен для досрочного продления"
                        },
                        "renewal_checkout": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Для досрочного периода: подтверждение оплаты и применение периода отдельными блоками payment и execution"
                        },
                        "external_system": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "psport | onec — оплата пройдёт на странице внешней системы клуба (у клуба включена оплата через неё, в счёте синхронизируемый абонемент); null — эквайринг клуба или платформы"
                        },
                        "short_code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Короткий код счёта (продиктовать)"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "paid_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "order_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "gift": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{recipient_name, recipient_email} у подарочного сертификата"
                        },
                        "fulfillment_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "pending | completed | partial | failed; external — выдаёт внешняя система. Оплата модификатора не означает его применение: см. modifier_checkout.operations"
                        },
                        "modifier_checkout": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Для модификаторов: null до подготовки заказа; затем order_id, order_version, order_status, fulfillment_status и operations с отдельными payment, approval, execution. Чтение не создаёт заказ и не запускает оплату или сверку CRM"
                        },
                        "refund_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "none — возвратов нет; pending — возврат в процессе у банка; partial — вернули часть; full — вернули всё; failed — банк отклонил возврат"
                        },
                        "refunded_amount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Возвращено клиенту — строка с двумя знаками"
                        },
                        "receipt": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{fd, ofd_url} — чек прихода (номер ФД и ссылка ОФД) или null"
                        },
                        "created_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "return_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Куда /pay уведёт клиента после успешной оплаты (sale.create) или null"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/sale.revoke": {
      "post": {
        "tags": [
          "Счёт и дополнения"
        ],
        "operationId": "sale-revoke",
        "summary": "Отозвать счёт",
        "description": "Отозвать счёт (сайт отменил корзину). Оплаченный — offer_already_paid. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/checkout/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (счёт принадлежит клубу); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "id": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб счёта",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/leads.add": {
      "post": {
        "tags": [
          "Заявки из CRM"
        ],
        "operationId": "leads-add",
        "summary": "Создать или дополнить заявку из CRM",
        "description": "Создать заявку (лид) по ключу клуба: с сайта, из CRM или рекламного кабинета. Идемпотентно по external.system + external.id в течение суток. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/widgets/leads/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон контакта"
                  },
                  "name": {
                    "type": "string",
                    "description": "Имя"
                  },
                  "lastname": {
                    "type": "string",
                    "description": "Фамилия"
                  },
                  "email": {
                    "type": "string",
                    "description": "E-mail"
                  },
                  "comment": {
                    "type": "string",
                    "description": "Комментарий (попадает в описание заявки)"
                  },
                  "funnel_id": {
                    "type": "string",
                    "description": "Воронка (по умолчанию — настройка канала api или воронка сети)"
                  },
                  "stage_id": {
                    "type": "string",
                    "description": "Рабочий этап воронки"
                  },
                  "manager_uid": {
                    "type": "integer",
                    "description": "Менеджер (сотрудник сети)"
                  },
                  "source": {
                    "type": "string",
                    "description": "Источник: id или имя из справочника; неизвестное имя создаёт источник"
                  },
                  "utm": {
                    "type": "object",
                    "description": "{source, medium, campaign, term, content}"
                  },
                  "channel_code": {
                    "type": "string",
                    "description": "Свой канал клуба: custom: из настроек «Точки входа»"
                  },
                  "link_code": {
                    "type": "string",
                    "description": "Код отслеживаемой ссылки или QR"
                  },
                  "ref": {
                    "type": "string",
                    "description": "Код «Приведи друга» из ссылки /r/<код>: в заявке — рекомендатель; известный клиент TRIDE закрепляется за ним"
                  },
                  "external": {
                    "type": "object",
                    "description": "{system, id, page_url, referrer, ip, user_agent}"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid посетителя (сохраняется в external.yclid)"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID посетителя (сохраняется в external.ym_client_id)"
                  },
                  "fields": {
                    "type": "object",
                    "description": "Клубные поля {fieldId: value}"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал сети (по умолчанию — клуб ключа)"
                  },
                  "club": {
                    "type": "string",
                    "description": "Филиал сети, откуда заявка (id клуба). Без него филиал — клуб ключа; ключ сети или общий ключ — по маршруту канала API"
                  }
                },
                "required": [
                  "key",
                  "phone"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "phone": "<телефон тестового клиента>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "lead_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "number": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "club_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Филиал, в который попала заявка (id группы — общая очередь сети)"
                        },
                        "duplicate": {
                          "type": "boolean",
                          "description": "Повтор по внешнему id или открытая заявка того же контакта"
                        },
                        "repeat": {
                          "type": "boolean",
                          "description": "Только у повтора (true): lead_id — открытая заявка; комментарий и метки повтора сохранены в её истории"
                        },
                        "client_uid": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "referral": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Только с ref: {result: attributed|rejected|lead|invalid|not_active|error, reason, gift}"
                        },
                        "skipped": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "channel_disabled — канал API выключен в настройках сети; channel_disabled_branch — выключен в филиале"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/referral.program": {
      "post": {
        "tags": [
          "Рекомендации"
        ],
        "operationId": "referral-program",
        "summary": "Получить условия программы рекомендаций",
        "description": "Условия действующей программы «Приведи друга» в клубе: что получает друг и пригласивший, шаги и тексты лендинга. active:false — программы нет или она выключена. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (программа действует на филиалы); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб программы",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "offer": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{friend — что получает друг, referrer — что получает пригласивший} — готовые фразы"
                        },
                        "steps": {
                          "type": "array",
                          "description": "Шаги «Как это работает»",
                          "items": {
                            "type": "string"
                          }
                        },
                        "terms": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Условия программы"
                        },
                        "landing": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{title, text} — заголовок и текст лендинга друга (или null)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "active": false
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/referral.resolve": {
      "post": {
        "tags": [
          "Рекомендации"
        ],
        "operationId": "referral-resolve",
        "summary": "Проверить реферальный код",
        "description": "Разбор кода из ссылки /r/<код>: кто пригласил (только имя), подарок другу, действует ли программа. Для своего лендинга на сайте. Код другой сети — valid:false. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (программа действует на филиалы); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "code": {
                    "type": "string",
                    "description": "Код приглашения (ANNA-7K2)"
                  }
                },
                "required": [
                  "key",
                  "code"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "code": "<код из предыдущего шага>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб программы",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "valid": {
                          "type": "boolean"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Программа сейчас действует"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "referrer": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{first_name, avatar} — без фамилии и контактов"
                        },
                        "offer": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{friend_text, valid_days, landing_title, landing_text} или null"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/referral.client.link": {
      "post": {
        "tags": [
          "Рекомендации"
        ],
        "operationId": "referral-client-link",
        "summary": "Получить ссылку участника программы",
        "description": "Код и ссылка «Приведи друга» клиента (создаёт код при первом вызове) — для личного кабинета на сайте. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (программа действует на филиалы); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб программы",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Ссылка /r/<код> на домене приложения клуба"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/referral.client.list": {
      "post": {
        "tags": [
          "Рекомендации"
        ],
        "operationId": "referral-client-list",
        "summary": "Получить рекомендации клиента",
        "description": "Приглашения клиента: друзья («Иван К.»), этапы и награда — без сумм покупок друзей. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (программа действует на филиалы); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Идентификатор клиента TRIDE"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента в любом написании"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Идентификатор клиента во внешней системе клуба"
                  },
                  "status": {
                    "type": "string",
                    "description": "Фильтр статуса: in_progress, converted…"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб программы",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "description": "Приглашения",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "friend_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "since_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "steps": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{registered, visited, purchased, rewarded}"
                              },
                              "reward": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "{text, status, date} или null"
                              }
                            }
                          }
                        },
                        "totals": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{joined, converted}"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/access.qr.verify": {
      "post": {
        "tags": [
          "Контроль доступа"
        ],
        "operationId": "access-qr-verify",
        "summary": "Проверить считанный QR-пропуск",
        "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/access/qr/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "qr_string": {
                    "type": "string"
                  },
                  "consume": {
                    "type": "boolean"
                  },
                  "checkin": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "key",
                  "qr_string"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "qr_string": "<строка со считывателя>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "format": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "client_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "user_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "external_client_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "firstname": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "lastname": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "membership_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "checkin": {
                          "type": "object",
                          "properties": {
                            "granted": {
                              "type": "boolean"
                            },
                            "reason": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "valid": false,
                  "reason": "access_disabled"
                }
              }
            }
          }
        }
      }
    },
    "/ex/call.incoming": {
      "post": {
        "tags": [
          "Звонки"
        ],
        "operationId": "call-incoming",
        "summary": "Принять событие начала звонка",
        "description": "Вебхук внешней АТС: начало входящего звонка клиенту. Дедупликация по external_call_id (повторные вызовы не дублируют запись). Сотрудник матчится по phone_from -> users.mainphone в пределах клуба. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_call_id": {
                    "type": "string",
                    "description": "Уникальный идентификатор звонка в АТС"
                  },
                  "phone_from": {
                    "type": "string",
                    "description": "Клубный номер, на который звонят (или с которого переводят)"
                  },
                  "phone_to": {
                    "type": "string",
                    "description": "Номер клиента"
                  },
                  "extension": {
                    "type": "string",
                    "description": "Добавочный внутренний номер клуба"
                  },
                  "direction": {
                    "type": "string",
                    "description": "Направление (по умолчанию incoming)"
                  }
                },
                "required": [
                  "key",
                  "external_call_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "external_call_id": "demo-call-001",
                "phone_from": "<номер звонящего>",
                "direction": "incoming"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID созданной коммуникации-звонка"
                        },
                        "deduplicated": {
                          "type": "boolean",
                          "description": "true, если запись уже существовала"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/call.finished": {
      "post": {
        "tags": [
          "Звонки"
        ],
        "operationId": "call-finished",
        "summary": "Принять результат звонка",
        "description": "Вебхук внешней АТС: завершение звонка. Обновляет существующую запись (по external_call_id) или создаёт завершённую, если события начала не было. result: answered (разговор состоялся) / completed / no_answer / busy / failed / canceled / canceled_by_client. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "external_call_id": {
                    "type": "string",
                    "description": "Уникальный идентификатор звонка в АТС"
                  },
                  "phone_from": {
                    "type": "string",
                    "description": "Клубный номер"
                  },
                  "phone_to": {
                    "type": "string",
                    "description": "Номер клиента"
                  },
                  "extension": {
                    "type": "string",
                    "description": "Добавочный внутренний номер клуба"
                  },
                  "direction": {
                    "type": "string",
                    "description": "Направление: incoming/outgoing"
                  },
                  "result": {
                    "type": "string",
                    "description": "Результат: answered / completed / no_answer / busy / failed / canceled / canceled_by_client"
                  },
                  "duration_sec": {
                    "type": "integer",
                    "description": "Длительность разговора в секундах"
                  },
                  "recording_url": {
                    "type": "string",
                    "description": "Ссылка на запись разговора"
                  },
                  "employee_uid": {
                    "type": "integer",
                    "description": "UID сотрудника (если АТС знает)"
                  }
                },
                "required": [
                  "key",
                  "external_call_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "external_call_id": "demo-call-001",
                "phone_from": "<номер звонящего>",
                "direction": "incoming",
                "result": "answered",
                "duration_sec": 60
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.sales": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-sales",
        "summary": "Выгрузка продаж",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "sale_number": {},
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "channel": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "initiator": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "items": {
                                "type": "array",
                                "items": {}
                              },
                              "total": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "discount": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "discounts_summary": {},
                              "paid": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "refunded": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "pay_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "refund_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "fulfillment_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "payment_method": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "paid_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "first_paid": {
                                "type": "boolean"
                              },
                              "entry_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_types": {
                                "type": "array",
                                "items": {}
                              },
                              "order_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "lead_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "utm": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "promo_code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.clients": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-clients",
        "summary": "Выгрузка клиентов",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "client_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "source": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "first_touch": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "home_club_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "has_app": {
                                "type": "boolean"
                              },
                              "has_active_membership": {
                                "type": "boolean"
                              },
                              "first_visit_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "last_visit_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "visits_total": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "ltv": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "referred_by_client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "possible_duplicate_of": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "phone": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Только с разрешением analytics.contacts."
                              },
                              "email": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Только с разрешением analytics.contacts."
                              },
                              "phone_sha256": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Только с разрешением analytics.contacts_hash."
                              },
                              "email_sha256": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Только с разрешением analytics.contacts_hash."
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.products": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-products",
        "summary": "Выгрузка продуктов",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "price": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "club_ids": {
                                "type": "array",
                                "items": {}
                              },
                              "category_ids": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.employees": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-employees",
        "summary": "Выгрузка сотрудников",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "employee_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "hired_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "dismissed_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.payments": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-payments",
        "summary": "Выгрузка платежей и возвратов",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "amount": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "fee": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "method": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provider": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reference_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reference_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "order_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sale_offer_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "cash_register_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "completed_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.memberships": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-memberships",
        "summary": "Выгрузка прав посещения",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "product_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "price": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "visits_total": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "visits_remaining": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "visits_used": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "purchased_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "starts_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "activated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "ends_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "cancelled_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "expired_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "frozen": {
                                "type": "boolean"
                              },
                              "freeze_count": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "frozen_days": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "sale": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.bookings": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-bookings",
        "summary": "Выгрузка записей",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>",
                "limit": 100
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "booking_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "service_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "session_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "start_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "end_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "booked_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "source": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "via": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "booked_by": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "membership_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "checked_in": {
                                "type": "boolean"
                              },
                              "price": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "cancellation": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.sessions": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-sessions",
        "summary": "Выгрузка занятий",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "service_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "start_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "duration_min": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "capacity": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "employee_ids": {
                                "type": "array",
                                "items": {}
                              },
                              "zone_ids": {
                                "type": "array",
                                "items": {}
                              },
                              "online": {
                                "type": "boolean"
                              },
                              "visibility": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.communications": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-communications",
        "summary": "Выгрузка коммуникаций",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "channel_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "direction": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "purpose": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "origin": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "notification_type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "category": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "employee_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "event_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sent_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "delivered_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "read_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "failed_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "error": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "call": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.leads": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-leads",
        "summary": "Выгрузка заявок",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "number": {},
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "funnel_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "stage_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "source_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "channel": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "entry_key": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "link_code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "utm": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "manager_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "budget": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "stage_entered_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "first_response_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "won": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "lost": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.referrals": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-referrals",
        "summary": "Выгрузка рекомендаций",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "program_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "referrer_client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "referee_client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "method": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "attributed": {
                                "type": "boolean"
                              },
                              "claimed_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "first_visit_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "converted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "closed_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.tasks": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-tasks",
        "summary": "Выгрузка задач",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "type_code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "result_code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "origin": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "priority": {},
                              "employee_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "lead_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "booking_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "membership_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "due_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "done_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.carts": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-carts",
        "summary": "Выгрузка корзин",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "order_number": {},
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "items": {
                                "type": "array",
                                "items": {}
                              },
                              "subtotal": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "discount": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "total": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "promo_codes": {
                                "type": "array",
                                "items": {}
                              },
                              "payment": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "fulfillment_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "sale_offer_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "gift": {
                                "type": "boolean"
                              },
                              "cancelled_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.bonuses": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-bonuses",
        "summary": "Выгрузка бонусных операций",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "updated_since": {
                    "type": "string",
                    "description": "ISO 8601: записи, изменённые начиная с этого момента"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "next_cursor предыдущей страницы"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Размер страницы, 1–1000 (по умолчанию 100)",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 100
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети ключа"
                  },
                  "city": {
                    "type": "string",
                    "description": "Город клубов (признак «Город» сети)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "club_id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "deleted_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "schema_version": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "kind": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "direction": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "amount": {
                                "$ref": "#/components/schemas/Money"
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "lots": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Курсор продолжения или null на последней странице."
                        },
                        "total": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Всего записей по условию (без курсора)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "items": [],
                  "next_cursor": null,
                  "total": 0
                }
              }
            }
          }
        }
      }
    },
    "/ex/analytics.metrics": {
      "post": {
        "tags": [
          "Данные для аналитики"
        ],
        "operationId": "analytics-metrics",
        "summary": "Выгрузка определений метрик",
        "description": "В поле key передайте отдельный ключ Data API с разрешением analytics. [Порядок подключения](/data/analytics/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "В поле key передайте отдельный ключ Data API с разрешением analytics."
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ Data API>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "items": {
                          "type": "array",
                          "description": "Метрики словаря",
                          "items": {
                            "type": "object"
                          }
                        },
                        "schema_version": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/restore.class": {
      "post": {
        "tags": [
          "Клубный EX"
        ],
        "operationId": "restore-class",
        "summary": "Восстановить занятие, отменённое интеграцией",
        "description": "Вернуть занятие, которое синхронизация сама отменила, когда оно снова появилось в расписании внешней системы. Отменённое сотрудником занятие не возвращается. Брони не восстанавливаются — их возвращает синхронизация записей. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/integrations/club-ex/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия в TRIDE"
                  }
                },
                "required": [
                  "key",
                  "session_id"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "restored": {
                          "type": "boolean",
                          "description": "true если занятие возвращено"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.rental.availability": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-rental-availability",
        "summary": "Проверить свободное время аренды",
        "description": "Свободное время аренды площадок (корты, залы, дорожки) на день — как раздел «Аренда» приложения и виджет аренды на сайте показывают гостю: старты с ценой и свободными площадками, закрытия площадок, видимые клиентам, и ссылка «забронировать» на каждую свободную площадку старта (приложение клуба: вход и оплата там). Цены — без скидки членства, скрыты, если клуб не показывает их гостям. Без опции «Аренда площадок» у клуба — rental_disabled. Отправьте ключ внешней системы клуба в поле key на своём сервере. [Порядок подключения](/site/storefront/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  },
                  "date": {
                    "type": "string",
                    "description": "Дата в часовом поясе филиала (YYYY-MM-DD)."
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Длительность аренды в минутах; по умолчанию — как в разделе клуба"
                  },
                  "service_id": {
                    "type": "string",
                    "description": "Только тариф аренды"
                  },
                  "group_id": {
                    "type": "string",
                    "description": "Только площадки группы"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "date": "2026-12-07"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "timezone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Таймзона клуба (IANA), в ней даты и время"
                        },
                        "app_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Корень веб-приложения клуба, из которого собраны ссылки"
                        },
                        "date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "День ответа (гггг-мм-дд)"
                        },
                        "duration": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Длительность в минутах"
                        },
                        "starts": {
                          "type": "array",
                          "description": "Свободные старты по времени",
                          "items": {
                            "type": "object",
                            "properties": {
                              "start": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ISO 8601 в таймзоне клуба"
                              },
                              "start_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "end": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "end_ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "peak": {
                                "type": "boolean",
                                "description": "Прайм-тайм"
                              },
                              "min_price": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Самая низкая цена старта или null"
                              },
                              "free_count": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Свободных площадок"
                              },
                              "total_count": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Площадок всего"
                              },
                              "spaces": {
                                "type": "array",
                                "description": "Свободные площадки старта",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "service_id": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Тариф аренды площадки"
                                    },
                                    "price": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Цена или null, если клуб не показывает цены гостям"
                                    },
                                    "booking_url": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Забронировать в приложении клуба"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "spaces": {
                          "type": "array",
                          "description": "Площадки тарифов ответа",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "group_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "blocks": {
                          "type": "array",
                          "description": "Закрытия площадок, видимые клиентам («Корт 4 — турнир»)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "space_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "end": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "closed_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Почему стартов нет: opens_at — день откроется позже, tariff_not_found, no_spaces и т. п."
                        },
                        "opens_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "closed_reason=opens_at: время открытия записи (ЧЧ:мм)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/public.shop.modifiers.list": {
      "post": {
        "tags": [
          "Витрина сайта"
        ],
        "operationId": "public-shop-modifiers-list",
        "summary": "Получить каталог дополнений",
        "description": "Список дополнений для витрины клуба. Передайте ключ клуба в поле key. [Счёт и дополнения](/site/checkout/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сети: обязателен для ключа группы клубов (филиал этой сети), для ключа клуба — необязателен (клуб той же сети)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык ответа: ru (по умолчанию), en, fr"
                  },
                  "image_size": {
                    "type": "string",
                    "description": "Размер картинок в url: sm (до 320 px), md (до 640 px, по умолчанию), lg (до 1280 px)"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб ответа",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "items": {
                          "type": "array",
                          "description": "template_id, name, description, type, action_kind, target_mode, source_system, effect, duration, price, currency, requires_membership, requires_approval, valid_from, valid_to, availability: {state: requires_client_check | unavailable, reason_codes}",
                          "items": {
                            "type": "object"
                          }
                        },
                        "early_renewal": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "При доступном досрочном продлении: action_kind, target_mode, requires_auth и URL выбора своей подписки в приложении"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/ex/sale.modifiers.list": {
      "post": {
        "tags": [
          "Счёт и дополнения"
        ],
        "operationId": "sale-modifiers-list",
        "summary": "Подобрать дополнения к покупке клиента",
        "description": "Доступные дополнения к покупке подтверждённого клиента. Передайте ключ клуба в поле key. [Счёт и дополнения](/site/checkout/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Отправьте ключ внешней системы клуба в поле key на своём сервере."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Филиал: для ключа группы обязателен (счёт принадлежит клубу); для ключа клуба — клуб той же сети"
                  },
                  "locale": {
                    "type": "string",
                    "description": "Язык: ru (по умолчанию), en, fr"
                  },
                  "client_id": {
                    "type": "integer",
                    "description": "Клиент TRIDE"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон клиента"
                  },
                  "external_client_id": {
                    "type": "string",
                    "description": "Клиент внешней CRM"
                  },
                  "membership_id": {
                    "type": "string",
                    "description": "Собственная покупка клиента в сети ключа"
                  }
                },
                "required": [
                  "key"
                ]
              },
              "example": {
                "key": "<ключ клуба>",
                "client_id": 1001
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "club": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Клуб счёта",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "group": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Сеть клубов или null",
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "club"
                        },
                        "client_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "membership_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "description": "template_id, name, description, type, action_kind, target_mode, price, currency, preview; checkout_order_id при незавершённой покупке в приложении",
                          "items": {
                            "type": "object"
                          }
                        },
                        "requires_membership": {
                          "type": "boolean",
                          "description": "Есть локальные предложения, для подбора нужно выбрать покупку"
                        },
                        "empty_state": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "null | no_offers | no_suitable_purchase | temporarily_unavailable"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.get": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-get",
        "summary": "Получить состояние занятия для записи",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор филиала."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия."
                  },
                  "link_key": {
                    "type": "string",
                    "description": "Ключ занятия по ссылке, если он выдан клубом."
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "canBook": {
                          "type": "boolean"
                        },
                        "canWaitlist": {
                          "type": "boolean"
                        },
                        "booked": {
                          "type": "boolean"
                        },
                        "canCancel": {
                          "type": "boolean"
                        },
                        "isFree": {
                          "type": "boolean"
                        },
                        "isPaid": {
                          "type": "boolean"
                        },
                        "seat_selection": {
                          "type": "object"
                        },
                        "occupancy": {
                          "type": "object"
                        },
                        "equipment": {
                          "type": "array",
                          "items": {}
                        },
                        "waitlist": {}
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.products.check": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-products-check",
        "summary": "Проверить подходящие покупки клиента",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор филиала."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия."
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "products": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.payment_options": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-payment-options",
        "summary": "Рассчитать варианты оплаты занятия",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "ID клуба"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "ID занятия"
                  },
                  "account_context": {
                    "type": "object",
                    "description": "Выбранная компания или семья и явная самостоятельная оплата"
                  },
                  "link_key": {
                    "type": "string",
                    "description": "Ключ ссылки занятия «по ссылке»"
                  },
                  "product_id": {
                    "type": "string",
                    "description": "Покупка клиента: режим доплаты за время продукта — surcharge и способы оплаты на доплату"
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "requirement": {},
                        "pay_methods": {},
                        "products": {
                          "type": "array",
                          "items": {}
                        },
                        "currency": {
                          "type": "string"
                        },
                        "session_price": {},
                        "account_options": {},
                        "purchase_locked": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.book": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-book",
        "summary": "Записаться на занятие",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "account_context": {
                    "type": "object",
                    "description": "Выбранная компания или семья и явная самостоятельная оплата"
                  },
                  "expected_total": {
                    "type": "string",
                    "description": "Подтверждённая сумма оплаты клиентом"
                  },
                  "expected_sponsor_amount": {
                    "type": "string",
                    "description": "Подтверждённая доля компании или семьи"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор филиала."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия."
                  },
                  "link_key": {
                    "type": "string",
                    "description": "Ключ занятия по ссылке, если он выдан клубом."
                  },
                  "equipment_id": {
                    "type": "string",
                    "description": "Выбранное свободное место."
                  },
                  "product_id": {
                    "type": "string",
                    "description": "Идентификатор покупки клиента."
                  },
                  "payment_method": {
                    "type": "string",
                    "description": "Доступный способ из расчёта оплаты."
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001",
                "product_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "confirmed": {
                          "type": "boolean"
                        },
                        "booking_id": {
                          "type": "string"
                        },
                        "waitlisted": {
                          "type": "boolean"
                        },
                        "position": {
                          "type": "integer"
                        },
                        "redirect_url": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.cancel": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-cancel",
        "summary": "Отменить запись или выйти из очереди",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор филиала."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Идентификатор занятия."
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.participants": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-participants",
        "summary": "Получить видимый список участников",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "session_id": {
                    "type": "string",
                    "description": "ID занятия в расписании"
                  }
                },
                "required": [
                  "access_token",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "participants": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.my.upcoming": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-my-upcoming",
        "summary": "Получить свои предстоящие записи",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Максимальное количество бронирований"
                  },
                  "club_id": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "description": "club | network (по умолчанию сеть клуба)"
                  },
                  "with_waitlist": {
                    "type": "boolean",
                    "description": "Включить брони листа ожидания (status waitlisted, waitlist_position)"
                  }
                },
                "required": [
                  "access_token"
                ]
              },
              "example": {
                "access_token": "<токен клиента>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.waitlist.confirm": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-waitlist-confirm",
        "summary": "Принять предложенное место",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "ID клуба"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "ID занятия"
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "booking_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "confirmed": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.waitlist.decline": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-waitlist-decline",
        "summary": "Отказаться от предложенного места",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "ID клуба"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "ID занятия"
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "session_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "session_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "declined": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/purchases.make": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-purchases-make",
        "summary": "Оформить покупку клиента",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "account_context": {
                    "type": "object",
                    "description": "Выбранная компания или семья: account_id, self_pay"
                  },
                  "expected_sponsor_amount": {
                    "type": "string",
                    "description": "Подтверждённая доля компании или семьи"
                  },
                  "modifier_order_id": {
                    "type": "string",
                    "description": "Подготовленный заказ модификатора этого клиента"
                  },
                  "expected_modifier_quotes": {
                    "type": "array",
                    "description": "Показанные расчёты: [{item_id, quote_id}]",
                    "items": {
                      "type": "object"
                    }
                  },
                  "expected_total": {
                    "type": "string",
                    "description": "Сумма, которую клиент видел в расшифровке; расходится с расчётом — price_changed и новая расшифровка"
                  },
                  "payment_plan": {
                    "type": "string",
                    "description": "installment — рассрочка по плану продукта (первый взнос)"
                  },
                  "modifier_template_id": {
                    "type": "string",
                    "description": "Улучшение к своей покупке (шаблон с продажей клиенту) — вместе с membership_id"
                  },
                  "membership_id": {
                    "type": "string",
                    "description": "Покупка клиента, к которой берётся улучшение"
                  },
                  "attribution": {
                    "type": "object",
                    "description": "Источник покупки и метки: {utm: {source, medium, campaign, term, content}, yclid, ym_client_id, referrer, landing_url}; source сервер определяет сам по сессии (сайт клуба / приложение / бот)"
                  },
                  "utm": {
                    "type": "object",
                    "description": "Метки посетителя — то же, что attribution.utm"
                  },
                  "yclid": {
                    "type": "string",
                    "description": "Яндекс Директ: yclid — то же, что attribution.yclid"
                  },
                  "ym_client_id": {
                    "type": "string",
                    "description": "Яндекс Метрика: ClientID — то же, что attribution.ym_client_id"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор клуба"
                  },
                  "product_id": {
                    "type": "string",
                    "description": "Идентификатор продукта (абонемент/пакет); для товаров — items"
                  },
                  "items": {
                    "type": "array",
                    "description": "Товары витрины: [{product_id, variant_id, quantity}] — один заказ, один платёж",
                    "items": {
                      "type": "object"
                    }
                  },
                  "payment_display": {
                    "type": "string",
                    "description": "Как открыть оплату (виджет/страница)"
                  },
                  "via": {
                    "type": "string",
                    "description": "Канал покупки: bot — из меню бота клуба"
                  },
                  "via_channel": {
                    "type": "string",
                    "description": "Мессенджер бота: telegram | max"
                  },
                  "payment_method_id": {
                    "type": "string",
                    "description": "Оплатить сохранённой картой клиента этого клуба"
                  },
                  "save_card": {
                    "type": "boolean",
                    "description": "Сохранить новую карту для следующих оплат"
                  },
                  "card_consent": {
                    "type": "boolean",
                    "description": "Клиент дал согласие на сохранение карты (у подписки — обязательно, иначе consent_required)"
                  },
                  "referer": {
                    "type": "string",
                    "description": "URL для возврата после оплаты"
                  },
                  "return_url": {
                    "type": "string",
                    "description": "Сайт клуба: куда увести клиента после УСПЕШНОЙ оплаты (только адрес из «Адресов сайта» клуба, иначе wrong_return_url). Провайдер вернёт на /payreturn домена клуба, страница проверит оплату и уведёт сюда; в мобильном приложении редиректа нет. Заменяет referer"
                  },
                  "promo_code": {
                    "type": "string",
                    "description": "Код промокода (опционально)"
                  },
                  "certificate_code": {
                    "type": "string",
                    "description": "Код подарочного сертификата GIFT-XXXX-XXXX: зачёт в счёт покупки (опционально)"
                  },
                  "use_bonuses": {
                    "type": "boolean",
                    "description": "Оплатить часть бонусами клиента (по правилам продукта и клуба, bonus.quote)"
                  },
                  "bonus_amount": {
                    "type": "string",
                    "description": "Сколько бонусов списать (не больше max_total bonus.quote); без значения — максимум"
                  },
                  "gift": {
                    "type": "object",
                    "description": "Подарок (опционально): {recipientName, recipientEmail, senderName?, senderEmail?} или то же в snake_case (recipient_name, …). Без имени или email получателя — gift_recipient_required"
                  },
                  "network_access": {
                    "type": "object",
                    "description": "Сети клубов: {allowed_club_ids} — клубы со-доступа для продукта «домашний + N»"
                  }
                },
                "required": [
                  "access_token",
                  "club_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "product_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean",
                          "description": "Успешность операции"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "URL для оплаты"
                        },
                        "order_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID заказа"
                        },
                        "external": {
                          "type": "boolean",
                          "description": "Внешняя оплата"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/purchases.check_external_status": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-purchases-check-external-status",
        "summary": "Проверить покупку у внешнего провайдера",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор клуба"
                  },
                  "order_id": {
                    "type": "string",
                    "description": "Идентификатор заказа (опционально)"
                  }
                },
                "required": [
                  "access_token",
                  "club_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean",
                          "description": "Успешность операции"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус: purchased, pending, unknown (внешняя система не ответила), cancelled, no_integration. Чужой заказ — error wrong_order"
                        },
                        "has_new_purchase": {
                          "type": "boolean",
                          "description": "Есть ли новая покупка"
                        },
                        "payment_status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус оплаты модификатора независимо от применения"
                        },
                        "operation": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Состояние операции модификатора"
                        },
                        "purchase": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Информация о покупке"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/certificates.get": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "club-certificates-get",
        "summary": "Открыть свой подарочный сертификат",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "id": {
                    "type": "string",
                    "description": "Сертификат"
                  }
                },
                "required": [
                  "access_token",
                  "id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "qr_code_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "QR как data-URL (для показа/скачивания)"
                        },
                        "usage": {
                          "type": "array",
                          "description": "used_at, amount_used, description, order_number",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/certificates.my": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "club-certificates-my",
        "summary": "Получить свои сертификаты",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб экрана: только сертификаты, действующие в его сети"
                  }
                },
                "required": [
                  "access_token"
                ]
              },
              "example": {
                "access_token": "<токен клиента>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "description": "id, code, type monetary|service|package|membership, status, external (внешней системы), value (номинал/остаток/состав), from_name, role purchased|received, expires_at, activated, usage_count, works_in[club_id], share_link (покупателю: ссылка для пересылки, если доставка была по SMS)",
                          "items": {
                            "type": "object"
                          }
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/certificates.activate": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "club-certificates-activate",
        "summary": "Активировать полученный подарок",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "code": {
                    "type": "string",
                    "description": "Код сертификата GIFT-XXXX-XXXX"
                  },
                  "token": {
                    "type": "string",
                    "description": "Токен активации из письма (необязательно при вводе кода)"
                  },
                  "pin": {
                    "type": "string",
                    "description": "PIN сертификата внешней системы (уходит только в их API)"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб экрана: обязателен для PIN-активации внешней системы и для активации сотрудником"
                  }
                },
                "required": [
                  "access_token",
                  "code"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "code": "<код из предыдущего шага>",
                "club_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "certificate_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "activated": {
                          "type": "boolean"
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "value": {
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/certificates.check": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "club-certificates-check",
        "summary": "Проверить применимость сертификата",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "code": {
                    "type": "string",
                    "description": "Код сертификата"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб покупки — сертификат должен действовать в нём"
                  }
                },
                "required": [
                  "access_token",
                  "code"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "code": "<код из предыдущего шага>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Почему не действителен"
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "available_amount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Денежный: сколько можно зачесть сейчас (остаток минус резервы открытых заказов)"
                        },
                        "value": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Номинал/остаток"
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "external": {
                          "type": "boolean",
                          "description": "Сертификат внешней системы"
                        },
                        "works_in": {
                          "type": "array",
                          "description": "Клубы/сеть, где действует: club_id",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/certificates.redeem": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "club-certificates-redeem",
        "summary": "Обменять подарок на продукт",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "id": {
                    "type": "string",
                    "description": "Свой сертификат (клиент)"
                  },
                  "code": {
                    "type": "string",
                    "description": "Код (сотрудник): погашение за клиента с usage {reason, amount?|service_id?}"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб сотрудника (погашение по коду)"
                  }
                },
                "required": [
                  "access_token"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "certificate_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Статус после выдачи (used/partially_used)"
                        },
                        "membership_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Созданное членство (для membership-типа)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/certificates.resend": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "club-certificates-resend",
        "summary": "Повторить отправку сертификата",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "id": {
                    "type": "string",
                    "description": "Свой сертификат"
                  }
                },
                "required": [
                  "access_token",
                  "id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "sent": {
                          "type": "boolean",
                          "description": "Письмо/сообщение ушло"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Почему не ушло (skipped)"
                        },
                        "share_link": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Ссылка для пересылки получателю (доставка была по SMS)"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/sale.offer.pay": {
      "post": {
        "tags": [
          "Оплата по ссылке"
        ],
        "operationId": "club-sale-offer-pay",
        "summary": "Оплатить счёт по ссылке",
        "description": "Контекст счёта задаёт token платёжной ссылки. Для действий, требующих входа, передайте также токен клиента. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_modifier_quotes": {
                    "type": "array",
                    "description": "Подтверждённые расчёты всех модификаторов заказа: [{item_id, quote_id}]",
                    "items": {
                      "type": "object"
                    }
                  },
                  "access_token": {
                    "type": "string",
                    "description": "Токен клиента для персональных способов оплаты."
                  },
                  "token": {
                    "type": "string"
                  },
                  "expected_total": {
                    "type": "string",
                    "description": "Сумма, которую клиент видел в расшифровке; расходится с расчётом — price_changed и новая расшифровка"
                  },
                  "method": {
                    "type": "string",
                    "description": "card | sbp; любое другое значение оплачивается картой"
                  },
                  "return_url": {
                    "type": "string"
                  },
                  "payment_method_id": {
                    "type": "string",
                    "description": "Оплатить сохранённой картой клиента этого клуба"
                  },
                  "save_card": {
                    "type": "boolean",
                    "description": "Сохранить новую карту для следующих оплат"
                  },
                  "card_consent": {
                    "type": "boolean",
                    "description": "Клиент дал согласие на сохранение карты (у подписки — обязательно, иначе consent_required)"
                  },
                  "certificate_code": {
                    "type": "string",
                    "description": "Код подарочного сертификата: зачёт в счёт покупки. Не передан — зачёт счёта остаётся как есть (сертификат, применённый сотрудником); пустая строка — снять сертификат"
                  },
                  "use_bonuses": {
                    "type": "boolean",
                    "description": "Оплатить часть бонусами клиента (по правилам продукта и клуба, bonus.quote)"
                  },
                  "bonus_amount": {
                    "type": "string",
                    "description": "Сколько бонусов списать (не больше max_total bonus.quote); без значения — максимум"
                  }
                },
                "required": [
                  "token"
                ]
              },
              "example": {
                "token": "<токен>",
                "method": "card"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "widget": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Параметры виджета CloudPayments"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Ссылка на страницу оплаты"
                        },
                        "paid": {
                          "type": "boolean"
                        },
                        "order_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "external": {
                          "type": "boolean",
                          "description": "true — url ведёт на страницу внешней системы клуба; статус — purchases.check_external_status"
                        },
                        "external_system": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "psport | onec при external"
                        },
                        "self_pay_offer": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "При отказе в финансировании доступен расчёт sale.offer.self_pay"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/goods.cart.preview": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-goods-cart-preview",
        "summary": "Пересчитать состав корзины",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "account_context": {
                    "type": "object",
                    "description": "Выбранная компания или семья: account_id, self_pay"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Клуб витрины"
                  },
                  "items": {
                    "type": "array",
                    "description": "Корзина: [{product_id, variant_id, quantity}], не больше 30 строк",
                    "items": {
                      "type": "object"
                    }
                  },
                  "promo_code": {
                    "type": "string",
                    "description": "Промокод (необязательно)"
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "items"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "items": [
                  {
                    "product_id": "000000000000000000000002",
                    "quantity": 1
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "lines": {
                          "type": "array",
                          "description": "Строки: product_id, variant_id, quantity, unit_price, price_kind, total, name, variant_value, fileid",
                          "items": {
                            "type": "object"
                          }
                        },
                        "removed": {
                          "type": "array",
                          "description": "Убранные строки: product_id, variant_id, reason (out_of_stock|locked|hidden|not_purchasable|variant_required|quantity_reduced), quantity_max",
                          "items": {
                            "type": "object"
                          }
                        },
                        "subtotal": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Сумма строк"
                        },
                        "promo": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Промокод: valid, code, discount_amount, reason_code"
                        },
                        "total": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Итого к оплате"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/promocodes.has_active": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-promocodes-has-active",
        "summary": "Проверить наличие акций в клубе",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор клуба"
                  }
                },
                "required": [
                  "access_token",
                  "club_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "has_active_promocodes": {
                          "type": "boolean",
                          "description": "Есть ли активные промокоды"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/promocodes.validate": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-promocodes-validate",
        "summary": "Проверить промокод для суммы корзины",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "code": {
                    "type": "string",
                    "description": "Код промокода"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор клуба"
                  },
                  "cart_amount": {
                    "type": "string",
                    "description": "Сумма корзины (для проверки минимума)"
                  },
                  "product_types": {
                    "type": "array",
                    "description": "Типы продуктов в корзине",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "access_token",
                  "code",
                  "club_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "code": "<код из предыдущего шага>",
                "club_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean",
                          "description": "Валиден ли промокод"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Причина невалидности"
                        },
                        "promo_code": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Данные промокода"
                        },
                        "discount": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Рассчитанная скидка"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/leads.form.get": {
      "post": {
        "tags": [
          "Формы сайта"
        ],
        "operationId": "club-leads-form-get",
        "summary": "Получить настройки публичной формы",
        "description": "Передайте публичный token из настроек формы. [Порядок подключения](/widgets/leads/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ]
              },
              "example": {
                "token": "<токен>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "form": {
                          "type": "object",
                          "properties": {
                            "name": {},
                            "fields": {
                              "type": "array",
                              "items": {}
                            },
                            "consent_text": {
                              "type": "string"
                            },
                            "consent_source": {
                              "type": "string"
                            },
                            "success_text": {
                              "type": "string"
                            },
                            "redirect_url": {
                              "type": "string"
                            },
                            "theme": {
                              "type": "object"
                            },
                            "clubs": {
                              "type": "array",
                              "items": {}
                            },
                            "captcha": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/leads.form.submit": {
      "post": {
        "tags": [
          "Формы сайта"
        ],
        "operationId": "club-leads-form-submit",
        "summary": "Отправить обращение посетителя",
        "description": "Передайте публичный token из настроек формы. [Порядок подключения](/widgets/leads/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "object",
                    "description": "{name, phone, email, comment, ...}"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Выбранный клуб сети (если у формы клуб не задан)"
                  },
                  "captcha_token": {
                    "type": "string"
                  },
                  "request_consent": {
                    "type": "object",
                    "description": "Решение по предъявленной редакции этой формы"
                  },
                  "page": {
                    "type": "object",
                    "description": "{url, referrer, utm, tl, source}"
                  },
                  "hp": {
                    "type": "string",
                    "description": "Скрытое поле-ловушка: непустое → отправка игнорируется"
                  }
                },
                "required": [
                  "token",
                  "fields"
                ]
              },
              "example": {
                "token": "<токен>",
                "fields": {
                  "phone": "<телефон тестового клиента>"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "redirect_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "field": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Ключ поля при field_required"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true,
                  "message": "Заявка принята",
                  "redirect_url": ""
                }
              }
            }
          },
          "429": {
            "description": "Ограничение частоты запросов. Повторите после указанной задержки.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": "rate_limited",
                  "retry_after": 15
                }
              }
            }
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "tags": [
          "OAuth"
        ],
        "operationId": "oauth-token",
        "summary": "Обменять OAuth-код или обновить токены",
        "description": "Условия доступа описаны в руководстве по OAuth. [Порядок подключения](/auth/oauth/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "description": "Тип grant (authorization_code или refresh_token)"
                  },
                  "code": {
                    "type": "string",
                    "description": "Authorization code (для grant_type=authorization_code)"
                  },
                  "refresh_token": {
                    "type": "string",
                    "description": "Refresh token (для grant_type=refresh_token)"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Идентификатор OAuth приложения"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Секрет OAuth приложения"
                  },
                  "redirect_uri": {
                    "type": "string",
                    "description": "Redirect URI (для grant_type=authorization_code)"
                  }
                },
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ]
              },
              "example": {
                "grant_type": "authorization_code",
                "client_id": "<идентификатор OAuth-приложения>",
                "client_secret": "<секрет приложения>",
                "code": "<код авторизации>",
                "redirect_uri": "https://service.example.com/callback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "access_token": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "token_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expires_in": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "refresh_token": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "scope": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "result": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oauth/userinfo": {
      "post": {
        "tags": [
          "OAuth"
        ],
        "operationId": "oauth-userinfo",
        "summary": "Получить профиль по OAuth-токену",
        "description": "Условия доступа описаны в руководстве по OAuth. [Порядок подключения](/auth/oauth/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Access token (альтернатива Authorization header)"
                  }
                },
                "required": [
                  "access_token"
                ]
              },
              "example": {
                "access_token": "<токен OAuth>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "sub": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID пользователя"
                        },
                        "firstname": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "lastname": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "nickname": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatar": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "result": {
                          "type": "boolean"
                        },
                        "gender": {},
                        "age": {}
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oauth/revoke": {
      "post": {
        "tags": [
          "OAuth"
        ],
        "operationId": "oauth-revoke",
        "summary": "Отозвать OAuth-токен",
        "description": "Условия доступа описаны в руководстве по OAuth. [Порядок подключения](/auth/oauth/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Токен для отзыва"
                  },
                  "token_type_hint": {
                    "type": "string",
                    "description": "Тип токена (access_token или refresh_token)"
                  }
                },
                "required": [
                  "token"
                ]
              },
              "example": {
                "token": "<отзываемый токен>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                },
                "example": {
                  "result": true
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.session.check_payment": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-session-check-payment",
        "summary": "Подтвердить оплату разового занятия",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "invoice_id": {
                    "type": "string",
                    "description": "ID invoice"
                  },
                  "booking_id": {
                    "type": "string",
                    "description": "ID бронирования"
                  }
                },
                "required": [
                  "access_token",
                  "invoice_id",
                  "booking_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "invoice_id": "000000000000000000000001",
                "booking_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "already_confirmed": {
                          "type": "boolean"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/bookings.payment.check-status": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-bookings-payment-check-status",
        "summary": "Узнать статус платежа по брони",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "booking_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "access_token",
                  "booking_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "booking_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "verdict": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "paid | pending | failed | unknown"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "source": {},
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Состояние у платёжного провайдера."
                        },
                        "checked_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/purchases.list": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-purchases-list",
        "summary": "Показать покупки в аккаунте",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор клуба"
                  },
                  "past": {
                    "type": "boolean",
                    "description": "Архив: истёкшие и отменённые"
                  },
                  "session_id": {
                    "type": "string",
                    "description": "Оставить только покрывающие занятие"
                  },
                  "scope": {
                    "type": "string",
                    "description": "club — только текущий клуб, network (по умолчанию) — вся сеть"
                  }
                },
                "required": [
                  "access_token",
                  "club_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "description": "Покупки: id, name, state, sessions_left/amount, minutes_left/amount, days_left, expire, type single|recurrent, club_id, club_name, next_payment_at, next_payment_amount, is_unlimited, autopay {enabled, method {id, brand, last4, status}|null, next_payment_ts, amount, managed_by tride|external}|null; Если действие доступно: can_freeze, freeze_cost, can_activate, upgrades [{product_id, name, type}], renew_product_id (shop.buy_again)",
                          "items": {
                            "type": "object"
                          }
                        },
                        "past": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Сколько покупок в архиве"
                        },
                        "goods": {
                          "type": "array",
                          "description": "Товары клиента: статус, код и QR самовывоза",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/club/promocodes.check": {
      "post": {
        "tags": [
          "Запись и покупки клиента"
        ],
        "operationId": "club-promocodes-check",
        "summary": "Рассчитать скидку для продукта",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/booking/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "account_context": {
                    "type": "object",
                    "description": "Выбранная компания или семья: account_id, self_pay"
                  },
                  "club_id": {
                    "type": "string",
                    "description": "Идентификатор клуба"
                  },
                  "code": {
                    "type": "string",
                    "description": "Код промокода"
                  },
                  "product_id": {
                    "type": "string",
                    "description": "Идентификатор продукта"
                  }
                },
                "required": [
                  "access_token",
                  "club_id",
                  "code",
                  "product_id"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "club_id": "000000000000000000000001",
                "code": "<код из предыдущего шага>",
                "product_id": "000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean",
                          "description": "Валиден ли промокод"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Причина невалидности"
                        },
                        "discount": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Информация о скидке"
                        },
                        "promo_code": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Данные промокода для отображения"
                        },
                        "breakdown": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Расшифровка цены продукта с автоскидкой и промокодом (PriceBreakdown)"
                        },
                        "total": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "К оплате по расшифровке"
                        },
                        "promo": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "{status: applied|rejected, reason} — применится ли код при оплате"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/orders/certificate.apply": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "orders-certificate-apply",
        "summary": "Применить сертификат к заказу",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "order_id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string",
                    "description": "Код сертификата GIFT-XXXX-XXXX"
                  }
                },
                "required": [
                  "access_token",
                  "order_id",
                  "code"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "order_id": "000000000000000000000001",
                "code": "<код из предыдущего шага>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "discount_amount": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Зачтено сертификатом"
                        },
                        "new_total": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Новый итог заказа"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/orders/certificate.remove": {
      "post": {
        "tags": [
          "Подарочные сертификаты"
        ],
        "operationId": "orders-certificate-remove",
        "summary": "Убрать сертификат из заказа",
        "description": "Вызывайте от имени вошедшего клиента: в JSON нужен access_token его клиентской сессии. [Порядок подключения](/site/certificates/).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "Токен вошедшего клиента."
                  },
                  "order_id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string",
                    "description": "Код применённого сертификата"
                  }
                },
                "required": [
                  "access_token",
                  "order_id",
                  "code"
                ]
              },
              "example": {
                "access_token": "<токен клиента>",
                "order_id": "000000000000000000000001",
                "code": "<код из предыдущего шага>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "boolean"
                        },
                        "new_total": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/oauth/scopes": {
      "post": {
        "tags": [
          "OAuth"
        ],
        "operationId": "oauth-scopes",
        "summary": "Получить перечень разрешений OAuth",
        "description": "Условия доступа описаны в руководстве по OAuth. [Порядок подключения](/auth/oauth/).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "При ошибке сервер возвращает поле error.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Код или текст ошибки."
          },
          "field": {
            "type": "string",
            "description": "Параметр запроса, если сервер указал его."
          },
          "retry_after": {
            "type": "integer",
            "description": "Задержка до следующей попытки в секундах."
          }
        }
      },
      "Money": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "amount_minor": {
            "type": "integer",
            "description": "Сумма в минимальных единицах валюты."
          },
          "currency": {
            "type": "string",
            "description": "Код валюты."
          }
        },
        "required": [
          "amount_minor",
          "currency"
        ]
      }
    }
  }
}
