{
  "openapi": "3.1.0",
  "info": {
    "title": "YFG ID Public API",
    "version": "1.1.0",
    "description": "Публичный каталог мероприятий и мастеров, данные пользователя и инкрементальная синхронизация. Аутентификация: Bearer (пользователь) или HTTP Basic (конфиденциальное приложение) для каталога. Полная документация: https://yfg.su/id/docs",
    "contact": {
      "name": "YFG",
      "url": "https://yfg.su"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://yfg.su/id",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Discovery"
    },
    {
      "name": "Events"
    },
    {
      "name": "Masters"
    },
    {
      "name": "Me"
    }
  ],
  "paths": {
    "/api": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Метаданные публичного API",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Версия, scopes, ссылки, лимиты",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Нет авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "OpenAPI 3.1 спецификация",
        "responses": {
          "200": {
            "description": "Спецификация",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          }
        }
      }
    },
    "/api/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Список мероприятий",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Поиск по названию/описанию/месту"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Подстрока места проведения"
          },
          {
            "name": "when",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "upcoming",
                "past",
                "all"
              ],
              "default": "upcoming"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "published"
            },
            "description": "published, completed, cancelled, all или список через запятую"
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Московские сутки, включительно"
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Московские сутки, включительно"
          },
          {
            "name": "price_min",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "price_max",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Только изменённые после момента (для инкрементальной синхронизации)"
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "price",
                "title",
                "views",
                "sales",
                "updated"
              ],
              "default": "date"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Страница мероприятий",
            "headers": {
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Page": {
                "$ref": "#/components/headers/X-Page"
              },
              "X-Per-Page": {
                "$ref": "#/components/headers/X-Per-Page"
              },
              "X-Total-Pages": {
                "$ref": "#/components/headers/X-Total-Pages"
              },
              "Link": {
                "$ref": "#/components/headers/Link"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "304": {
            "description": "ETag совпал"
          },
          "400": {
            "description": "Некорректные параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нет авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{event_id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Мероприятие с типами билетов и признаком отмены",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Мероприятие",
            "headers": {
              "X-API-Version": {
                "description": "Версия API",
                "schema": {
                  "type": "string",
                  "example": "1"
                }
              },
              "X-Request-Id": {
                "description": "Идентификатор запроса для поддержки",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Лимит запросов в окне",
                "schema": {
                  "type": "integer",
                  "example": 240
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Остаток запросов в окне",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix time сброса окна",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Window": {
                "description": "Длина окна в секундах",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-Total-Count": {
                "description": "Всего записей",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "Текущая страница",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Размер страницы",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Всего страниц",
                "schema": {
                  "type": "integer"
                }
              },
              "Link": {
                "description": "RFC 8288 ссылки first/prev/next/last",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Версия представления для If-None-Match",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventDetail"
                }
              }
            }
          },
          "304": {
            "description": "ETag совпал"
          },
          "404": {
            "description": "Не найдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нет авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{event_id}/availability": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Быстрая проверка наличия билетов",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Наличие по типам",
            "headers": {
              "X-API-Version": {
                "description": "Версия API",
                "schema": {
                  "type": "string",
                  "example": "1"
                }
              },
              "X-Request-Id": {
                "description": "Идентификатор запроса для поддержки",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Лимит запросов в окне",
                "schema": {
                  "type": "integer",
                  "example": 240
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Остаток запросов в окне",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix time сброса окна",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Window": {
                "description": "Длина окна в секундах",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-Total-Count": {
                "description": "Всего записей",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "Текущая страница",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Размер страницы",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Всего страниц",
                "schema": {
                  "type": "integer"
                }
              },
              "Link": {
                "description": "RFC 8288 ссылки first/prev/next/last",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Версия представления для If-None-Match",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          },
          "404": {
            "description": "Не найдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нет авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/masters": {
      "get": {
        "tags": [
          "Masters"
        ],
        "summary": "Список мастеров",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialization",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            }
          },
          {
            "name": "verified",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            }
          },
          {
            "name": "price_min",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "price_max",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "rating",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 5
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "rating",
                "reviews",
                "orders",
                "price",
                "created",
                "name",
                "updated"
              ],
              "default": "rating"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Страница мастеров",
            "headers": {
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Page": {
                "$ref": "#/components/headers/X-Page"
              },
              "X-Per-Page": {
                "$ref": "#/components/headers/X-Per-Page"
              },
              "X-Total-Pages": {
                "$ref": "#/components/headers/X-Total-Pages"
              },
              "Link": {
                "$ref": "#/components/headers/Link"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MasterList"
                }
              }
            }
          },
          "304": {
            "description": "ETag совпал"
          },
          "400": {
            "description": "Некорректные параметры",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нет авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/masters/{master_id}": {
      "get": {
        "tags": [
          "Masters"
        ],
        "summary": "Профиль мастера с услугами и слотами",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "master_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Мастер",
            "headers": {
              "X-API-Version": {
                "description": "Версия API",
                "schema": {
                  "type": "string",
                  "example": "1"
                }
              },
              "X-Request-Id": {
                "description": "Идентификатор запроса для поддержки",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Лимит запросов в окне",
                "schema": {
                  "type": "integer",
                  "example": 240
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Остаток запросов в окне",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix time сброса окна",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Window": {
                "description": "Длина окна в секундах",
                "schema": {
                  "type": "integer",
                  "example": 600
                }
              },
              "X-Total-Count": {
                "description": "Всего записей",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "Текущая страница",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Размер страницы",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Всего страниц",
                "schema": {
                  "type": "integer"
                }
              },
              "Link": {
                "description": "RFC 8288 ссылки first/prev/next/last",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Версия представления для If-None-Match",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MasterDetail"
                }
              }
            }
          },
          "304": {
            "description": "ETag совпал"
          },
          "404": {
            "description": "Не найдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нет авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/tickets": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Билеты пользователя",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Страница данных",
            "headers": {
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Page": {
                "$ref": "#/components/headers/X-Page"
              },
              "X-Per-Page": {
                "$ref": "#/components/headers/X-Per-Page"
              },
              "X-Total-Pages": {
                "$ref": "#/components/headers/X-Total-Pages"
              },
              "Link": {
                "$ref": "#/components/headers/Link"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketList"
                }
              }
            }
          },
          "400": {
            "description": "Некорректная пагинация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нужен Bearer-токен пользователя",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав: tickets:list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/master": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Анкета мастера пользователя",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Анкета мастера или null",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeMaster"
                }
              }
            }
          },
          "400": {
            "description": "Некорректная пагинация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нужен Bearer-токен пользователя",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав: masters:read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/orders": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Заказы пользователя",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Страница данных",
            "headers": {
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Page": {
                "$ref": "#/components/headers/X-Page"
              },
              "X-Per-Page": {
                "$ref": "#/components/headers/X-Per-Page"
              },
              "X-Total-Pages": {
                "$ref": "#/components/headers/X-Total-Pages"
              },
              "Link": {
                "$ref": "#/components/headers/Link"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketList"
                }
              }
            }
          },
          "400": {
            "description": "Некорректная пагинация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нужен Bearer-токен пользователя",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав: orders:read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/waitlist": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Лист ожидания пользователя",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Страница данных",
            "headers": {
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Page": {
                "$ref": "#/components/headers/X-Page"
              },
              "X-Per-Page": {
                "$ref": "#/components/headers/X-Per-Page"
              },
              "X-Total-Pages": {
                "$ref": "#/components/headers/X-Total-Pages"
              },
              "Link": {
                "$ref": "#/components/headers/Link"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketList"
                }
              }
            }
          },
          "400": {
            "description": "Некорректная пагинация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нужен Bearer-токен пользователя",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав: waitlist:read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/resales": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Перепродажи пользователя",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Страница данных",
            "headers": {
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Page": {
                "$ref": "#/components/headers/X-Page"
              },
              "X-Per-Page": {
                "$ref": "#/components/headers/X-Per-Page"
              },
              "X-Total-Pages": {
                "$ref": "#/components/headers/X-Total-Pages"
              },
              "Link": {
                "$ref": "#/components/headers/Link"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/X-RateLimit-Window"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketList"
                }
              }
            }
          },
          "400": {
            "description": "Некорректная пагинация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Нужен Bearer-токен пользователя",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав: resale:read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Слишком много запросов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth 2.0 access token"
      },
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "client_id:client_secret конфиденциального приложения (только каталог)"
      },
      "oauth2ClientCredentials": {
        "type": "oauth2",
        "description": "Машинный токен для публичного каталога: POST /id/token, grant_type=client_credentials. Только конфиденциальные клиенты и scopes events:read/masters:read.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://yfg.su/id/token",
            "scopes": {
              "events:read": "Список и карточки мероприятий, остатки по типам билетов",
              "masters:read": "Каталог мастеров, услуги, портфолио, слоты"
            }
          }
        }
      }
    },
    "headers": {
      "X-API-Version": {
        "description": "Версия API",
        "schema": {
          "type": "string",
          "example": "1"
        }
      },
      "X-Request-Id": {
        "description": "Идентификатор запроса для поддержки",
        "schema": {
          "type": "string"
        }
      },
      "X-RateLimit-Limit": {
        "description": "Лимит запросов в окне",
        "schema": {
          "type": "integer",
          "example": 240
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Остаток запросов в окне",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Unix time сброса окна",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Window": {
        "description": "Длина окна в секундах",
        "schema": {
          "type": "integer",
          "example": 600
        }
      },
      "X-Total-Count": {
        "description": "Всего записей",
        "schema": {
          "type": "integer"
        }
      },
      "X-Page": {
        "description": "Текущая страница",
        "schema": {
          "type": "integer"
        }
      },
      "X-Per-Page": {
        "description": "Размер страницы",
        "schema": {
          "type": "integer"
        }
      },
      "X-Total-Pages": {
        "description": "Всего страниц",
        "schema": {
          "type": "integer"
        }
      },
      "Link": {
        "description": "RFC 8288 ссылки first/prev/next/last",
        "schema": {
          "type": "string"
        }
      },
      "ETag": {
        "description": "Версия представления для If-None-Match",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "invalid_request"
          },
          "error_description": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "Pagination": {
        "type": "object",
        "required": [
          "page",
          "per_page",
          "total",
          "pages",
          "has_more"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "per_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "pages": {
            "type": "integer",
            "minimum": 0
          },
          "has_more": {
            "type": "boolean"
          },
          "next_page": {
            "type": [
              "integer",
              "null"
            ]
          },
          "prev_page": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "Meta": {
        "type": "object",
        "properties": {
          "api_version": {
            "type": "string",
            "example": "1"
          }
        }
      },
      "TicketCounts": {
        "type": "object",
        "required": [
          "total",
          "available",
          "sold",
          "sold_out"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "available": {
            "type": "integer",
            "minimum": 0
          },
          "sold": {
            "type": "integer",
            "minimum": 0
          },
          "sold_out": {
            "type": "boolean"
          }
        }
      },
      "TicketType": {
        "type": "object",
        "required": [
          "id",
          "name",
          "price",
          "available",
          "quota",
          "sold",
          "sold_out"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "string",
            "example": "1500.00"
          },
          "price_value": {
            "type": "number"
          },
          "price_label": {
            "type": "string",
            "example": "1 500 руб."
          },
          "available": {
            "type": "integer",
            "minimum": 0
          },
          "quota": {
            "type": "integer",
            "minimum": 0
          },
          "sold": {
            "type": "integer",
            "minimum": 0
          },
          "sold_out": {
            "type": "boolean"
          },
          "is_free": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "allow_transfer": {
            "type": "boolean"
          },
          "allow_refund": {
            "type": "boolean"
          },
          "allow_reentry": {
            "type": "boolean"
          },
          "zones": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "Organizer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "verified": {
            "type": "boolean"
          }
        }
      },
      "EventSummary": {
        "type": "object",
        "required": [
          "id",
          "title",
          "status",
          "cancelled",
          "date",
          "ticket_counts"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "published",
              "completed",
              "cancelled"
            ]
          },
          "status_label": {
            "type": "string"
          },
          "cancelled": {
            "type": "boolean"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed": {
            "type": "boolean"
          },
          "published": {
            "type": "boolean"
          },
          "past": {
            "type": "boolean"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "date_label": {
            "type": "string",
            "example": "15.11.2026 00:30"
          },
          "location": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "currency": {
            "type": "string",
            "example": "RUB"
          },
          "price": {
            "type": "number"
          },
          "price_min": {
            "type": "number"
          },
          "price_max": {
            "type": "number"
          },
          "price_label": {
            "type": "string"
          },
          "has_free_tickets": {
            "type": "boolean"
          },
          "sold_out": {
            "type": "boolean"
          },
          "has_ticket_types": {
            "type": "boolean"
          },
          "ticket_counts": {
            "$ref": "#/components/schemas/TicketCounts"
          },
          "available_tickets": {
            "type": "integer"
          },
          "total_tickets": {
            "type": "integer"
          },
          "ticket_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TicketType"
            }
          },
          "organizer": {
            "$ref": "#/components/schemas/Organizer"
          },
          "views": {
            "type": "integer"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "social_links": {
            "type": "object",
            "description": "Публичные ссылки мероприятия",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "additionalProperties": true
      },
      "EventDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EventSummary"
          }
        ],
        "properties": {
          "program": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "age_restriction": {
            "type": "string"
          },
          "erid": {
            "type": "string"
          },
          "flags": {
            "type": "object",
            "properties": {
              "alcohol_allowed": {
                "type": "boolean"
              },
              "smoking_allowed": {
                "type": "boolean"
              },
              "has_lodging": {
                "type": "boolean"
              },
              "difficulty": {
                "type": "string"
              },
              "pets_allowed": {
                "type": "boolean"
              },
              "dress_code": {
                "type": "string"
              },
              "water_provided": {
                "type": "boolean"
              },
              "medical_support": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "AvailabilityType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "price_value": {
            "type": "number"
          },
          "available": {
            "type": "integer"
          },
          "quota": {
            "type": "integer"
          },
          "sold": {
            "type": "integer"
          },
          "sold_out": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          }
        }
      },
      "Availability": {
        "type": "object",
        "required": [
          "event_id",
          "status",
          "cancelled",
          "available",
          "total",
          "sold"
        ],
        "properties": {
          "event_id": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "status_label": {
            "type": "string"
          },
          "cancelled": {
            "type": "boolean"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "sold_out": {
            "type": "boolean"
          },
          "available": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "sold": {
            "type": "integer"
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityType"
            }
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MasterSummary": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "username",
          "display_name",
          "is_verified",
          "is_available"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "user_id": {
            "type": "integer"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          },
          "short_description": {
            "type": "string"
          },
          "specializations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "specialization_labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "language_labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "experience_years": {
            "type": "integer"
          },
          "city": {
            "type": "string"
          },
          "rating": {
            "type": "number"
          },
          "review_count": {
            "type": "integer"
          },
          "completed_orders_count": {
            "type": "integer"
          },
          "is_verified": {
            "type": "boolean"
          },
          "is_available": {
            "type": "boolean"
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "cover_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "services_count": {
            "type": "integer"
          },
          "price_min": {
            "type": [
              "integer",
              "null"
            ]
          },
          "price_max": {
            "type": [
              "integer",
              "null"
            ]
          },
          "price_from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "price_label": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "member_since": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "MasterService": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "package_type": {
            "type": "string"
          },
          "package_label": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "includes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price": {
            "type": "integer"
          },
          "price_max": {
            "type": [
              "integer",
              "null"
            ]
          },
          "pricing_mode": {
            "type": "string"
          },
          "price_label": {
            "type": "string"
          },
          "delivery_days": {
            "type": "integer"
          },
          "revisions": {
            "type": "integer"
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "PortfolioItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string"
          },
          "is_featured": {
            "type": "boolean"
          },
          "views": {
            "type": "integer"
          }
        }
      },
      "Slot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "start_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "time_label": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "ReviewSummary": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "average": {
            "type": "number"
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      },
      "SocialLink": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "href": {
            "type": "string",
            "format": "uri"
          },
          "external": {
            "type": "boolean"
          }
        }
      },
      "MasterDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MasterSummary"
          }
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MasterService"
            }
          },
          "portfolio": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioItem"
            }
          },
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            }
          },
          "review_summary": {
            "$ref": "#/components/schemas/ReviewSummary"
          },
          "response_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "response_label": {
            "type": "string"
          },
          "social_links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SocialLink"
            }
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "views": {
            "type": "integer"
          },
          "approved_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EventList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventSummary"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "MasterList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MasterSummary"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "TicketList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "WebhookEnvelope": {
        "type": "object",
        "required": [
          "id",
          "type",
          "api_version",
          "created_at",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Уникальный id доставки, для дедупликации"
          },
          "type": {
            "type": "string",
            "enum": [
              "event.created",
              "event.published",
              "event.updated",
              "event.cancelled",
              "event.completed",
              "event.deleted"
            ]
          },
          "api_version": {
            "type": "string",
            "const": "1"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Публичная карточка мероприятия на момент события"
          }
        },
        "additionalProperties": false
      },
      "MeMaster": {
        "type": "object",
        "properties": {
          "master": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MasterSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "master"
        ]
      }
    }
  },
  "webhooks": {
    "catalogEvent": {
      "post": {
        "summary": "Изменение публичного мероприятия",
        "description": "YFG ID отправляет POST на URL подписки. Тело подписано HMAC-SHA256 по строке timestamp.body; заголовки X-YFG-Event, X-YFG-Delivery, X-YFG-Timestamp, X-YFG-Signature, X-YFG-Api-Version. Ответ 2xx подтверждает доставку; иначе повтор с backoff до 8 попыток.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEnvelope"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Доставка принята"
          },
          "410": {
            "description": "Подписка отключена получателем"
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Полная документация YFG ID",
    "url": "https://yfg.su/id/docs"
  }
}
