{"openapi":"3.1.0","info":{"title":"CareUA API","description":"The REST API of CareUA, 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 Worker has no\ne-mail set up the code goes to its 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 (10 min). v1 writes it to the Worker 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":{}}}},"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/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/notifications/push-key":{"get":{"tags":["notifications"],"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_notifications_push_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushKey"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/push-subscriptions":{"post":{"tags":["notifications"],"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_notifications_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":["notifications"],"summary":"Unsubscribe From Pushes","description":"Forget this browser's subscription; one you do not hold is left alone.","operationId":"unsubscribe_from_pushes_api_v1_notifications_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/notifications/telegram/link":{"post":{"tags":["notifications"],"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_notifications_telegram_link_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramLink"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/telegram":{"delete":{"tags":["notifications"],"summary":"Unlink Telegram","description":"Stop sending your order events to Telegram; harmless when no chat is linked.","operationId":"unlink_telegram_api_v1_notifications_telegram_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/telegram/phone":{"post":{"tags":["notifications"],"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_notifications_telegram_phone_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/client/wards":{"get":{"tags":["client"],"summary":"List My Wards","description":"The caller's ward cards. Clients only; 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.","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 carries my e-mail (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, a city, ward ages and a schedule (422\nprofile_incomplete lists what is missing). 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 without an\noffset are Kyiv time. 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","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/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 manages the\nprofile 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 without an offset are Kyiv time.","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"}}}}}}},"/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 Rights","description":"Give or take the caregiver and agency rights. Taking one declines the pending orders\nof the profiles it held. Not for yourself, other admins or the super admin.","operationId":"change_rights_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/RightsChange"}}}},"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}/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 and agency cards the model was unsure about, oldest first (up to\n100).","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/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 now; the Cron\nTrigger does the same nightly. 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"}}}}}}},"/api/v1/service/telegram/webhook":{"post":{"tags":["service"],"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. The connection opens only for a message the bot\nanswers, as an MCP tool opens its own: Telegram also posts updates the bot ignores.","operationId":"telegram_webhook_api_v1_service_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 Service Telegram Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"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."},"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"],"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"},"id":{"type":"string","format":"uuid","title":"Id"},"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"}},"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"}},"additionalProperties":false,"type":"object","title":"AgencyPatch","description":"Only the fields present change; null clears `city_code`."},"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"}]},"photo_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Photo Url"},"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]\\d{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 `caregiver_email` manages the profile too (spec-v1.md §2)."},"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"}]},"photo_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Photo Url"},"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]\\d{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."},"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"},"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."},"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]\\d{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"},"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_early","boomer_late","gen_x_early","gen_x_late","millennial_early","millennial_late","gen_z_early","gen_z_late"],"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":"Kyiv time unless an offset is given"},"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"},"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"},"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","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":{"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"}]}},"type":"object","required":["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.9); never stored."},"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)."},"PhoneStartRequest":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{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"},"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"}]},"photo_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Photo Url"},"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"},"rating_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating Avg"},"rating_count":{"type":"integer","title":"Rating Count"},"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"}]},"photo_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Photo Url"},"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"}]},"photo_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Photo Url"},"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"},"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","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"}]},"photo_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Photo Url"},"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"},"rating_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating Avg"},"rating_count":{"type":"integer","title":"Rating Count"},"generation":{"anyOf":[{"$ref":"#/components/schemas/Generation"},{"type":"null"}],"readOnly":true}},"type":"object","required":["display_name","id","agency_id","rating_avg","rating_count","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 Worker 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."},"RightsChange":{"properties":{"caregiver":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Caregiver"},"agency":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agency"}},"type":"object","title":"RightsChange","description":"The caregiver and agency rights to give (true) or take (false); left out, unchanged."},"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"}},"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"},"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."},"Update":{"properties":{"update_id":{"type":"integer","title":"Update Id"},"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]}},"type":"object","required":["update_id"],"title":"Update","description":"What Telegram posts to the webhook; only a message matters (`allowed_updates`\nasks 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"}},"type":"object","required":["id","rights","email","phone","phone_verified","display_name","locale","telegram_linked","gender","onboarded"],"title":"User","description":"The caller's own account, as `GET /me` returns it."},"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]\\d{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]\\d{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]\\d{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) and their reviews."},{"name":"auth","description":"Sign in (Google ID token, magic link), refresh, log out, my account and its settings (the caregiver right), phone verification, consent to an MCP client."},{"name":"notifications","description":"Every signed-in account: the key to subscribe this browser to web push with, and storing or forgetting its subscription; order events then arrive as pushes."},{"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":"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)."}]}