{"openapi":"3.1.0","info":{"title":"BeatyBook Agent API","version":"1.0.0","description":"API BeatyBook для записи клиентов и отдельно разрешённых действий личного агента: чтения каталога и календаря без контактов клиентов, предложений фиксированной цены, полей услуги и ручных свободных окон. По умолчанию предложение применяет человек в BeatyBook; отдельное owner:changes:apply разрешает применить своё неизменяемое предложение без подтверждения на сайте. Аутентификация: OAuth2 authorization_code + PKCE S256 с согласием владельца и идентификатором клиента CIMD либо динамической регистрацией или client_credentials (POST /api/agent/v1/oauth/token), затем Authorization: Bearer. Запись двухшаговая: createBooking отправляет клиенту SMS-код, confirmBooking подтверждает телефон и фиксирует согласия клиента."},"paths":{"/api/agent/v1/oauth/token":{"post":{"tags":["Agent API"],"summary":"Issue or refresh an OAuth access token","description":"client_credentials or public authorization_code with PKCE S256; rotating refresh_token for delegated clients. Public CIMD and dynamically registered clients send no client_secret, client assertion or Authorization header. CIMD clients must advertise none (directly or in token_endpoint_auth_methods_supported). A refresh token is issued only when the client's metadata supports refresh_token. Persist the latest refresh_token atomically after every rotation; replay revokes the connection. Responses are no-store.","operationId":"issueToken","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"type":"object","required":["grant_type","client_id","client_secret"],"properties":{"client_id":{"type":"string","minLength":1},"client_secret":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1},"grant_type":{"type":"string","const":"client_credentials"}},"additionalProperties":false},{"type":"object","required":["grant_type","client_id","code","redirect_uri","code_verifier","resource"],"properties":{"client_id":{"type":"string","minLength":1,"maxLength":2048,"description":"Exact CIMD HTTPS metadata URL or the client_id returned by dynamic registration"},"code":{"type":"string","minLength":1},"redirect_uri":{"type":"string","minLength":1},"code_verifier":{"type":"string","minLength":43,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]+$"},"resource":{"type":"string","minLength":1,"description":"Exact resource from /.well-known/oauth-protected-resource"},"grant_type":{"type":"string","const":"authorization_code"}},"additionalProperties":false},{"type":"object","required":["grant_type","client_id","refresh_token","resource"],"properties":{"client_id":{"type":"string","minLength":1,"maxLength":2048,"description":"Exact CIMD HTTPS metadata URL or the client_id returned by dynamic registration"},"refresh_token":{"type":"string","minLength":1},"resource":{"type":"string","minLength":1,"description":"Exact resource from /.well-known/oauth-protected-resource"},"scope":{"type":"string","minLength":1},"grant_type":{"type":"string","const":"refresh_token"}},"additionalProperties":false}]}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"security":[]}},"/api/agent/v1/connection":{"get":{"tags":["Agent API"],"summary":"Проверить подключение и действующие права","operationId":"getConnection","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"security":[{"AgentOAuth":[]}]}},"/api/agent/v1/services":{"get":{"tags":["Agent API"],"summary":"Список услуг студии","description":"Бронируемые услуги тенанта с ценами (рубли) и длительностью (часы).","operationId":"getServices","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicesResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"security":[{"AgentOAuth":["services:read"]}]}},"/api/agent/v1/availability":{"get":{"tags":["Agent API"],"summary":"Свободные окна записи","description":"Свободные слоты (или окна аренды). Для объектов аренды укажите service_type_id и date.","operationId":"getAvailableSlots","parameters":[{"name":"service_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Фильтр по услуге; для аренды обязателен.","title":"Service Type Id"},"description":"Фильтр по услуге; для аренды обязателен."},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Дата YYYY-MM-DD (для аренды; по умолчанию сегодня).","title":"Date"},"description":"Дата YYYY-MM-DD (для аренды; по умолчанию сегодня)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"security":[{"AgentOAuth":["availability:read"]}]}},"/api/agent/v1/bookings/{booking_id}":{"get":{"tags":["Agent API"],"summary":"Статус записи","operationId":"getBooking","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"security":[{"AgentOAuth":["bookings:read"]}]}},"/api/agent/v1/bookings":{"post":{"tags":["Agent API"],"summary":"Создать запись (клиенту придёт SMS-код)","description":"Создаёт НЕподтверждённую запись и отправляет клиенту SMS-код. Запись активируется только после confirmBooking с этим кодом — так подтверждается реальный человек (152-ФЗ).","operationId":"createBooking","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookingRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingBookingResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"x-openai-isConsequential":true,"security":[{"AgentOAuth":["bookings:write"]}]}},"/api/agent/v1/bookings/confirm":{"post":{"tags":["Agent API"],"summary":"Подтвердить запись кодом из SMS","description":"Завершает создание записи: проверяет код, фиксирует согласие, занимает слот.","operationId":"confirmBooking","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmBookingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"x-openai-isConsequential":true,"security":[{"AgentOAuth":["bookings:write"]}]}},"/api/agent/v1/bookings/{booking_id}/reschedule":{"post":{"tags":["Agent API"],"summary":"Перенести запись на другой слот","operationId":"rescheduleBooking","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"x-openai-isConsequential":true,"security":[{"AgentOAuth":["bookings:write"]}]}},"/api/agent/v1/bookings/{booking_id}/cancel":{"post":{"tags":["Agent API"],"summary":"Отменить запись","operationId":"cancelBooking","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}},{"name":"accept_no_refund","in":"query","required":false,"schema":{"type":"boolean","description":"Клиент согласен отменить без возврата предоплаты. Без флага отмена, при которой по правилам мастера деньги не вернутся, отвечает 409 refund_not_available с текстом для клиента.","default":false,"title":"Accept No Refund"},"description":"Клиент согласен отменить без возврата предоплаты. Без флага отмена, при которой по правилам мастера деньги не вернутся, отвечает 409 refund_not_available с текстом для клиента."}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Не аутентифицирован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Недостаточно прав / запрещено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Слишком часто","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"503":{"description":"Сервис недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}}},"x-openai-isConsequential":true,"security":[{"AgentOAuth":["bookings:write"]}]}},"/api/agent/v1/oauth/register":{"post":{"tags":["Agent API","Agent OAuth"],"summary":"Register a public OAuth client without a client secret","operationId":"registerAgentApplication","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}}},"security":[]}},"/api/agent/v1/oauth/authorize":{"get":{"tags":["Agent API","Agent OAuth"],"summary":"Start owner-approved authorization with mandatory PKCE S256","operationId":"authorizeAgentApplication","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2048,"title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2048,"title":"Redirect Uri"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"State"}},{"name":"resource","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2048,"title":"Resource"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","minLength":43,"maxLength":43,"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":true,"schema":{"type":"string","title":"Code Challenge Method"}},{"name":"response_type","in":"query","required":true,"schema":{"type":"string","title":"Response Type"}},{"name":"scope","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":256,"title":"Scope"}}],"responses":{"303":{"description":"Continue in the BeatyBook browser consent UI","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Unauthorized"},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Not Found"},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Service Unavailable"}},"security":[]}},"/api/agent/v1/oauth/consent":{"get":{"tags":["Agent API","Agent OAuth"],"summary":"Read current signed-in owner consent context","operationId":"getAgentConsent","parameters":[{"name":"request_id","in":"query","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Unauthorized"},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Not Found"},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentBrowserSession":[]}]},"post":{"tags":["Agent API","Agent OAuth"],"summary":"Approve or deny one project-specific OAuth request","operationId":"decideAgentConsent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRedirectResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Unauthorized"},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Not Found"},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentBrowserSession":[]}]}},"/api/agent/v1/oauth/connections":{"get":{"tags":["Agent API","Agent OAuth"],"summary":"List delegated connections of an owned or administered project","operationId":"listAgentConnections","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Unauthorized"},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Not Found"},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentBrowserSession":[]}]}},"/api/agent/v1/oauth/connections/{grant_id}/revoke":{"post":{"tags":["Agent API","Agent OAuth"],"summary":"Revoke a delegated grant and all its refresh tokens","operationId":"revokeAgentConnection","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Unauthorized"},"402":{"description":"Достигнут лимит тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Not Found"},"409":{"description":"Конфликт (слот занят)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Ошибка валидации","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentBrowserSession":[]}]}},"/api/agent/v1/owner/services":{"get":{"tags":["Agent owner proposals"],"summary":"Read the owner's service catalog and exact-price edit eligibility","operationId":"getOwnerServices","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"after_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2147483647,"exclusiveMinimum":0},{"type":"null"}],"title":"After Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerCatalog"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Getownerservices"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:services:read"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/proposals/service-price":{"post":{"tags":["Agent owner proposals"],"summary":"Save one exact-price proposal without applying the price","operationId":"proposeServicePrice","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicePriceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceProposal"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Proposeserviceprice"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:proposals:write","owner:services:read"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/proposals/{proposal_id}":{"get":{"tags":["Agent owner proposals"],"summary":"Read only this delegated connection's proposal and application status","operationId":"getOwnerProposal","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceProposal"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Getownerproposal"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:proposals:write"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/proposals/{proposal_id}/apply":{"post":{"tags":["Agent owner proposals"],"summary":"Apply this connection's frozen proposal with a separately consented apply permission","operationId":"applyOwnerProposal","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceProposal"},{"$ref":"#/components/schemas/OwnerChangeProposal"}],"title":"Response Applyownerproposal"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Applyownerproposal"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:changes:apply"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/calendar":{"get":{"tags":["Agent owner proposals"],"summary":"Read bounded project calendar events without customer contact details","operationId":"getOwnerCalendar","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","maxLength":40,"title":"Start"}},{"name":"end","in":"query","required":true,"schema":{"type":"string","maxLength":40,"title":"End"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerCalendar"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Getownercalendar"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:calendar:read"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/change-proposals/service":{"post":{"tags":["Agent owner proposals"],"summary":"Propose service name, duration or visibility without applying it","operationId":"proposeServiceChange","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUpdateChangeRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerChangeProposal"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Proposeservicechange"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:changes:propose","owner:services:read"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/change-proposals/slot":{"post":{"tags":["Agent owner proposals"],"summary":"Propose creating, editing or removing one manual free window","operationId":"proposeSlotChange","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotChangePayload"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerChangeProposal"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Proposeslotchange"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:calendar:read","owner:changes:propose"]}],"x-agent-delegated-only":true}},"/api/agent/v1/owner/change-proposals/{proposal_id}":{"get":{"tags":["Agent owner proposals"],"summary":"Read this connection's service or manual-schedule proposal and application status","operationId":"getOwnerChangeProposal","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerChangeProposal"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Conflict"},"422":{"description":"Domain validation error or FastAPI request validation details","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentErrorResponse"},{"$ref":"#/components/schemas/OwnerValidationErrorResponse"}],"title":"Response 422 Getownerchangeproposal"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"AgentOAuth":["owner:changes:propose"]}],"x-agent-delegated-only":true}}},"components":{"schemas":{"AgentErrorBody":{"properties":{"code":{"type":"string","title":"Code","description":"Машинный код ошибки.","examples":["slot_taken"]},"message":{"type":"string","title":"Message","description":"Человекочитаемое описание."}},"type":"object","required":["code","message"],"title":"AgentErrorBody"},"AgentErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/AgentErrorBody"}},"type":"object","required":["error"],"title":"AgentErrorResponse"},"AvailabilityResponse":{"properties":{"slots":{"items":{"$ref":"#/components/schemas/AvailabilitySlotOut"},"type":"array","title":"Slots"}},"type":"object","required":["slots"],"title":"AvailabilityResponse"},"AvailabilitySlotOut":{"properties":{"start":{"type":"string","format":"date-time","title":"Start","description":"Начало свободного окна (UTC, ISO 8601)."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"Конец окна — только для объектов аренды; для обычной записи null."},"slot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot Id","description":"ID слота — передайте в createBooking (режим слотов)."},"service_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Type Id","description":"Услуга, к которой привязан слот, — только если привязка ровно к одной услуге (легаси-поле). Полный набор привязок смотрите в slot_service_type_ids."},"slot_service_type_ids":{"items":{"type":"integer"},"type":"array","title":"Slot Service Type Ids","description":"Набор услуг, к которым привязан слот. Пустой список — общий слот, подходит для любой услуги; непустой — слот принимает ТОЛЬКО услуги из этого набора.","examples":[[12,14]]}},"type":"object","required":["start"],"title":"AvailabilitySlotOut"},"BookingResponse":{"properties":{"booking_id":{"type":"integer","title":"Booking Id","description":"ID записи."},"status":{"type":"string","enum":["confirmed","awaiting_payment"],"title":"Status","description":"confirmed — запись активна; awaiting_payment — ждёт оплаты предоплаты."},"service_name":{"type":"string","title":"Service Name"},"service_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Type Id"},"start":{"type":"string","format":"date-time","title":"Start","description":"Время записи (UTC ISO 8601)."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"Конец (для аренды)."},"requires_payment":{"type":"boolean","title":"Requires Payment","description":"Требуется ли предоплата."},"payment_pending_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Payment Pending Until","description":"До какого момента удерживается слот под оплату (если awaiting_payment)."}},"type":"object","required":["booking_id","status","service_name","start","requires_payment"],"title":"BookingResponse"},"CalendarAutomaticSchedule":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"materialized_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Materialized Until"}},"type":"object","required":["enabled","materialized_until"],"title":"CalendarAutomaticSchedule"},"CalendarEvent":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","enum":["free","busy","payment_hold","block","external_busy"],"title":"Kind"},"starts_at":{"type":"string","title":"Starts At"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ends At"},"slot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot Id"},"master_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Master User Id"},"service_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Type Id"},"service_type_ids":{"items":{"type":"integer"},"type":"array","title":"Service Type Ids"},"read_only":{"type":"boolean","title":"Read Only"}},"type":"object","required":["id","kind","starts_at","ends_at","slot_id","master_user_id","service_type_id","service_type_ids","read_only"],"title":"CalendarEvent"},"CalendarMaster":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CalendarMaster"},"CalendarProject":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"timezone":{"type":"string","title":"Timezone"},"booking_mode":{"type":"string","title":"Booking Mode"}},"type":"object","required":["id","name","timezone","booking_mode"],"title":"CalendarProject"},"CalendarRange":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["start","end"],"title":"CalendarRange"},"CalendarWorkingHours":{"properties":{"timezone":{"type":"string","title":"Timezone"},"days":{"additionalProperties":{"items":{"$ref":"#/components/schemas/WorkingHourWindow"},"type":"array"},"propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"]},"type":"object","title":"Days"}},"type":"object","required":["timezone","days"],"title":"CalendarWorkingHours"},"ChangeProject":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["id","name","timezone"],"title":"ChangeProject"},"ChangeResource":{"properties":{"type":{"type":"string","enum":["service","slot"],"title":"Type"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},"type":"object","required":["type","id"],"title":"ChangeResource"},"ChangeSummary":{"properties":{"title":{"type":"string","title":"Title"},"resource":{"$ref":"#/components/schemas/ChangeResource"},"changes":{"items":{"$ref":"#/components/schemas/DisplayChange"},"type":"array","title":"Changes"}},"type":"object","required":["title","resource","changes"],"title":"ChangeSummary"},"ConfirmBookingRequest":{"properties":{"verification_id":{"type":"string","title":"Verification Id","description":"verification_id из ответа createBooking."},"code":{"type":"string","title":"Code","description":"Код из SMS, который назвал клиент.","examples":["123456"]}},"type":"object","required":["verification_id","code"],"title":"ConfirmBookingRequest"},"ConnectionAuthentication":{"properties":{"grant_type":{"type":"string","enum":["client_credentials","authorization_code"],"title":"Grant Type","default":"client_credentials"},"interactive_login_supported":{"type":"boolean","const":true,"title":"Interactive Login Supported","default":true}},"type":"object","title":"ConnectionAuthentication"},"ConnectionProject":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["id","name","timezone"],"title":"ConnectionProject"},"ConnectionResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"project":{"$ref":"#/components/schemas/ConnectionProject"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"writes_enabled":{"type":"boolean","title":"Writes Enabled"},"authentication":{"$ref":"#/components/schemas/ConnectionAuthentication"},"documentation_url":{"type":"string","title":"Documentation Url"}},"type":"object","required":["client_id","project","scopes","writes_enabled","authentication","documentation_url"],"title":"ConnectionResponse"},"ConnectionsResponse":{"properties":{"connections":{"items":{"$ref":"#/components/schemas/DelegatedConnection"},"type":"array","title":"Connections"}},"type":"object","required":["connections"],"title":"ConnectionsResponse"},"ConsentApplication":{"properties":{"client_id":{"type":"string","title":"Client Id"},"name":{"type":"string","title":"Name"},"redirect_origins":{"items":{"type":"string"},"type":"array","title":"Redirect Origins","description":"Canonical origin of this request's validated callback"}},"type":"object","required":["client_id","name","redirect_origins"],"title":"ConsentApplication"},"ConsentDecision":{"properties":{"request_id":{"type":"string","maxLength":128,"minLength":32,"title":"Request Id"},"project_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Project Id"},"scopes":{"items":{"type":"string"},"type":"array","maxItems":9,"title":"Scopes"},"approved":{"type":"boolean","title":"Approved"}},"additionalProperties":false,"type":"object","required":["request_id","approved"],"title":"ConsentDecision"},"ConsentProject":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["id","name","timezone"],"title":"ConsentProject"},"ConsentRedirectResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url"}},"type":"object","required":["redirect_url"],"title":"ConsentRedirectResponse"},"ConsentResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"application":{"$ref":"#/components/schemas/ConsentApplication"},"requested_scopes":{"items":{"type":"string"},"type":"array","title":"Requested Scopes"},"projects":{"items":{"$ref":"#/components/schemas/ConsentProject"},"type":"array","title":"Projects"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["request_id","application","requested_scopes","projects","expires_at"],"title":"ConsentResponse"},"CreateBookingRequest":{"properties":{"service_type_id":{"type":"integer","title":"Service Type Id","description":"ID услуги из getServices.","examples":[12]},"customer_phone":{"type":"string","title":"Customer Phone","description":"Телефон клиента (+7XXXXXXXXXX). На него придёт SMS-код подтверждения записи.","examples":["+79991234567"]},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name","description":"Имя клиента.","examples":["Иван"]},"slot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot Id","description":"ID свободного слота из getAvailableSlots (режим слотов)."},"start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start","description":"Начало окна аренды (UTC ISO) — только для объектов аренды (interval)."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"Конец окна аренды (UTC ISO) — только для объектов аренды (interval)."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Комментарий клиента к записи."}},"type":"object","required":["service_type_id","customer_phone"],"title":"CreateBookingRequest"},"DelegatedConnection":{"properties":{"grant_id":{"type":"string","title":"Grant Id"},"client_id":{"type":"string","title":"Client Id"},"client_name":{"type":"string","title":"Client Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["grant_id","client_id","client_name","scopes","active","created_at","expires_at","last_used_at","revoked_at"],"title":"DelegatedConnection"},"DisplayChange":{"properties":{"label":{"type":"string","title":"Label"},"before":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"type":"null"}],"title":"After"},"format":{"type":"string","enum":["text","datetime"],"title":"Format","default":"text"}},"type":"object","required":["label","before","after"],"title":"DisplayChange"},"OAuthErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"error_description":{"type":"string","title":"Error Description"}},"type":"object","required":["error","error_description"],"title":"OAuthErrorResponse"},"OwnerCalendar":{"properties":{"project":{"$ref":"#/components/schemas/CalendarProject"},"range":{"$ref":"#/components/schemas/CalendarRange"},"events":{"items":{"$ref":"#/components/schemas/CalendarEvent"},"type":"array","title":"Events"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"availability_authoritative":{"type":"boolean","const":false,"title":"Availability Authoritative","default":false},"automatic_schedule":{"$ref":"#/components/schemas/CalendarAutomaticSchedule"},"working_hours":{"anyOf":[{"$ref":"#/components/schemas/CalendarWorkingHours"},{"type":"null"}]},"working_hours_status":{"type":"string","enum":["configured","not_configured","invalid"],"title":"Working Hours Status"},"masters":{"items":{"$ref":"#/components/schemas/CalendarMaster"},"type":"array","title":"Masters"},"masters_truncated":{"type":"boolean","title":"Masters Truncated","default":false}},"type":"object","required":["project","range","events","next_cursor","automatic_schedule","working_hours","working_hours_status"],"title":"OwnerCalendar"},"OwnerCatalog":{"properties":{"project":{"$ref":"#/components/schemas/OwnerProject"},"services":{"items":{"$ref":"#/components/schemas/OwnerService"},"type":"array","title":"Services"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["project","services","next_cursor"],"title":"OwnerCatalog"},"OwnerChangeProposal":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","enum":["service_update","slot_create","slot_update","slot_delete"],"title":"Kind"},"status":{"type":"string","enum":["pending","applied","rejected","expired","stale","invalidated"],"title":"Status"},"project":{"$ref":"#/components/schemas/ChangeProject"},"application":{"$ref":"#/components/schemas/ProposalApplication"},"summary":{"$ref":"#/components/schemas/ChangeSummary"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"review_url":{"type":"string","title":"Review Url"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"can_approve":{"type":"boolean","title":"Can Approve"},"can_reject":{"type":"boolean","title":"Can Reject"},"blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blocked Reason"},"outcome":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outcome"}},"type":"object","required":["id","kind","status","project","application","summary","created_at","expires_at","review_url","decided_at","can_approve","can_reject","blocked_reason","outcome"],"title":"OwnerChangeProposal"},"OwnerProject":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OwnerProject"},"OwnerService":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"price_rub":{"type":"string","title":"Price Rub"},"currency":{"type":"string","const":"RUB","title":"Currency"},"duration_hours":{"type":"number","title":"Duration Hours"},"is_hidden":{"type":"boolean","title":"Is Hidden"},"price_editable":{"type":"boolean","title":"Price Editable"},"price_edit_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Edit Reason"}},"type":"object","required":["id","name","price_rub","currency","duration_hours","is_hidden","price_editable","price_edit_reason"],"title":"OwnerService"},"OwnerValidationErrorResponse":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/OwnerValidationIssue"},"type":"array","title":"Detail"}},"type":"object","required":["detail"],"title":"OwnerValidationErrorResponse"},"OwnerValidationIssue":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Loc"},"msg":{"type":"string","title":"Msg"},"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["loc","msg","type"],"title":"OwnerValidationIssue","description":"FastAPI/Pydantic boundary errors, including optional input/context."},"PendingBookingResponse":{"properties":{"status":{"type":"string","const":"pending_verification","title":"Status","default":"pending_verification"},"verification_id":{"type":"string","title":"Verification Id","description":"Передайте в confirmBooking вместе с кодом, который назовёт клиент."},"masked_phone":{"type":"string","title":"Masked Phone","description":"Маскированный телефон, куда отправлен код.","examples":["79****4567"]},"delivery_channel":{"type":"string","title":"Delivery Channel","description":"Канал доставки кода.","examples":["sms"]},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","description":"Сколько секунд действует код.","examples":[600]}},"type":"object","required":["verification_id","masked_phone","delivery_channel","expires_in_seconds"],"title":"PendingBookingResponse"},"PriceProposal":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","const":"service_price","title":"Kind","default":"service_price"},"status":{"type":"string","enum":["pending","applied","rejected","expired","stale","invalidated"],"title":"Status"},"project":{"$ref":"#/components/schemas/OwnerProject"},"application":{"$ref":"#/components/schemas/ProposalApplication"},"service":{"$ref":"#/components/schemas/ProposalService"},"old_price_rub":{"type":"string","title":"Old Price Rub"},"new_price_rub":{"type":"string","title":"New Price Rub"},"currency":{"type":"string","const":"RUB","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"review_url":{"type":"string","title":"Review Url"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"can_approve":{"type":"boolean","title":"Can Approve"},"can_reject":{"type":"boolean","title":"Can Reject"},"blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blocked Reason"}},"type":"object","required":["id","status","project","application","service","old_price_rub","new_price_rub","currency","created_at","expires_at","review_url","decided_at","can_approve","can_reject","blocked_reason"],"title":"PriceProposal"},"ProposalApplication":{"properties":{"client_id":{"type":"string","title":"Client Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["client_id","name"],"title":"ProposalApplication"},"ProposalService":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProposalService"},"RegistrationRequest":{"properties":{"client_name":{"type":"string","maxLength":100,"minLength":1,"title":"Client Name"},"redirect_uris":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","const":"none","title":"Token Endpoint Auth Method","default":"none"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","maxItems":2,"minItems":2,"title":"Grant Types"},"response_types":{"items":{"type":"string","const":"code"},"type":"array","maxItems":1,"minItems":1,"title":"Response Types"},"application_type":{"type":"string","enum":["web","native"],"title":"Application Type","default":"web"},"scope":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Scope","description":"Optional supported-scope metadata; authorization and owner consent remain mandatory"}},"additionalProperties":false,"type":"object","required":["client_name","redirect_uris"],"title":"RegistrationRequest"},"RegistrationResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_id_issued_at":{"type":"integer","title":"Client Id Issued At"},"client_name":{"type":"string","title":"Client Name"},"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","const":"none","title":"Token Endpoint Auth Method"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types"},"response_types":{"items":{"type":"string","const":"code"},"type":"array","title":"Response Types"},"application_type":{"type":"string","enum":["web","native"],"title":"Application Type","default":"web"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["client_id","client_id_issued_at","client_name","redirect_uris","token_endpoint_auth_method","grant_types","response_types"],"title":"RegistrationResponse"},"RescheduleRequest":{"properties":{"new_slot_id":{"type":"integer","title":"New Slot Id","description":"ID нового свободного слота из getAvailableSlots."}},"type":"object","required":["new_slot_id"],"title":"RescheduleRequest"},"RevokeRequest":{"properties":{"project_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Project Id"}},"additionalProperties":false,"type":"object","required":["project_id"],"title":"RevokeRequest"},"RevokeResponse":{"properties":{"revoked":{"type":"boolean","const":true,"title":"Revoked"}},"type":"object","required":["revoked"],"title":"RevokeResponse"},"ServiceChanges":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"duration_minutes":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":5.0},{"type":"null"}],"title":"Duration Minutes"},"is_hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hidden"}},"additionalProperties":false,"type":"object","title":"ServiceChanges"},"ServiceOut":{"properties":{"id":{"type":"integer","title":"Id","description":"ID услуги. Передайте его в createBooking.","examples":[12]},"name":{"type":"string","title":"Name","description":"Название услуги.","examples":["Маникюр с покрытием"]},"price_rub":{"type":"number","title":"Price Rub","description":"Цена в рублях.","examples":[1500.0]},"duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Hours","description":"Длительность в часах (например 1.5).","examples":[1.5]}},"type":"object","required":["id","name","price_rub"],"title":"ServiceOut"},"ServicePriceRequest":{"properties":{"service_type_id":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Service Type Id"},"new_price_rub":{"type":"string","maxLength":11,"pattern":"^(?:0|[1-9][0-9]{0,7})(?:\\.[0-9]{1,2})?$","title":"New Price Rub"}},"additionalProperties":false,"type":"object","required":["service_type_id","new_price_rub"],"title":"ServicePriceRequest"},"ServiceUpdateChangeRequest":{"properties":{"kind":{"type":"string","const":"service_update","title":"Kind","default":"service_update"},"service_type_id":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Service Type Id"},"changes":{"$ref":"#/components/schemas/ServiceChanges"}},"additionalProperties":false,"type":"object","required":["service_type_id","changes"],"title":"ServiceUpdateChangeRequest"},"ServicesResponse":{"properties":{"services":{"items":{"$ref":"#/components/schemas/ServiceOut"},"type":"array","title":"Services"}},"type":"object","required":["services"],"title":"ServicesResponse"},"SlotChangePayload":{"properties":{"kind":{"type":"string","enum":["slot_create","slot_update","slot_delete"],"title":"Kind"},"slot_id":{"anyOf":[{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Slot Id"},"starts_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Starts At"},"master_user_id":{"anyOf":[{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Master User Id"},"service_type_ids":{"anyOf":[{"items":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0},"type":"array","maxItems":50},{"type":"null"}],"title":"Service Type Ids"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"SlotChangePayload"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"Bearer access-token для заголовка Authorization."},"token_type":{"type":"string","const":"Bearer","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Срок жизни токена в секундах.","examples":[3600]},"scope":{"type":"string","title":"Scope","description":"Выданные scope'ы через пробел.","examples":["services:read bookings:write"]},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"Rotating credential, returned only for delegated authorization."}},"type":"object","required":["access_token","expires_in","scope"],"title":"TokenResponse"},"WorkingHourWindow":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["start","end"],"title":"WorkingHourWindow"}},"securitySchemes":{"AgentOAuth":{"type":"oauth2","description":"Owner-approved public OAuth via CIMD URL client identity or dynamic registration, with PKCE S256 and optional rotating refresh tokens, or studio-issued machine credentials.","flows":{"clientCredentials":{"tokenUrl":"https://beatybook.ru/api/agent/v1/oauth/token","scopes":{"availability:read":"Read available appointment windows.","bookings:read":"Read a known appointment's status in this project.","bookings:write":"Create, confirm, reschedule and cancel appointments in this project.","services:read":"Read bookable services, prices and durations."}},"authorizationCode":{"authorizationUrl":"https://beatybook.ru/api/agent/v1/oauth/authorize","tokenUrl":"https://beatybook.ru/api/agent/v1/oauth/token","refreshUrl":"https://beatybook.ru/api/agent/v1/oauth/token","scopes":{"availability:read":"Read available appointment windows.","bookings:read":"Read a known appointment's status in this project.","bookings:write":"Create, confirm, reschedule and cancel appointments in this project.","owner:calendar:read":"Read the owner's calendar without customer contact details. Personal OAuth only; explicit consent required.","owner:changes:apply":"Apply this delegated connection's frozen price/service/manual-window proposals without a separate website confirmation. Explicit new owner consent required; host confirmations depend on client settings. Never granted to machine keys.","owner:changes:propose":"Propose changes to service fields and manual free windows. Personal OAuth only. Does not apply them without separate apply permission or human browser approval.","owner:proposals:write":"Create and read price-change proposals. Personal OAuth only. Does not apply them without separate apply permission or human browser approval.","owner:services:read":"Read the cabinet catalog. Personal OAuth only; requires explicit owner/admin consent.","services:read":"Read bookable services, prices and durations."}}}},"AgentBrowserSession":{"type":"apiKey","in":"cookie","name":"nb_auth","description":"Human browser only. Current DB session required; POST additionally requires X-CSRF-Token matching nb_csrf."}}},"servers":[{"url":"https://beatybook.ru"}],"externalDocs":{"description":"Connection guide and API reference","url":"https://beatybook.ru/developers/"}}