{"openapi":"3.1.0","info":{"title":"Dohliad API","description":"The REST API of Dohliad, an AI-native marketplace of nannies and caregivers in Ukraine. Agents may prefer the MCP server at `/mcp` (Streamable HTTP, OAuth 2.1 by `/.well-known/oauth-protected-resource/mcp`), whose tools wrap these endpoints; `/llms.txt` lists every entry point.","version":"0.1.0"},"paths":{"/api/v1/public/places":{"get":{"tags":["public"],"summary":"List Places","description":"Every region of Ukraine with its launch cities and their districts, in Ukrainian\nalphabetical order. A profile serves a whole city or some of its districts.","operationId":"list_places_api_v1_public_places_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Region"},"type":"array","title":"Response List Places Api V1 Public Places Get"}}}}}}},"/api/v1/public/conditions":{"get":{"tags":["public"],"summary":"List Conditions","description":"Every suggestion for conditions (Ukrainian) of wards and caregiver profiles; the\nfrontend filters as the user types. Users may also type their own.","operationId":"list_conditions_api_v1_public_conditions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Conditions Api V1 Public Conditions Get"}}}}}}},"/api/v1/public/caregivers":{"get":{"tags":["public"],"summary":"Search Caregivers","description":"Published caregiver cards inside the filters. With `q`, the nearest in meaning come\nfirst and unrelated ones drop out; without it, or while Workers AI is down\n(`ranked_by: \"rating\"`), a rating smoothed towards the mean, then the latest\npublication. Cards knowing more of the given `languages` come before either.","operationId":"search_caregivers_api_v1_public_caregivers_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Free text in Ukrainian, ranked by meaning; a gender it names (\"няня чоловік\") ranks first","title":"Q"},"description":"Free text in Ukrainian, ranked by meaning; a gender it names (\"няня чоловік\") ranks first"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"district","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cards serving the whole city match too","title":"District"},"description":"Cards serving the whole city match too"},{"name":"care_type","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CareType"},"default":[],"title":"Care Type"}},{"name":"ward_age","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":120,"minimum":0},{"type":"null"}],"description":"Inside the card's ward-age range","title":"Ward Age"},"description":"Inside the card's ward-age range"},{"name":"conditions","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":100},"description":"Cards refusing any of these drop out","default":[],"title":"Conditions"},"description":"Cards refusing any of these drop out"},{"name":"education","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"default":[],"title":"Education"}},{"name":"max_rate","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Hourly, in UAH","title":"Max Rate"},"description":"Hourly, in UAH"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","pattern":"^[a-z]{2}$"},"description":"At least one; more matching languages rank first","default":[],"title":"Languages"},"description":"At least one; more matching languages rank first"},{"name":"min_rating","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":5,"minimum":0},{"type":"null"}],"title":"Min Rating"}},{"name":"available_on","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","pattern":"^[1-7]T([01]\\d|2[0-3]):[0-5]\\d-(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"},"maxItems":14,"description":"Weekday intervals such as \"1T09:00-13:00\" (ISO weekday); one slot of the card covers each whole interval","default":[],"title":"Available On"},"description":"Weekday intervals such as \"1T09:00-13:00\" (ISO weekday); one slot of the card covers each whole interval"},{"name":"starts_on","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The intended order's first day; today","title":"Starts On"},"description":"The intended order's first day; today"},{"name":"ends_on","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Its last day, a year at most after the first; six days later by default. Accepted orders and leave in this period hide a caregiver","title":"Ends On"},"description":"Its last day, a year at most after the first; six days later by default. Accepted orders and leave in this period hide a caregiver"},{"name":"caregiver_age_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":120,"minimum":0},{"type":"null"}],"title":"Caregiver Age Min"}},{"name":"caregiver_age_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":120,"minimum":0},{"type":"null"}],"title":"Caregiver Age Max"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"next_cursor of the previous page, with the same filters","title":"Cursor"},"description":"next_cursor of the previous page, with the same filters"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/caregivers/{profile_id}":{"get":{"tags":["public"],"summary":"Get Caregiver","description":"A published caregiver profile: everything on the card, never contacts. Contacts\nreach a client only through an accepted order.","operationId":"get_caregiver_api_v1_public_caregivers__profile_id__get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/caregivers/{profile_id}/reviews":{"get":{"tags":["public"],"summary":"List Reviews","description":"Published reviews of a published caregiver profile, newest first.","operationId":"list_reviews_api_v1_public_caregivers__profile_id__reviews_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicReview"},"title":"Response List Reviews Api V1 Public Caregivers  Profile Id  Reviews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/agencies/{agency_id}":{"get":{"tags":["public"],"summary":"Get Agency","description":"A published agency's card with the caregiver profiles of it the public may see,\nbest rated first; never contacts.","operationId":"get_agency_api_v1_public_agencies__agency_id__get","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agency Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAgency"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/sitemap":{"get":{"tags":["public"],"summary":"Get Sitemap","description":"Every caregiver profile and agency the public sees, with its last change: the web\napp's sitemap.xml lists them. Crawlers read it, not people, so it may be kept an\nhour.","operationId":"get_sitemap_api_v1_public_sitemap_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sitemap"}}}}}}},"/api/v1/public/media/{key}":{"get":{"tags":["public"],"summary":"Get Media","description":"A file people uploaded, such as a caregiver's photo. Its key never changes once\nwritten, so browsers and Cloudflare may keep it for a year.","operationId":"get_media_api_v1_public_media__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oauth/google":{"post":{"tags":["auth"],"summary":"Sign In With Google","description":"Trade a Google ID token for a session. The first sign-in creates an account with the\nclient's rights; a verified e-mail joins the user who already has it.","operationId":"sign_in_with_google_api_v1_auth_oauth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthSignInRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/magic-link":{"post":{"tags":["auth"],"summary":"Request Magic Link","description":"E-mail a sign-in code: 8 symbols (`K7PX-4M2Q`), in the subject and the body, with a\nlink to `/sign-in/magic?token=<code>` carrying the same code; both live 30 minutes and\nwork once. 202 for any address, so the answer tells nothing about accounts; 503\nmail_unavailable when the e-mail cannot be sent (retry). Where the environment has\nno e-mail set up the code goes to the log; outside production `GET\n/developer/magic-links/{email}` returns it too.","operationId":"request_magic_link_api_v1_auth_magic_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/magic-link/verify":{"post":{"tags":["auth"],"summary":"Verify Magic Link","description":"Trade the e-mailed code for a session, as typed or as the link carries it: case,\nspaces and hyphens do not matter, and O reads as 0, I and L as 1. 401\ninvalid_magic_link when it is wrong, used or older than 30 minutes. The first sign-in\ncreates an account with the client's rights.","operationId":"verify_magic_link_api_v1_auth_magic_link_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/phone/start":{"post":{"tags":["auth"],"summary":"Start Phone Verification","description":"Send a 6-digit code (30 min) by SMS and answer how long this number gets no second\none. An account gets one code a minute and ten in any 24 hours: 429 too_many_codes\n(`details.limit` is `minute` or `day`), and 429 code_already_sent while the number's\ncode is alive; both carry `details.retry_after_seconds` and `Retry-After`. 503\nsms_unavailable when it cannot be sent: retry at once, it counted for nothing. Where the\nenvironment has no SMS sender the code goes to the log; outside production\n`GET /developer/otp/{phone}` returns it too. 409 phone_taken when an agency's profile\ncarries the number for another caregiver.","operationId":"start_phone_verification_api_v1_auth_phone_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneStartRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeSent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/phone/verify":{"post":{"tags":["auth"],"summary":"Verify Phone","description":"Confirm the latest code; five wrong guesses kill it.","operationId":"verify_phone_api_v1_auth_phone_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","description":"Trade a refresh token for a new session; the old refresh token stops working.","operationId":"refresh_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the refresh token. The access token lives out its 15 minutes.","operationId":"logout_api_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"The signed-in user's own account and its rights.","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["auth"],"summary":"Change My Account","description":"Account settings: the display name, the account's own gender, and the caregiver\nright on or off. Turning it off takes your own profile out of search and declines its\npending orders; accepted ones stay. Refresh the session to get the new rights into the\naccess token. `onboarded: true` marks the onboarding wizard finished or skipped; it\nnever goes back, so `false` is validation_error.","operationId":"change_my_account_api_v1_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/name-suggestion":{"get":{"tags":["auth"],"summary":"Suggest A Name","description":"A display name for the onboarding wizard's field: the account's Telegram name as it\nis, else a name in Ukrainian read by the model from the e-mail (`ivan.petrenko` → Іван\nПетренко). `null` when the e-mail does not look like a name or Workers AI is down; never\n503. Nothing is stored.","operationId":"suggest_a_name_api_v1_auth_name_suggestion_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameSuggestion"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/phone-code":{"post":{"tags":["auth"],"summary":"Request Phone Code","description":"Send a 6-digit sign-in code (30 min) and say where it went: `telegram` for the\nchat of the active account that has the number verified, else `sms`. A number and a\ncaller's address each get one code a minute and five in any 24 hours: 429\ntoo_many_codes (`details.limit` is `minute` or `day`), and 429 code_already_sent while\nthe number's code is alive; both carry `details.retry_after_seconds` and `Retry-After`.\n503 sms_unavailable when the SMS cannot be sent: retry at once, it counted for nothing.\nOutside production `GET /developer/otp/{phone}` returns the code.","operationId":"request_phone_code_api_v1_auth_phone_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCodeRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInCodeSent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/phone-code/verify":{"post":{"tags":["auth"],"summary":"Verify Phone Code","description":"Trade the number's latest code for a session; a number nobody has makes the account,\nwith the client's rights and the number verified. 400 invalid_code when it is wrong,\nused or dead (five wrong guesses kill it); 403 user_blocked; 403\nsign_in_by_email_required for an admin or the super admin.","operationId":"verify_phone_code_api_v1_auth_phone_code_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCodeVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/telegram":{"post":{"tags":["auth"],"summary":"Request Telegram Sign In","description":"A `t.me/<bot>?start=<token>` deep link (10 min) that signs this page in: in the\nbot, Start shows a warning and «Увійти з моїм номером», which shares the person's own\nnumber. Ask `POST /auth/telegram/verify` with the token every few seconds. 503\ntelegram_unavailable where the bot is not set up.","operationId":"request_telegram_sign_in_api_v1_auth_telegram_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramSignIn"}}}}}}},"/api/v1/auth/telegram/verify":{"post":{"tags":["auth"],"summary":"Verify Telegram Sign In","description":"The session once the person confirmed in the bot, once: the chat's account, else\nthe number's, else a new one with the number verified and the bot linked. 409\nsign_in_pending until then; 401 invalid_sign_in_token for a token unknown, used or\ndead; 403 user_blocked; 403 sign_in_by_email_required for an admin.","operationId":"verify_telegram_sign_in_api_v1_auth_telegram_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramSignInVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/email/start":{"post":{"tags":["auth"],"summary":"Start Adding Email","description":"E-mail an 8-symbol code (30 min, one use) and its link to\n`/settings/email?token=<code>`, to add the address to an account that has none. 202\nwhoever has the address. 409 email_already_set for an account with an e-mail; 429\ntoo_many_codes past one letter a minute or ten a day (`details.limit`,\n`Retry-After`); 503 mail_unavailable: retry at once, it counted for nothing. Outside\nproduction `GET /developer/magic-links/{email}` returns the code.","operationId":"start_adding_email_api_v1_auth_email_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStartRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/email/verify":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Trade the letter's code, typed any way, for the account with its new e-mail. 400\ninvalid_code when it is wrong, used, dead or another account's; 409 email_taken when\nanother account has the address; 409 email_already_set.","operationId":"verify_email_api_v1_auth_email_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/oauth-requests/{request_id}":{"get":{"tags":["auth"],"summary":"Get Oauth Request","description":"The client asking to act for the user, and where its answer goes. 404\noauth_request_not_found once expired (ten minutes) or answered.","operationId":"get_oauth_request_api_v1_auth_oauth_requests__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oauth-requests/{request_id}/approve":{"post":{"tags":["auth"],"summary":"Approve Oauth Request","description":"Let the client act for the signed-in user, in the user's role; send the browser to\n`redirect_to`, which carries a one-time code for the client.","operationId":"approve_oauth_request_api_v1_auth_oauth_requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentAnswer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oauth-requests/{request_id}/deny":{"post":{"tags":["auth"],"summary":"Deny Oauth Request","description":"Refuse the client; send the browser to `redirect_to`, which tells it so.","operationId":"deny_oauth_request_api_v1_auth_oauth_requests__request_id__deny_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentAnswer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/providers/push-key":{"get":{"tags":["providers"],"summary":"Get Push Key","description":"The VAPID public key to subscribe with (`applicationServerKey`). 503\npush_unavailable where web push is not set up.","operationId":"get_push_key_api_v1_providers_push_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushKey"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/providers/push-subscriptions":{"post":{"tags":["providers"],"summary":"Subscribe To Pushes","description":"Store this browser's push subscription (`PushSubscription.toJSON()`): your order\nevents reach it. Subscribing again is harmless; an endpoint another account stored\nmoves to you.","operationId":"subscribe_to_pushes_api_v1_providers_push_subscriptions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["providers"],"summary":"Unsubscribe From Pushes","description":"Forget this browser's subscription; one you do not hold is left alone.","operationId":"unsubscribe_from_pushes_api_v1_providers_push_subscriptions_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushEndpoint"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/providers/telegram/link":{"post":{"tags":["providers"],"summary":"Link Telegram","description":"A deep link to the bot, alive 24 hours: opening it and pressing Start links that\nchat to your account, which then gets your order events. A chat you linked before is\nreplaced. 503 telegram_unavailable where the bot is not set up.","operationId":"link_telegram_api_v1_providers_telegram_link_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramLink"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/providers/telegram":{"delete":{"tags":["providers"],"summary":"Unlink Telegram","description":"Stop sending your order events to Telegram; harmless when no chat is linked.","operationId":"unlink_telegram_api_v1_providers_telegram_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/providers/telegram/phone":{"post":{"tags":["providers"],"summary":"Ask Telegram For Phone","description":"The bot sends your linked chat a button that shares your Telegram number; pressing\nit verifies that number on your account, as a code would (409 phone_taken rules\napply, and the bot says so). 409 telegram_not_linked without a chat (or when it\nblocked the bot); 503 telegram_unavailable when the bot is off or Telegram fails.","operationId":"ask_telegram_for_phone_api_v1_providers_telegram_phone_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/providers/telegram/webhook":{"post":{"tags":["providers"],"summary":"Telegram Webhook","description":"Telegram's updates for the bot; 401 without the secret header it was registered\nwith. Every accepted update answers 200, since Telegram repeats anything else; the\nbot's reply rides in the response. Plain text of a private chat goes to the assistant\nafter the 200, and its answer is sent as a message of its own (assistant.md §3); so\ndoes a button pressed under a new order's notification (notifications.md §6).\nThe connection opens only for a message the bot answers, as an MCP tool opens its own:\nTelegram also posts updates the bot ignores.","operationId":"telegram_webhook_api_v1_providers_telegram_webhook_post","parameters":[{"name":"x-telegram-bot-api-secret-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Telegram-Bot-Api-Secret-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Reply"},{"type":"null"}],"title":"Response Telegram Webhook Api V1 Providers Telegram Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/wards":{"get":{"tags":["client"],"summary":"List My Wards","description":"The caller's own ward cards; nobody else ever sees this list.","operationId":"list_my_wards_api_v1_client_wards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Ward"},"type":"array","title":"Response List My Wards Api V1 Client Wards Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["client"],"summary":"Create Ward","description":"A ward card: date of birth required; names, phone and conditions (Ukrainian) optional.","operationId":"create_ward_api_v1_client_wards_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WardFields"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ward"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/client/wards/{ward_id}":{"get":{"tags":["client"],"summary":"Get Ward","operationId":"get_ward_api_v1_client_wards__ward_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ward Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ward"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["client"],"summary":"Change Ward","description":"Change the fields present; null clears an optional one.","operationId":"change_ward_api_v1_client_wards__ward_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ward Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WardPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ward"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["client"],"summary":"Delete Ward","description":"Delete the card from your list and new orders. Orders that name the ward keep it.","operationId":"delete_ward_api_v1_client_wards__ward_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ward Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/orders":{"get":{"tags":["client"],"summary":"List My Orders","description":"Your orders, newest first.","operationId":"list_my_orders_api_v1_client_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClientOrder"},"type":"array","title":"Response List My Orders Api V1 Client Orders Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["client"],"summary":"Create Order","description":"Order a published profile for one or more of your wards, from `starts_on` to\n`ends_on` (a year at most; the same day for a one-off visit) in the weekly slots of\n`schedule`. The message (Ukrainian) goes to the caregiver as written. 403\nstaff_cannot_order for an account with the caregiver, agency or admin right and for\nthe super admin: staff send no order (`can_order` on `GET /auth/me` is false).","operationId":"create_order_api_v1_client_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/client/orders/{order_id}":{"get":{"tags":["client"],"summary":"Get Order","description":"One of your orders; the caregiver's phone and e-mail once it is accepted.","operationId":"get_order_api_v1_client_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/orders/{order_id}/withdraw":{"post":{"tags":["client"],"summary":"Withdraw Order","description":"Take back an order the caregiver has not answered yet.","operationId":"withdraw_order_api_v1_client_orders__order_id__withdraw_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/orders/{order_id}/complete":{"post":{"tags":["client"],"summary":"Complete Order","description":"Mark an accepted order done; then you can review the caregiver. An order past its\nend date completes by itself overnight.","operationId":"complete_order_api_v1_client_orders__order_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/orders/{order_id}/cancel":{"post":{"tags":["client"],"summary":"Cancel Order","description":"Cancel an accepted order (a pending one is withdrawn instead).","operationId":"cancel_order_api_v1_client_orders__order_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/orders/{order_id}/review":{"post":{"tags":["client"],"summary":"Review Order","description":"Review the caregiver of a completed order, once: 1–5 stars and optional text. The\ntext is moderated; a published review counts in the profile's rating at once, one the\nmodel is unsure about waits as `pending_moderation`.","operationId":"review_order_api_v1_client_orders__order_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/caregiver/profile":{"get":{"tags":["caregiver"],"summary":"Get My Profile","description":"My profile in any status, with districts and weekly schedule: my own, or the\nagency's profile that names me by e-mail or phone (then `agency_id` is set).","operationId":"get_my_profile_api_v1_caregiver_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["caregiver"],"summary":"Create My Profile","description":"Create my profile as a draft (409 profile_exists when I have one, also through an\nagency): only `display_name` is required now. Districts belong\nto `city_code` (codes from `GET /public/places`); no districts means the whole city.\nSchedule slots are \"HH:MM\", 1 = Monday, `24:00` ends at midnight. Text in Ukrainian.","operationId":"create_my_profile_api_v1_caregiver_profile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileFields"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["caregiver"],"summary":"Change My Profile","description":"Change the fields present; `districts` and `schedule` are replaced as a whole. A new\n`city_code` without `districts` serves the whole new city.","operationId":"change_my_profile_api_v1_caregiver_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/caregiver/profile/publish":{"post":{"tags":["caregiver"],"summary":"Publish My Profile","description":"Publish my profile: needs a verified phone, then a city, ward ages, a schedule, a date\nof birth and a gender (422 profile_incomplete lists what is missing) and a caregiver of 18\nor older (422 caregiver_underage). Contact details in the text reject it;\nthen the model decides: approved -> published (and embedded for search), rejected,\nor pending_moderation for a human. 503 ai_unavailable changes nothing: retry. Any\nlater edit takes the profile back to draft until it is published again.","operationId":"publish_my_profile_api_v1_caregiver_profile_publish_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/caregiver/profile/photo":{"post":{"tags":["caregiver"],"summary":"Upload My Photo","description":"Set my photo: the body is a JPEG or PNG up to 2 MB (413 photo_too_large, 415\nnot_an_image). A vision model lets it through only when it shows a person, a face or\nsomeone clothed (422 photo_rejected with categories). It replaces the old one; the\nprofile's status stays as it is. 503 ai_unavailable or media_unavailable: retry.","operationId":"upload_my_photo_api_v1_caregiver_profile_photo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["caregiver"],"summary":"Delete My Photo","description":"Remove my photo; the card shows initials instead.","operationId":"delete_my_photo_api_v1_caregiver_profile_photo_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/caregiver/profile/leave":{"get":{"tags":["caregiver"],"summary":"List My Leave","description":"My periods of leave, by start.","operationId":"list_my_leave_api_v1_caregiver_profile_leave_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Leave"},"type":"array","title":"Response List My Leave Api V1 Caregiver Profile Leave Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["caregiver"],"summary":"Add My Leave","description":"Add a period of leave, an hour to a year long, not over yet. Times are the\nclock in Kyiv, with no offset. Search leaves me out and orders over it cannot be accepted.","operationId":"add_my_leave_api_v1_caregiver_profile_leave_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leave"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/caregiver/profile/leave/{leave_id}":{"delete":{"tags":["caregiver"],"summary":"Delete My Leave","operationId":"delete_my_leave_api_v1_caregiver_profile_leave__leave_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"leave_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Leave Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/caregiver/orders":{"get":{"tags":["caregiver"],"summary":"List Orders","description":"Orders for the profiles you answer for, newest first.","operationId":"list_orders_api_v1_caregiver_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CaregiverOrder"},"type":"array","title":"Response List Orders Api V1 Caregiver Orders Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/caregiver/orders/{order_id}":{"get":{"tags":["caregiver"],"summary":"Get Order","description":"The order with each ward's whole card and other caregivers' reviews of the ward;\nthe wards' phones and the client's contacts once you accept.","operationId":"get_order_api_v1_caregiver_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/caregiver/orders/{order_id}/accept":{"post":{"tags":["caregiver"],"summary":"Accept Order","description":"Accept a pending order. Refused (409 slot_taken) when a slot comes within 30 minutes of another accepted order on a day both cover, or meets your leave.","operationId":"accept_order_api_v1_caregiver_orders__order_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/caregiver/orders/{order_id}/decline":{"post":{"tags":["caregiver"],"summary":"Decline Order","description":"Decline a pending order.","operationId":"decline_order_api_v1_caregiver_orders__order_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/caregiver/orders/{order_id}/cancel":{"post":{"tags":["caregiver"],"summary":"Cancel Order","description":"Cancel an accepted order.","operationId":"cancel_order_api_v1_caregiver_orders__order_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/caregiver/orders/{order_id}/wards/{ward_id}/review":{"post":{"tags":["caregiver"],"summary":"Review Ward","description":"Review a ward of a completed order, once: 1–5 stars and optional text, moderated.\nOnly caregivers and agencies read it, on later orders of the ward.","operationId":"review_ward_api_v1_caregiver_orders__order_id__wards__ward_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"ward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ward Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency":{"get":{"tags":["agency"],"summary":"Get My Agency","operationId":"get_my_agency_api_v1_agency_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agency"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["agency"],"summary":"Create My Agency","description":"Create the agency of this account (one per agency user), as a draft.","operationId":"create_my_agency_api_v1_agency_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyFields"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agency"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["agency"],"summary":"Change My Agency","description":"Change the fields present. An edit takes a published card back to draft; one that\nchanges nothing, or only `website_url`, keeps its status. `website_url` (http or https,\nup to 200 characters; null clears it) is answered to the owner only, never public.","operationId":"change_my_agency_api_v1_agency_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agency"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agency/logo":{"post":{"tags":["agency"],"summary":"Upload My Logo","description":"Set the agency's logo: the body is the image, a JPEG or a PNG up to 2 MB, with its\nContent-Type. A vision model checks it as a logo (no nudity, violence or contact\ndetails; no person needed); an unsure answer is a refusal. It replaces the old one and\nkeeps the card's status. 404 agency_not_found before the card; otherwise the errors of\n`POST /caregiver/profile/photo`.","operationId":"upload_my_logo_api_v1_agency_logo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logo"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["agency"],"summary":"Delete My Logo","operationId":"delete_my_logo_api_v1_agency_logo_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logo"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agency/publish":{"post":{"tags":["agency"],"summary":"Publish My Agency","description":"Publish the agency's card: its name and description pass the profile rules (no\ncontacts, places or prices in them), then the model. Published, rejected with the\ncategories, or held for an admin (`pending_moderation`). 503 ai_unavailable: retry.\nEditing the card takes it back to draft.","operationId":"publish_my_agency_api_v1_agency_publish_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyPublication"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agency/profiles":{"get":{"tags":["agency"],"summary":"List Agency Profiles","description":"The agency's caregiver profiles in any status, oldest first.","operationId":"list_agency_profiles_api_v1_agency_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Profile"},"type":"array","title":"Response List Agency Profiles Api V1 Agency Profiles Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["agency"],"summary":"Create Agency Profile","description":"A caregiver profile of this agency, as a draft; same fields and rules as\n`POST /caregiver/profile`. Needs the agency first (409 agency_required).\n`caregiver_email` and `caregiver_phone` are optional and never public; one person has\none profile, so a contact another profile or an existing user has is 409\nemail_taken / phone_taken. The caregiver signed in with that e-mail or that phone\nmanages the profile too, through `/caregiver/profile`.","operationId":"create_agency_profile_api_v1_agency_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyProfileFields"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agency/profiles/{profile_id}":{"get":{"tags":["agency"],"summary":"Get Agency Profile","operationId":"get_agency_profile_api_v1_agency_profiles__profile_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agency"],"summary":"Change Agency Profile","description":"Change the fields present; same rules as `PATCH /caregiver/profile`, and the\ncontacts' rules of `POST /agency/profiles` (null clears one).","operationId":"change_agency_profile_api_v1_agency_profiles__profile_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/profiles/{profile_id}/publish":{"post":{"tags":["agency"],"summary":"Publish Agency Profile","description":"Publish one of the agency's profiles; the agency account's phone must be verified.\nSame checks and outcomes as `POST /caregiver/profile/publish`.","operationId":"publish_agency_profile_api_v1_agency_profiles__profile_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/profiles/{profile_id}/photo":{"post":{"tags":["agency"],"summary":"Upload Agency Photo","description":"Set the photo of one of the agency's caregivers; same body, check and outcomes as\n`POST /caregiver/profile/photo`.","operationId":"upload_agency_photo_api_v1_agency_profiles__profile_id__photo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agency"],"summary":"Delete Agency Photo","operationId":"delete_agency_photo_api_v1_agency_profiles__profile_id__photo_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/profiles/{profile_id}/leave":{"get":{"tags":["agency"],"summary":"List Leave","description":"The profile's periods of leave, by start.","operationId":"list_leave_api_v1_agency_profiles__profile_id__leave_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Leave"},"title":"Response List Leave Api V1 Agency Profiles  Profile Id  Leave Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agency"],"summary":"Add Leave","description":"Add a period of leave to one of the agency's profiles, an hour to a year long, not\nover yet. Times are the clock in Kyiv, with no offset.","operationId":"add_leave_api_v1_agency_profiles__profile_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leave"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/profiles/{profile_id}/leave/{leave_id}":{"delete":{"tags":["agency"],"summary":"Delete Leave","operationId":"delete_leave_api_v1_agency_profiles__profile_id__leave__leave_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"leave_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Leave Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/orders":{"get":{"tags":["agency"],"summary":"List Orders","description":"Orders for the profiles you answer for, newest first.","operationId":"list_orders_api_v1_agency_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CaregiverOrder"},"type":"array","title":"Response List Orders Api V1 Agency Orders Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agency/orders/{order_id}":{"get":{"tags":["agency"],"summary":"Get Order","description":"The order with each ward's whole card and other caregivers' reviews of the ward;\nthe wards' phones and the client's contacts once you accept.","operationId":"get_order_api_v1_agency_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/orders/{order_id}/accept":{"post":{"tags":["agency"],"summary":"Accept Order","description":"Accept a pending order. Refused (409 slot_taken) when a slot comes within 30 minutes of another accepted order on a day both cover, or meets your leave.","operationId":"accept_order_api_v1_agency_orders__order_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/orders/{order_id}/decline":{"post":{"tags":["agency"],"summary":"Decline Order","description":"Decline a pending order.","operationId":"decline_order_api_v1_agency_orders__order_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/orders/{order_id}/cancel":{"post":{"tags":["agency"],"summary":"Cancel Order","description":"Cancel an accepted order.","operationId":"cancel_order_api_v1_agency_orders__order_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaregiverOrder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agency/orders/{order_id}/wards/{ward_id}/review":{"post":{"tags":["agency"],"summary":"Review Ward","description":"Review a ward of a completed order, once: 1–5 stars and optional text, moderated.\nOnly caregivers and agencies read it, on later orders of the ward.","operationId":"review_ward_api_v1_agency_orders__order_id__wards__ward_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"ward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ward Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users":{"get":{"tags":["admin"],"summary":"Find Users","description":"Users newest first, 50 a page: `q` in the e-mail, phone or name; holding `right`.","operationId":"find_users_api_v1_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"right","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Right"},{"type":"null"}],"title":"Right"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","blocked"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Register Caregiver","description":"Register a caregiver by phone: the account has the number verified, the name and the\ncaregiver right. No code or message goes to the number; the person signs in by it later\nand meets the onboarding wizard. 409 phone_taken for a number an account or an agency's\nprofile has.","operationId":"register_caregiver_api_v1_admin_users_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCaregiver"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/candidates":{"post":{"tags":["admin"],"summary":"Import Candidate","description":"Import a `dohliad.candidate/1` record in one step: the account as POST /admin/users\nmakes it, with `profile.gender`, and its card as a draft filled from `profile`, with the\nphoto from `photo` (base64). Not published: the admin reads the card and publishes it.\n422 candidate_incomplete (`details.missing`) for a record without what publishing needs;\n409 phone_taken, also for the same record again; the photo's and the card's own\nrefusals. Any refusal stores nothing.","operationId":"import_candidate_api_v1_admin_candidates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateRecord"},"examples":{"sample":{"summary":"A sample record","value":{"schema":"dohliad.candidate/1","contact":{"phone":"+380671112233"},"profile":{"display_name":"Оксана","gender":"female","birth_date":"1971-03-14","bio":"Працюю з дітьми понад тридцять років, останні шість — няня.","care_types":["childcare"],"city_code":"kyiv","districts":["kyiv-obolonskyi","kyiv-podilskyi"],"hourly_rate_uah":300,"ward_age_min":3,"ward_age_max":7,"schedule":[{"weekday":1,"starts_at":"14:00","ends_at":"20:00"}]},"note":"Знайшли за номером у Telegram 15.11.\nПеревірити диплом вихователя."}}}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"Get User","operationId":"get_user_api_v1_admin_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin"],"summary":"Change User","description":"Give or take the caregiver and agency rights; change the name and the gender. Taking\na right declines the pending orders of the profiles it held. Not for yourself, other\nadmins or the super admin.","operationId":"change_user_api_v1_admin_users__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete User","description":"The super admin only: delete the user for good, with their profiles, agency, wards,\norders and reviews, the orders and reviews others made for their profiles, and the log\nof admin actions by and on them. It cannot be undone; the same e-mail or phone may sign\nin again as a new account. Not for yourself (`forbidden_target`).","operationId":"delete_user_api_v1_admin_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/phone":{"put":{"tags":["admin"],"summary":"Set Phone","description":"Set the user's phone, verified at once with no code: you vouch for the number. It\nreplaces the old one, which no longer signs in; live sessions stay. 409 phone_taken as\nthe user's own verification would answer. Not for yourself, other admins or the super\nadmin.","operationId":"set_phone_api_v1_admin_users__user_id__phone_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/note":{"get":{"tags":["admin"],"summary":"Get Note","description":"The admins' note on the user, when and by whom it was last saved; all null for no\nnote. The user never sees it. Not for yourself, other admins or the super admin.","operationId":"get_note_api_v1_admin_users__user_id__note_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNote"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Put Note","description":"Replace the note whole: up to 1024 characters, trimmed at the ends; an empty text\nremoves it. The last save wins. Logged as `edit_note`, without the text.","operationId":"put_note_api_v1_admin_users__user_id__note_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNote"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/block":{"post":{"tags":["admin"],"summary":"Block","description":"The user can no longer sign in; the refusal names your e-mail as the contact. Their\nprofiles leave search; pending orders for them are declined, theirs withdrawn.","operationId":"block_api_v1_admin_users__user_id__block_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/unblock":{"post":{"tags":["admin"],"summary":"Unblock","operationId":"unblock_api_v1_admin_users__user_id__unblock_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/admin":{"put":{"tags":["admin"],"summary":"Give Admin","description":"The super admin only: give the admin right.","operationId":"give_admin_api_v1_admin_users__user_id__admin_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Take Admin","description":"The super admin only: take the admin right; it stops working at once.","operationId":"take_admin_api_v1_admin_users__user_id__admin_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/actions":{"get":{"tags":["admin"],"summary":"Actions","description":"Every admin action, newest first, 50 a page.","operationId":"actions_api_v1_admin_actions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/moderation":{"get":{"tags":["admin"],"summary":"Held Texts","description":"Profiles, reviews, ward reviews and agency cards the model was unsure about, oldest\nfirst (up to 100).","operationId":"held_texts_api_v1_admin_moderation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldPage"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/moderation/{kind}/{subject_id}/publish":{"post":{"tags":["admin"],"summary":"Publish Held","description":"Publish a held text. A profile is embedded for search first; a review counts in the\ncaregiver's rating at once. 404 not_held when it does not wait.","operationId":"publish_held_api_v1_admin_moderation__kind___subject_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["caregiver_profile","review","ward_review","agency"],"type":"string","title":"Kind"}},{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decided"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/moderation/{kind}/{subject_id}/reject":{"post":{"tags":["admin"],"summary":"Reject Held","description":"Reject a held text; its owner sees it rejected and may edit and try again.","operationId":"reject_held_api_v1_admin_moderation__kind___subject_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["caregiver_profile","review","ward_review","agency"],"type":"string","title":"Kind"}},{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decided"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/profile":{"get":{"tags":["admin"],"summary":"Get Card","description":"The user's caregiver profile, as GET /caregiver/profile gives it to them; 404\nprofile_not_found when they have none.","operationId":"get_card_api_v1_admin_users__user_id__profile_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Card","description":"Create the user's profile as a draft, as POST /caregiver/profile does; 409\nprofile_exists when they have one, also through an agency.","operationId":"create_card_api_v1_admin_users__user_id__profile_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileFields"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin"],"summary":"Change Card","description":"Change the fields present, as PATCH /caregiver/profile does: a published card goes\nback to draft until it is published again.","operationId":"change_card_api_v1_admin_users__user_id__profile_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/profile/publish":{"post":{"tags":["admin"],"summary":"Publish Card","description":"Publish the user's profile with the owner's requirements, moderation and embedding,\nas POST /caregiver/profile/publish does: 403 phone_not_verified without the user's\nverified phone, 422 profile_incomplete naming what the card misses.","operationId":"publish_card_api_v1_admin_users__user_id__profile_publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/profile/photo":{"post":{"tags":["admin"],"summary":"Upload Card Photo","description":"Set the user's photo, as POST /caregiver/profile/photo does: a JPEG or PNG up to 2 MB\nthat the same check lets through.","operationId":"upload_card_photo_api_v1_admin_users__user_id__profile_photo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Card Photo","description":"Remove the user's photo; the card shows initials instead.","operationId":"delete_card_photo_api_v1_admin_users__user_id__profile_photo_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assistant/chat/completions":{"post":{"tags":["assistant"],"summary":"Chat Completions","description":"Send the whole conversation (`system`, `user`, `assistant` messages, the user's last;\n40 at most, 16 000 characters in all); the backend keeps none of it. The model reads\nit, does what it asks at once with your rights (search; wards, orders and reviews; with\nthe caregiver right your profile, leave and orders) and answers in text. `actions`\nlists every operation that changed something or was refused, with the API's error\nbody. `finish_reason` is `length` when the model was stopped after six calls. The\nserver chooses the model: `model`, `stream` or any other field is 422. 429\nassistant_limit_reached past the day's messages (`details.limit`,\n`details.retry_after_seconds`, `Retry-After`); 503 ai_unavailable: retry.","operationId":"chat_completions_api_v1_assistant_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/developer/sessions":{"post":{"tags":["developer"],"summary":"Create Session","description":"Sign in as any user, created with `rights` (caregiver, agency; never admin) if none\nmatches. Needs `X-Dev-Key`.","operationId":"create_session_api_v1_developer_sessions_post","parameters":[{"name":"x-dev-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dev-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/magic-links/{email}":{"get":{"tags":["developer"],"summary":"Magic Link","description":"The newest live magic-link token sent to `email`.","operationId":"magic_link_api_v1_developer_magic_links__email__get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}},{"name":"x-dev-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dev-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevMagicLink"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/otp/{phone}":{"get":{"tags":["developer"],"summary":"Phone Code","description":"The newest live verification code sent to `phone` (E.164, `+` encoded as `%2B`).","operationId":"phone_code_api_v1_developer_otp__phone__get","parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"x-dev-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dev-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevPhoneCode"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/moderate":{"post":{"tags":["developer"],"summary":"Moderate","description":"Run the rules and the model on a text and show both verdicts; nothing is stored.\nFor tuning moderation (infra/evaluate_moderation.py).","operationId":"moderate_api_v1_developer_moderate_post","parameters":[{"name":"x-dev-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dev-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/profiles/{profile_id}/hold":{"post":{"tags":["developer"],"summary":"Hold Profile","description":"Hold a profile for the admin's moderation queue, as the model does when unsure, so\nthe queue can be tried without an unsure verdict.","operationId":"hold_profile_api_v1_developer_profiles__profile_id__hold_post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"x-dev-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dev-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/seed":{"post":{"tags":["developer"],"summary":"Load Seed","description":"Replace the Ukrainian sample data: caregivers in every launch city, three agencies,\nclients with wards (users at seed.example.com; sign in as any with `POST /sessions`).\nEvery card is validated, moderated and embedded like a real one, so this takes a\nwhile; the report shows each card's outcome.","operationId":"load_seed_api_v1_developer_seed_post","parameters":[{"name":"x-dev-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dev-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/service/health":{"get":{"tags":["service"],"summary":"Health","operationId":"health_api_v1_service_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/service/cleanup":{"post":{"tags":["service"],"summary":"Run Cleanup","description":"Delete dead tokens and MCP clients that never exchanged a code a day after they\nregistered, and complete accepted orders past their end date; a systemd timer\ncalls this nightly (deployment.md §2). Open to anyone: it only does what is due anyway, so an\nextra call is harmless.","operationId":"run_cleanup_api_v1_service_cleanup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupReport"}}}}}}}},"components":{"schemas":{"AccountSettings":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"caregiver":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Caregiver"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"onboarded":{"anyOf":[{"type":"boolean","const":true},{"type":"null"}],"title":"Onboarded"}},"type":"object","title":"AccountSettings","description":"What the user changes in their own account; a field left out stays as it is."},"Action":{"properties":{"tool":{"type":"string","title":"Tool"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"},"ok":{"type":"boolean","title":"Ok"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"}},"type":"object","required":["tool","arguments","ok","error"],"title":"Action","description":"An operation that changed something or was refused; `error` is the API's own error\nbody, so the app refreshes what changed without reading the text."},"ActionPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LoggedAction"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ActionPage"},"AdminAction":{"type":"string","enum":["block","unblock","grant_caregiver","revoke_caregiver","grant_agency","revoke_agency","grant_admin","revoke_admin","publish","reject","edit_user","set_phone","create_user","edit_profile","publish_profile","edit_note"],"title":"AdminAction","description":"`admin_actions.action`."},"Agency":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":3000,"title":"Description","default":""},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"website_url":{"anyOf":[{"type":"string","maxLength":200,"pattern":"^https?://[^/?#\\s]+"},{"type":"null"}],"title":"Website Url"},"id":{"type":"string","format":"uuid","title":"Id"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"status":{"$ref":"#/components/schemas/ProfileStatus"}},"type":"object","required":["name","id","status"],"title":"Agency"},"AgencyFields":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":3000,"title":"Description","default":""},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"website_url":{"anyOf":[{"type":"string","maxLength":200,"pattern":"^https?://[^/?#\\s]+"},{"type":"null"}],"title":"Website Url"}},"type":"object","required":["name"],"title":"AgencyFields"},"AgencyPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}],"title":"Description"},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"website_url":{"anyOf":[{"type":"string","maxLength":200,"pattern":"^https?://[^/?#\\s]+"},{"type":"null"}],"title":"Website Url"}},"additionalProperties":false,"type":"object","title":"AgencyPatch","description":"Only the fields present change; null clears `city_code` and `website_url`."},"AgencyProfileFields":{"properties":{"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name"},"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"type":"string","maxLength":3000,"title":"Bio","default":""},"care_types":{"items":{"$ref":"#/components/schemas/CareType"},"type":"array","title":"Care Types","default":[]},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Districts","default":[]},"hourly_rate_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer","maximum":80.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"languages":{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array","title":"Languages","default":[]},"education":{"items":{"$ref":"#/components/schemas/Education"},"type":"array","title":"Education","default":[]},"ward_age_min":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Accepted","default":[]},"conditions_refused":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Refused","default":[]},"extras":{"$ref":"#/components/schemas/Extras","default":{"own_transport":false,"first_aid_certificate":false,"non_smoker":false}},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","maxItems":50,"title":"Schedule","default":[]},"caregiver_email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Caregiver Email"},"caregiver_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Caregiver Phone"}},"type":"object","required":["display_name"],"title":"AgencyProfileFields","description":"An agency's caregiver profile: the card plus the caregiver's optional contacts.\nNever public; no two profiles and no existing user share them; a caregiver signed in\nwith either manages the profile too (spec-v1.md §2.4)."},"AgencyProfilePatch":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}],"title":"Bio"},"care_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/CareType"},"type":"array"},{"type":"null"}],"title":"Care Types"},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Districts"},"hourly_rate_uah":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Experience Years"},"languages":{"anyOf":[{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array"},{"type":"null"}],"title":"Languages"},"education":{"anyOf":[{"items":{"$ref":"#/components/schemas/Education"},"type":"array"},{"type":"null"}],"title":"Education"},"ward_age_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Conditions Accepted"},"conditions_refused":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Conditions Refused"},"extras":{"anyOf":[{"$ref":"#/components/schemas/Extras"},{"type":"null"}]},"schedule":{"anyOf":[{"items":{"$ref":"#/components/schemas/Slot"},"type":"array"},{"type":"null"}],"title":"Schedule"},"caregiver_email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Caregiver Email"},"caregiver_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Caregiver Phone"}},"additionalProperties":false,"type":"object","title":"AgencyProfilePatch","description":"ProfilePatch plus the contacts; null clears them."},"AgencyPublication":{"properties":{"agency":{"$ref":"#/components/schemas/Agency"},"decision":{"$ref":"#/components/schemas/Decision"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"}},"type":"object","required":["agency","decision","categories"],"title":"AgencyPublication","description":"The card after publishing: published, rejected (with the categories) or held."},"AssistantMessage":{"properties":{"role":{"type":"string","const":"assistant","title":"Role","default":"assistant"},"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"AssistantMessage"},"CallbackQuery":{"properties":{"id":{"type":"string","title":"Id"},"from":{"$ref":"#/components/schemas/Sender"},"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"}},"type":"object","required":["id","from"],"title":"CallbackQuery","description":"A button under a message of the bot pressed (notifications.md §6). Telegram gives\nthe message without its text once it is too old to reach."},"CandidateContact":{"properties":{"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Phone"}},"type":"object","title":"CandidateContact"},"CandidatePhoto":{"properties":{"mime_type":{"type":"string","enum":["image/jpeg","image/png"],"title":"Mime Type"},"data":{"type":"string","format":"base64","contentMediaType":"application/octet-stream","title":"Data"}},"type":"object","required":["mime_type","data"],"title":"CandidatePhoto","description":"The photo inline, as a Google API carries media: its type and the file in base64."},"CandidateProfile":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"type":"string","maxLength":3000,"title":"Bio","default":""},"care_types":{"items":{"$ref":"#/components/schemas/CareType"},"type":"array","title":"Care Types","default":[]},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Districts","default":[]},"hourly_rate_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer","maximum":80.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"languages":{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array","title":"Languages","default":[]},"education":{"items":{"$ref":"#/components/schemas/Education"},"type":"array","title":"Education","default":[]},"ward_age_min":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Accepted","default":[]},"conditions_refused":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Refused","default":[]},"extras":{"$ref":"#/components/schemas/Extras","default":{"own_transport":false,"first_aid_certificate":false,"non_smoker":false}},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","maxItems":50,"title":"Schedule","default":[]}},"type":"object","title":"CandidateProfile","description":"The card's fields as POST /caregiver/profile takes them, the name optional too."},"CandidateRecord":{"properties":{"schema":{"type":"string","const":"dohliad.candidate/1","title":"Schema"},"contact":{"$ref":"#/components/schemas/CandidateContact","default":{}},"profile":{"$ref":"#/components/schemas/CandidateProfile","default":{"bio":"","care_types":[],"districts":[],"languages":[],"education":[],"conditions_accepted":[],"conditions_refused":[],"extras":{"first_aid_certificate":false,"non_smoker":false,"own_transport":false},"schedule":[]}},"photo":{"anyOf":[{"$ref":"#/components/schemas/CandidatePhoto"},{"type":"null"}],"description":"Optional; checked as the card editor checks a photo"},"note":{"type":"string","maxLength":1024,"title":"Note","description":"Optional; the admins' note on her, as PUT /admin/users/{id}/note takes it","default":""}},"type":"object","required":["schema"],"title":"CandidateRecord"},"CareType":{"type":"string","enum":["childcare","elderly_care","special_needs","housekeeping_light"],"title":"CareType"},"CaregiverOrder":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/OrderStatus"},"cancelled_by":{"anyOf":[{"$ref":"#/components/schemas/Side"},{"type":"null"}]},"profile_id":{"type":"string","format":"uuid","title":"Profile Id"},"profile_name":{"type":"string","title":"Profile Name"},"message":{"type":"string","title":"Message"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"type":"string","format":"date","title":"Ends On"},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","title":"Schedule"},"wards":{"items":{"$ref":"#/components/schemas/OrderWard"},"type":"array","title":"Wards"},"client_contacts":{"anyOf":[{"$ref":"#/components/schemas/Contacts"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","cancelled_by","profile_id","profile_name","message","starts_on","ends_on","schedule","wards","client_contacts","created_at"],"title":"CaregiverOrder","description":"The caregiver's (or agency's) view: ward cards, the client's contacts once accepted."},"Chat":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"}},"type":"object","required":["id","type"],"title":"Chat"},"ChatCompletion":{"properties":{"choices":{"items":{"$ref":"#/components/schemas/Choice"},"type":"array","title":"Choices"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"}},"type":"object","required":["choices","actions"],"title":"ChatCompletion"},"ChatMessage":{"properties":{"role":{"type":"string","enum":["system","user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":16000,"title":"Content"}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","maxItems":40,"minItems":1,"title":"Messages"}},"additionalProperties":false,"type":"object","required":["messages"],"title":"ChatRequest","description":"The whole conversation, every time: the backend keeps none of it. The server chooses\nthe model, so `model`, `stream` and any other field are refused."},"Choice":{"properties":{"index":{"type":"integer","const":0,"title":"Index","default":0},"message":{"$ref":"#/components/schemas/AssistantMessage"},"finish_reason":{"type":"string","enum":["stop","length"],"title":"Finish Reason","description":"`length` when the model was stopped after six calls for one message"}},"type":"object","required":["message","finish_reason"],"title":"Choice"},"City":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"districts":{"items":{"$ref":"#/components/schemas/District"},"type":"array","title":"Districts"}},"type":"object","required":["code","name","districts"],"title":"City"},"CleanupReport":{"properties":{"refresh_tokens":{"type":"integer","title":"Refresh Tokens"},"one_time_tokens":{"type":"integer","title":"One Time Tokens"},"oauth_grants":{"type":"integer","title":"Oauth Grants"},"oauth_refresh_tokens":{"type":"integer","title":"Oauth Refresh Tokens"},"oauth_clients":{"type":"integer","title":"Oauth Clients"},"completed_orders":{"type":"integer","title":"Completed Orders"}},"type":"object","required":["refresh_tokens","one_time_tokens","oauth_grants","oauth_refresh_tokens","oauth_clients","completed_orders"],"title":"CleanupReport","description":"How many dead tokens and unused MCP clients a cleanup deleted, and how many ended\norders it completed."},"ClientOrder":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/OrderStatus"},"cancelled_by":{"anyOf":[{"$ref":"#/components/schemas/Side"},{"type":"null"}]},"profile_id":{"type":"string","format":"uuid","title":"Profile Id"},"profile_name":{"type":"string","title":"Profile Name"},"message":{"type":"string","title":"Message"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"type":"string","format":"date","title":"Ends On"},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","title":"Schedule"},"wards":{"items":{"$ref":"#/components/schemas/Ward"},"type":"array","title":"Wards"},"caregiver_contacts":{"anyOf":[{"$ref":"#/components/schemas/Contacts"},{"type":"null"}]},"review":{"anyOf":[{"$ref":"#/components/schemas/OrderReview"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","cancelled_by","profile_id","profile_name","message","starts_on","ends_on","schedule","wards","caregiver_contacts","review","created_at"],"title":"ClientOrder","description":"The client's view: their own ward cards, the caregiver's contacts once accepted,\nand their review once written, so the app offers the review form only once."},"CodeSent":{"properties":{"retry_after_seconds":{"type":"integer","title":"Retry After Seconds"}},"type":"object","required":["retry_after_seconds"],"title":"CodeSent","description":"How long the number gets no second code: the code's life (auth.md §2). The app\ncounts down from it and offers no resend meanwhile."},"ConsentAnswer":{"properties":{"redirect_to":{"type":"string","title":"Redirect To","description":"Send the browser here: the client's redirect URI"}},"type":"object","required":["redirect_to"],"title":"ConsentAnswer"},"Contact":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["phone_number"],"title":"Contact"},"Contacts":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["phone","email"],"title":"Contacts"},"DatabaseStatus":{"type":"string","enum":["ok","error"],"title":"DatabaseStatus"},"Decided":{"properties":{"type":{"type":"string","enum":["caregiver_profile","review","ward_review","agency"],"title":"Type"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["published","rejected"],"title":"Status"}},"type":"object","required":["type","id","status"],"title":"Decided"},"Decision":{"type":"string","enum":["approved","rejected","needs_review"],"title":"Decision"},"DevMagicLink":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"DevMagicLink"},"DevPhoneCode":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"DevPhoneCode"},"DevSessionRequest":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Phone"},"rights":{"items":{"type":"string","enum":["caregiver","agency"]},"type":"array","title":"Rights","default":[]}},"type":"object","title":"DevSessionRequest","description":"Exactly one of `user_id`, `email`, `phone` names the user; `rights` count on creation\nand never include admin, so the admin API is tried with a real admin."},"District":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["code","name"],"title":"District"},"Education":{"type":"string","enum":["pedagogical","psychological","medical","special_education","foreign_languages"],"title":"Education"},"EmailStartRequest":{"properties":{"email":{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$","title":"Email"}},"type":"object","required":["email"],"title":"EmailStartRequest"},"EmailVerifyRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"EmailVerifyRequest"},"Environment":{"type":"string","enum":["development","test","production"],"title":"Environment"},"Extras":{"properties":{"own_transport":{"type":"boolean","title":"Own Transport","default":false},"first_aid_certificate":{"type":"boolean","title":"First Aid Certificate","default":false},"non_smoker":{"type":"boolean","title":"Non Smoker","default":false}},"additionalProperties":false,"type":"object","title":"Extras"},"Gender":{"type":"string","enum":["female","male"],"title":"Gender"},"Generation":{"type":"string","enum":["silent","boomer","gen_x","gen_y","gen_z","gen_alpha","gen_beta"],"title":"Generation","description":"What a public card shows instead of the date of birth; the frontend has the labels."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"environment":{"$ref":"#/components/schemas/Environment"},"database":{"$ref":"#/components/schemas/DatabaseStatus"},"status":{"type":"string","enum":["ok","degraded"],"title":"Status","description":"Derived, so \"ok\" next to a failing database cannot be written.","readOnly":true}},"type":"object","required":["environment","database","status"],"title":"HealthResponse"},"HeldPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HeldText"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"HeldPage"},"HeldText":{"properties":{"type":{"type":"string","enum":["caregiver_profile","review","ward_review","agency"],"title":"Type"},"id":{"type":"string","format":"uuid","title":"Id"},"text":{"type":"string","title":"Text"},"held_at":{"type":"string","format":"date-time","title":"Held At"}},"type":"object","required":["type","id","text","held_at"],"title":"HeldText","description":"A text the model was unsure about, waiting for an admin (spec-v1.md §3.6)."},"LayerVerdict":{"properties":{"decision":{"$ref":"#/components/schemas/Decision"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"model":{"type":"string","title":"Model"}},"type":"object","required":["decision","categories","model"],"title":"LayerVerdict"},"Leave":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"}},"type":"object","required":["id","starts_at","ends_at"],"title":"Leave"},"LeaveRequest":{"properties":{"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"The clock in Kyiv; no offset"},"ends_at":{"type":"string","format":"date-time","title":"Ends At","description":"An hour to a year after starts_at"}},"type":"object","required":["starts_at","ends_at"],"title":"LeaveRequest"},"LoggedAction":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action":{"$ref":"#/components/schemas/AdminAction"},"admin_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Email"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"subject_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Type"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","action","admin_email","user_id","subject_type","subject_id","created_at"],"title":"LoggedAction"},"Logo":{"properties":{"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["logo_url"],"title":"Logo"},"MagicLinkRequest":{"properties":{"email":{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$","title":"Email"}},"type":"object","required":["email"],"title":"MagicLinkRequest"},"MagicLinkVerifyRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"MagicLinkVerifyRequest"},"ManagedUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"rights":{"items":{"$ref":"#/components/schemas/Right"},"type":"array","title":"Rights"},"status":{"type":"string","enum":["active","blocked"],"title":"Status"},"blocked_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blocked By Email"},"blocked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Blocked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","phone","display_name","gender","rights","status","blocked_by_email","blocked_at","created_at"],"title":"ManagedUser","description":"A user as an admin sees them: contacts, rights, and who blocked them."},"Message":{"properties":{"message_id":{"type":"integer","title":"Message Id"},"chat":{"$ref":"#/components/schemas/Chat"},"from":{"anyOf":[{"$ref":"#/components/schemas/Sender"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"null"}]},"reply_to_message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]}},"type":"object","required":["message_id","chat"],"title":"Message"},"ModerationReport":{"properties":{"rules":{"$ref":"#/components/schemas/LayerVerdict"},"model":{"$ref":"#/components/schemas/LayerVerdict"}},"type":"object","required":["rules","model"],"title":"ModerationReport","description":"Both layers on one text, for tuning: publishing asks the model only when the\nrules pass, this asks it always."},"ModerationRequest":{"properties":{"text":{"type":"string","maxLength":5000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"ModerationRequest"},"NameSuggestion":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["display_name"],"title":"NameSuggestion","description":"A name for the onboarding wizard's field (spec-v1.md §3.8); never stored."},"NewCaregiver":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone"},"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name"}},"type":"object","required":["phone","display_name"],"title":"NewCaregiver","description":"A caregiver an admin registers by phone (spec-v1.md §2.6)."},"NoteChange":{"properties":{"text":{"type":"string","maxLength":1024,"title":"Text"}},"type":"object","required":["text"],"title":"NoteChange","description":"The admins' note on a user, replaced whole; an empty text removes it (spec-v1.md\n§2.7)."},"OAuthRequest":{"properties":{"id":{"type":"string","title":"Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name","description":"As the client registered it; show it"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"redirect_uri":{"type":"string","title":"Redirect Uri","description":"Where the answer goes; show its host"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","client_name","client_uri","redirect_uri","expires_at"],"title":"OAuthRequest","description":"An MCP client's pending request, for the user to approve or deny."},"OAuthSignInRequest":{"properties":{"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["id_token"],"title":"OAuthSignInRequest"},"OrderRequest":{"properties":{"profile_id":{"type":"string","format":"uuid","title":"Profile Id"},"ward_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"minItems":1,"title":"Ward Ids"},"message":{"type":"string","maxLength":2000,"title":"Message","default":""},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"type":"string","format":"date","title":"Ends On","description":"The last day; the same as starts_on for a one-off visit"},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","maxItems":50,"minItems":1,"title":"Schedule"}},"type":"object","required":["profile_id","ward_ids","starts_on","ends_on","schedule"],"title":"OrderRequest"},"OrderReview":{"properties":{"rating":{"type":"integer","title":"Rating"},"status":{"$ref":"#/components/schemas/ReviewStatus"}},"type":"object","required":["rating","status"],"title":"OrderReview","description":"The client's review of an order, as the order shows it."},"OrderStatus":{"type":"string","enum":["pending","accepted","declined","withdrawn","completed","cancelled"],"title":"OrderStatus"},"OrderWard":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"birth_date":{"type":"string","format":"date","title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"age":{"type":"integer","title":"Age"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"patronymic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patronymic"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"conditions":{"items":{"type":"string"},"type":"array","title":"Conditions"},"reviews":{"items":{"$ref":"#/components/schemas/WardReview"},"type":"array","title":"Reviews"},"reviewed":{"type":"boolean","title":"Reviewed","default":false}},"type":"object","required":["id","birth_date","gender","age","first_name","last_name","patronymic","phone","conditions","reviews"],"title":"OrderWard","description":"A ward as the caregiver of an order sees it: the whole card, the phone once the\norder is accepted, the published reviews of other caregivers, and whether this\norder's side has reviewed the ward (one review per ward and order)."},"PhoneChange":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone"}},"type":"object","required":["phone"],"title":"PhoneChange","description":"The number an admin vouches for, having spoken to the person on it (spec-v1.md §2.6)."},"PhoneCodeRequest":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone"}},"type":"object","required":["phone"],"title":"PhoneCodeRequest"},"PhoneCodeVerifyRequest":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone"},"code":{"type":"string","pattern":"^\\d{6}$","title":"Code"}},"type":"object","required":["phone","code"],"title":"PhoneCodeVerifyRequest"},"PhoneStartRequest":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone"}},"type":"object","required":["phone"],"title":"PhoneStartRequest"},"PhoneVerifyRequest":{"properties":{"code":{"type":"string","pattern":"^\\d{6}$","title":"Code"}},"type":"object","required":["code"],"title":"PhoneVerifyRequest"},"Photo":{"properties":{"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","required":["photo_url"],"title":"Photo","description":"A card's photo after an upload or a removal."},"Profile":{"properties":{"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name"},"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"type":"string","maxLength":3000,"title":"Bio","default":""},"care_types":{"items":{"$ref":"#/components/schemas/CareType"},"type":"array","title":"Care Types","default":[]},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Districts","default":[]},"hourly_rate_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer","maximum":80.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"languages":{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array","title":"Languages","default":[]},"education":{"items":{"$ref":"#/components/schemas/Education"},"type":"array","title":"Education","default":[]},"ward_age_min":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Accepted","default":[]},"conditions_refused":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Refused","default":[]},"extras":{"$ref":"#/components/schemas/Extras","default":{"own_transport":false,"first_aid_certificate":false,"non_smoker":false}},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","maxItems":50,"title":"Schedule","default":[]},"id":{"type":"string","format":"uuid","title":"Id"},"agency_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agency Id"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url","description":"The uploaded photo; only the photo routes set it (spec-v1.md §3.1)."},"rating_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating Avg"},"rating_count":{"type":"integer","title":"Rating Count"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At","description":"When the card was first published; never reset."},"status":{"$ref":"#/components/schemas/ProfileStatus"},"caregiver_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caregiver Email"},"caregiver_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caregiver Phone"},"generation":{"anyOf":[{"$ref":"#/components/schemas/Generation"},{"type":"null"}],"readOnly":true}},"type":"object","required":["display_name","id","agency_id","rating_avg","rating_count","status","generation"],"title":"Profile","description":"The owner's view: the public card plus its status and, on an agency's profile,\nthe caregiver's contacts the agency gave (spec-v1.md §2)."},"ProfileFields":{"properties":{"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name"},"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"type":"string","maxLength":3000,"title":"Bio","default":""},"care_types":{"items":{"$ref":"#/components/schemas/CareType"},"type":"array","title":"Care Types","default":[]},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Districts","default":[]},"hourly_rate_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer","maximum":80.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"languages":{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array","title":"Languages","default":[]},"education":{"items":{"$ref":"#/components/schemas/Education"},"type":"array","title":"Education","default":[]},"ward_age_min":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Accepted","default":[]},"conditions_refused":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Refused","default":[]},"extras":{"$ref":"#/components/schemas/Extras","default":{"own_transport":false,"first_aid_certificate":false,"non_smoker":false}},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","maxItems":50,"title":"Schedule","default":[]}},"type":"object","required":["display_name"],"title":"ProfileFields","description":"Everything the owner edits. A draft needs only the name; publishing needs more."},"ProfilePatch":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"anyOf":[{"type":"string","maxLength":3000},{"type":"null"}],"title":"Bio"},"care_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/CareType"},"type":"array"},{"type":"null"}],"title":"Care Types"},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Districts"},"hourly_rate_uah":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Experience Years"},"languages":{"anyOf":[{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array"},{"type":"null"}],"title":"Languages"},"education":{"anyOf":[{"items":{"$ref":"#/components/schemas/Education"},"type":"array"},{"type":"null"}],"title":"Education"},"ward_age_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Conditions Accepted"},"conditions_refused":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Conditions Refused"},"extras":{"anyOf":[{"$ref":"#/components/schemas/Extras"},{"type":"null"}]},"schedule":{"anyOf":[{"items":{"$ref":"#/components/schemas/Slot"},"type":"array"},{"type":"null"}],"title":"Schedule"}},"additionalProperties":false,"type":"object","title":"ProfilePatch","description":"Field types of ProfileFields, all optional; the merged card is checked as a whole."},"ProfileStatus":{"type":"string","enum":["draft","pending_moderation","published","rejected"],"title":"ProfileStatus"},"PublicAgency":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"description":{"type":"string","title":"Description"},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"profiles":{"items":{"$ref":"#/components/schemas/PublicProfile"},"type":"array","title":"Profiles"}},"type":"object","required":["id","name","logo_url","description","city_code","profiles"],"title":"PublicAgency","description":"The agency's card as the public sees it: no owner, no contacts."},"PublicProfile":{"properties":{"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"bio":{"type":"string","maxLength":3000,"title":"Bio","default":""},"care_types":{"items":{"$ref":"#/components/schemas/CareType"},"type":"array","title":"Care Types","default":[]},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"districts":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Districts","default":[]},"hourly_rate_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Hourly Rate Uah"},"travel_fee_uah":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Travel Fee Uah"},"experience_years":{"anyOf":[{"type":"integer","maximum":80.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"languages":{"items":{"type":"string","pattern":"^[a-z]{2}$"},"type":"array","title":"Languages","default":[]},"education":{"items":{"$ref":"#/components/schemas/Education"},"type":"array","title":"Education","default":[]},"ward_age_min":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Min"},"ward_age_max":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Ward Age Max"},"conditions_accepted":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Accepted","default":[]},"conditions_refused":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions Refused","default":[]},"extras":{"$ref":"#/components/schemas/Extras","default":{"own_transport":false,"first_aid_certificate":false,"non_smoker":false}},"schedule":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","maxItems":50,"title":"Schedule","default":[]},"id":{"type":"string","format":"uuid","title":"Id"},"agency_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agency Id"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url","description":"The uploaded photo; only the photo routes set it (spec-v1.md §3.1)."},"rating_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating Avg"},"rating_count":{"type":"integer","title":"Rating Count"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At","description":"When the card was first published; never reset."},"accepts_orders":{"type":"boolean","title":"Accepts Orders","description":"False while seven orders wait for the caregiver's answer: an order to the card is refused and the card is out of search, until one is answered (spec-v1.md §3.9)."},"generation":{"anyOf":[{"$ref":"#/components/schemas/Generation"},{"type":"null"}],"readOnly":true}},"type":"object","required":["display_name","id","agency_id","rating_avg","rating_count","accepts_orders","generation"],"title":"PublicProfile","description":"What anyone may read of a published profile: never any contact, and the date of\nbirth only as a generation."},"PublicReview":{"properties":{"rating":{"type":"integer","title":"Rating"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["rating","body","created_at"],"title":"PublicReview"},"Publication":{"properties":{"profile":{"$ref":"#/components/schemas/Profile"},"decision":{"$ref":"#/components/schemas/Decision"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"}},"type":"object","required":["profile","decision","categories"],"title":"Publication","description":"The outcome of publishing: the card with its new status, and why."},"PushEndpoint":{"properties":{"endpoint":{"type":"string","maxLength":2048,"pattern":"^https://\\S+$","title":"Endpoint"}},"type":"object","required":["endpoint"],"title":"PushEndpoint"},"PushKey":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"PushKey"},"PushKeys":{"properties":{"p256dh":{"type":"string","maxLength":100,"title":"P256Dh"},"auth":{"type":"string","maxLength":40,"title":"Auth"}},"type":"object","required":["p256dh","auth"],"title":"PushKeys"},"PushSubscription":{"properties":{"endpoint":{"type":"string","maxLength":2048,"pattern":"^https://\\S+$","title":"Endpoint"},"keys":{"$ref":"#/components/schemas/PushKeys"}},"type":"object","required":["endpoint","keys"],"title":"PushSubscription"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"Region":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"cities":{"items":{"$ref":"#/components/schemas/City"},"type":"array","title":"Cities"}},"type":"object","required":["code","name","cities"],"title":"Region"},"Reply":{"properties":{"method":{"type":"string","title":"Method","default":"sendMessage"},"chat_id":{"type":"integer","title":"Chat Id"},"text":{"type":"string","title":"Text"},"reply_markup":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reply Markup"}},"type":"object","required":["chat_id","text"],"title":"Reply","description":"A Bot API call made by answering the webhook: Telegram sends the message itself, so\nthe server makes no request of its own."},"Review":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"rating":{"type":"integer","title":"Rating"},"body":{"type":"string","title":"Body"},"status":{"$ref":"#/components/schemas/ReviewStatus"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","description":"Why it was refused, when it was"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","rating","body","status","categories","created_at"],"title":"Review","description":"The author's view: the review with its moderation outcome."},"ReviewRequest":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"body":{"type":"string","maxLength":2000,"title":"Body","description":"Ukrainian; places and sums are fine, contacts and addresses are not","default":""}},"type":"object","required":["rating"],"title":"ReviewRequest"},"ReviewStatus":{"type":"string","enum":["pending_moderation","published","rejected"],"title":"ReviewStatus"},"Right":{"type":"string","enum":["caregiver","agency","admin","superadmin"],"title":"Right","description":"What an account may do beyond the client's rights, which every account has.\n`superadmin` is never stored: it belongs to the account with SUPERADMIN_EMAIL."},"SearchPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicProfile"},"type":"array","title":"Items"},"ranked_by":{"type":"string","enum":["meaning","rating"],"title":"Ranked By"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","ranked_by"],"title":"SearchPage"},"SeedReport":{"properties":{"users":{"type":"integer","title":"Users"},"agencies":{"type":"integer","title":"Agencies"},"wards":{"type":"integer","title":"Wards"},"profiles":{"items":{"$ref":"#/components/schemas/SeededProfile"},"type":"array","title":"Profiles"}},"type":"object","required":["users","agencies","wards","profiles"],"title":"SeedReport"},"SeededProfile":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"city_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Code"},"agency_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agency Id"},"status":{"$ref":"#/components/schemas/ProfileStatus"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"}},"type":"object","required":["id","display_name","city_code","agency_id","status","categories"],"title":"SeededProfile"},"Sender":{"properties":{"id":{"type":"integer","title":"Id"},"first_name":{"type":"string","title":"First Name","default":""},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"is_bot":{"type":"boolean","title":"Is Bot","default":false}},"type":"object","required":["id"],"title":"Sender"},"SessionTokens":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","const":"bearer","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"SessionTokens"},"Side":{"type":"string","enum":["client","caregiver"],"title":"Side"},"SignInCodeSent":{"properties":{"retry_after_seconds":{"type":"integer","title":"Retry After Seconds"},"channel":{"type":"string","enum":["sms","telegram"],"title":"Channel"}},"type":"object","required":["retry_after_seconds","channel"],"title":"SignInCodeSent","description":"Where the sign-in code went, so the page tells the person where to look (auth.md §6)."},"Sitemap":{"properties":{"profiles":{"items":{"$ref":"#/components/schemas/SitemapEntry"},"type":"array","title":"Profiles"},"agencies":{"items":{"$ref":"#/components/schemas/SitemapEntry"},"type":"array","title":"Agencies"}},"type":"object","required":["profiles","agencies"],"title":"Sitemap","description":"What the public sees: the pages `/caregivers/{id}` and `/agencies/{id}` of the web\napp."},"SitemapEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","updated_at"],"title":"SitemapEntry"},"Slot":{"properties":{"weekday":{"type":"integer","maximum":7.0,"minimum":1.0,"title":"Weekday"},"starts_at":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","title":"Starts At"},"ends_at":{"type":"string","pattern":"^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$","title":"Ends At"}},"type":"object","required":["weekday","starts_at","ends_at"],"title":"Slot","description":"One working interval on an ISO weekday (1 = Monday); \"HH:MM\" strings sort as times."},"TelegramLink":{"properties":{"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","expires_at"],"title":"TelegramLink","description":"A deep link that opens the bot; pressing Start there links the chat to the account\nthat asked for the link."},"TelegramSignIn":{"properties":{"url":{"type":"string","title":"Url"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","token","expires_at"],"title":"TelegramSignIn","description":"A deep link that opens the bot, where sharing one's own number signs in the page\nthat asked; the page asks about `token` until then (auth.md §6)."},"TelegramSignInVerifyRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"TelegramSignInVerifyRequest"},"Update":{"properties":{"update_id":{"type":"integer","title":"Update Id"},"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]},"callback_query":{"anyOf":[{"$ref":"#/components/schemas/CallbackQuery"},{"type":"null"}]}},"type":"object","required":["update_id"],"title":"Update","description":"What Telegram posts to the webhook; a message and a button pressed matter\n(`allowed_updates` asks for nothing else), and every other field is ignored."},"User":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"rights":{"items":{"$ref":"#/components/schemas/Right"},"type":"array","title":"Rights"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verified":{"type":"boolean","title":"Phone Verified"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"locale":{"type":"string","title":"Locale"},"telegram_linked":{"type":"boolean","title":"Telegram Linked"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"onboarded":{"type":"boolean","title":"Onboarded"},"can_order":{"type":"boolean","title":"Can Order"},"own_profile_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Own Profile Ids"}},"type":"object","required":["id","rights","email","phone","phone_verified","display_name","locale","telegram_linked","gender","onboarded","can_order","own_profile_ids"],"title":"User","description":"The caller's own account, as `GET /me` returns it."},"UserChange":{"properties":{"caregiver":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Caregiver"},"agency":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agency"},"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]}},"type":"object","title":"UserChange","description":"The caregiver and agency rights to give (true) or take (false), the name and the\ngender (spec-v1.md §2.6); a field left out stays as it is."},"UserNote":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"updated_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Email"}},"type":"object","title":"UserNote","description":"The admins' note on a user, when and by whom it was last saved; all null for no note.\n`updated_by_email` is null too once that admin is deleted."},"UserPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ManagedUser"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"UserPage"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Ward":{"properties":{"birth_date":{"type":"string","format":"date","title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"first_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Last Name"},"patronymic":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Patronymic"},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Phone"},"conditions":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions","default":[]},"id":{"type":"string","format":"uuid","title":"Id"},"age":{"type":"integer","title":"Age"}},"type":"object","required":["birth_date","id","age"],"title":"Ward"},"WardFields":{"properties":{"birth_date":{"type":"string","format":"date","title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"first_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Last Name"},"patronymic":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Patronymic"},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Phone"},"conditions":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30,"title":"Conditions","default":[]}},"type":"object","required":["birth_date"],"title":"WardFields"},"WardPatch":{"properties":{"birth_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"$ref":"#/components/schemas/Gender"},{"type":"null"}]},"first_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Last Name"},"patronymic":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Patronymic"},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Phone"},"conditions":{"anyOf":[{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":30},{"type":"null"}],"title":"Conditions"}},"type":"object","title":"WardPatch","description":"Only the fields present change; null clears an optional one."},"WardReview":{"properties":{"rating":{"type":"integer","title":"Rating"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["rating","body","created_at"],"title":"WardReview","description":"What another caregiver wrote about the ward after an order; caregivers only."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"public","description":"No account needed; clients, caregivers and AI agents read places, condition suggestions, published caregiver profiles (never contacts) with their reviews and photos, published agency pages and the sitemap of both."},{"name":"auth","description":"Sign in (Google ID token, magic link, a phone code, the Telegram bot's link), refresh, log out, my account and its settings (the caregiver right), a name suggestion, phone verification, adding an e-mail, consent to an MCP client."},{"name":"providers","description":"Outside services: for a signed-in account, web push (the key to subscribe this browser with, storing or forgetting its subscription) and the Telegram bot (linking and unlinking a chat, sharing the phone number through it); for Telegram, its webhook."},{"name":"client","description":"Every signed-in account: ward cards, orders (create, withdraw, complete, cancel) and reviews of caregivers."},{"name":"caregiver","description":"Accounts with the caregiver right: my profile (draft, edit, publish), leave, orders (accept, decline, cancel) and reviews of wards."},{"name":"agency","description":"Accounts with the agency right: the agency card, its caregiver profiles (draft, edit, publish) and their leave, orders and reviews of wards."},{"name":"admin","description":"Accounts with the admin right: find users, give and take the caregiver and agency rights, block and unblock, decide held texts in the moderation queue, read the action log; the super admin gives the admin right. Never in MCP."},{"name":"assistant","description":"Every signed-in account: a message in the person's own words, answered by a model that does what it asks with the account's rights, as a client and, with that right, as a caregiver; not an agency's work."},{"name":"developer","description":"Shortcuts for frontend and agent developers; `X-Dev-Key`, 404 in production."},{"name":"service","description":"Operations: health check, nightly cleanup (tokens, unused MCP clients, ended orders)."}]}