{"openapi":"3.1.0","info":{"title":"AvailEngine API","description":"Booking Engine as a Service — white-label availability, booking, and resource management","version":"2.0.0"},"paths":{"/v1/availability/hours/{business_id}":{"get":{"tags":["Availability"],"summary":"Get Public Hours","description":"Public endpoint — returns operating hours for the booking widget schedule display.","operationId":"get_public_hours_v1_availability_hours__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Public Hours V1 Availability Hours  Business Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/availability/{business_id}":{"get":{"tags":["Availability"],"summary":"Get Availability","operationId":"get_availability_v1_availability__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}},{"name":"booking_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Booking Date"}},{"name":"capacity","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Capacity"}},{"name":"service_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/":{"post":{"tags":["Bookings"],"summary":"Create Booking","operationId":"create_booking_v1_bookings__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Booking V1 Bookings  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe":{"post":{"tags":["Webhooks"],"summary":"Stripe Webhook","operationId":"stripe_webhook_webhooks_stripe_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"type":"string","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings":{"get":{"tags":["Management"],"summary":"List Bookings","operationId":"list_bookings_v1_manage_bookings_get","parameters":[{"name":"res_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Res Date"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"latest","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Latest"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Bookings V1 Manage Bookings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/availability":{"get":{"tags":["Management"],"summary":"Get Availability For Staff","description":"Availability endpoint for staff (same logic, authenticated).","operationId":"get_availability_for_staff_v1_manage_availability_get","parameters":[{"name":"booking_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Booking Date"}},{"name":"capacity","in":"query","required":true,"schema":{"type":"integer","title":"Capacity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/staff":{"post":{"tags":["Management"],"summary":"Create Staff Booking","description":"Staff creates a booking manually â€” no deposit, confirmed immediately.","operationId":"create_staff_booking_v1_manage_bookings_staff_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffBookingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/staff-deposit":{"post":{"tags":["Management"],"summary":"Create Staff Deposit Booking","description":"Staff creates a reservation with a deposit payment link emailed to the guest\nReservation stays pending until payment; Stripe Checkout Session expires in 2 h.","operationId":"create_staff_deposit_booking_v1_manage_bookings_staff_deposit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffDepositCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/{booking_id}":{"patch":{"tags":["Management"],"summary":"Update Booking","operationId":"update_booking_v1_manage_bookings__booking_id__patch","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/{booking_id}/notes":{"patch":{"tags":["Management"],"summary":"Update Booking Notes","description":"Save or update staff notes on a booking. Notes persist after close.","operationId":"update_booking_notes_v1_manage_bookings__booking_id__notes_patch","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotesPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/{booking_id}/available-resources":{"get":{"tags":["Management"],"summary":"Get Available Tables For Swap","description":"Returns resources that are free during this booking's time slot (excluding the current resource).","operationId":"get_available_tables_for_swap_v1_manage_bookings__booking_id__available_resources_get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/{booking_id}/no-show":{"post":{"tags":["Management"],"summary":"Mark No Show","description":"Premium plan: captures the â‚¬20 authorization hold on a no-show.\nThe business keeps the â‚¬20; the deposit status moves to 'captured'.","operationId":"mark_no_show_v1_manage_bookings__booking_id__no_show_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/bookings/{booking_id}/release-hold":{"post":{"tags":["Management"],"summary":"Release Hold","description":"Premium plan: releases the â‚¬20 authorization hold when the guest shows up.\nThe hold is cancelled (no charge); the business deducts â‚¬20 from the bill manually.","operationId":"release_hold_v1_manage_bookings__booking_id__release_hold_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/resources":{"get":{"tags":["Management"],"summary":"Get Resources","operationId":"get_resources_v1_manage_resources_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Resources V1 Manage Resources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Management"],"summary":"Create Resource","operationId":"create_resource_v1_manage_resources_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/resources/{resource_id}":{"patch":{"tags":["Management"],"summary":"Update Resource","operationId":"update_resource_v1_manage_resources__resource_id__patch","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Management"],"summary":"Delete Resource","operationId":"delete_resource_v1_manage_resources__resource_id__delete","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/services":{"get":{"tags":["Management"],"summary":"List Services","description":"List services for the business. Cursor-paginated, ordered by name.","operationId":"list_services_v1_manage_services_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Management"],"summary":"Create Service","description":"Create a service (e.g., massage, haircut, dinner menu item).","operationId":"create_service_v1_manage_services_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/services/{service_id}":{"patch":{"tags":["Management"],"summary":"Update Service","description":"Update a service. Only send fields that changed.","operationId":"update_service_v1_manage_services__service_id__patch","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Management"],"summary":"Delete Service","description":"Delete a service. Returns 204 No Content.","operationId":"delete_service_v1_manage_services__service_id__delete","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/settings":{"get":{"tags":["Management"],"summary":"Get Settings","operationId":"get_settings_v1_manage_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Management"],"summary":"Update Settings","description":"Updates business booking settings.","operationId":"update_settings_v1_manage_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/hours":{"get":{"tags":["Management"],"summary":"Get Hours","description":"Returns operating hours for all 7 days.","operationId":"get_hours_v1_manage_hours_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Management"],"summary":"Update Hours","description":"Upserts operating hours for all 7 days at once.","operationId":"update_hours_v1_manage_hours_put","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HourRow"},"type":"array","title":"Hours"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/customers":{"get":{"tags":["Management"],"summary":"List Customers","description":"List customers. Search by name, phone, or email. Cursor-paginated.","operationId":"list_customers_v1_manage_customers_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/customers/{customer_id}":{"get":{"tags":["Management"],"summary":"Get Customer Detail","description":"Get a customer with their last 20 bookings and stats.","operationId":"get_customer_detail_v1_manage_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/waitlist":{"get":{"tags":["Management"],"summary":"Get Waitlist","description":"Returns waitlist entries for this business, cursor-paginated on created_at.","operationId":"get_waitlist_v1_manage_waitlist_get","parameters":[{"name":"preferred_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Preferred Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Waitlist V1 Manage Waitlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/waitlist/{entry_id}":{"delete":{"tags":["Management"],"summary":"Remove Waitlist Entry","description":"Remove a waitlist entry after contacting the guest.","operationId":"remove_waitlist_entry_v1_manage_waitlist__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/stats":{"get":{"tags":["Management"],"summary":"Get Stats","description":"Returns booking stats, revenue, rates, capacity, and trends for the business.\nDefaults to the current calendar month if no dates are provided.","operationId":"get_stats_v1_manage_stats_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Stats V1 Manage Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/audit-logs":{"get":{"tags":["Management"],"summary":"Get Audit Logs","description":"Returns the business's audit log, newest first. Cursor-paginated on created_at.","operationId":"get_audit_logs_v1_manage_audit_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Audit Logs V1 Manage Audit Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/subscription":{"get":{"tags":["Management"],"summary":"Get Subscription","operationId":"get_subscription_v1_manage_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/manage/business":{"get":{"tags":["Management"],"summary":"Get Business Info","description":"Returns basic business info including name.","operationId":"get_business_info_v1_manage_business_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/manage/blackout-dates":{"get":{"tags":["Management"],"summary":"List Blackout Dates","operationId":"list_blackout_dates_v1_manage_blackout_dates_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Blackout Dates V1 Manage Blackout Dates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Management"],"summary":"Create Blackout","operationId":"create_blackout_v1_manage_blackout_dates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlackoutCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/blackout-dates/{blackout_id}":{"patch":{"tags":["Management"],"summary":"Update Blackout","operationId":"update_blackout_v1_manage_blackout_dates__blackout_id__patch","parameters":[{"name":"blackout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blackout Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlackoutUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Management"],"summary":"Delete Blackout","operationId":"delete_blackout_v1_manage_blackout_dates__blackout_id__delete","parameters":[{"name":"blackout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blackout Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/connect/onboard":{"post":{"tags":["Billing"],"summary":"Connect Onboard","description":"Creates (or reuses) a Stripe Express account for the business and returns\na one-time hosted onboarding URL.  After the business owner completes\nonboarding on Stripe, they are redirected back to /dashboard?stripe=connected.","operationId":"connect_onboard_v1_billing_connect_onboard_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/billing/connect/status":{"get":{"tags":["Billing"],"summary":"Connect Status","description":"Returns the payout connection status for the business's Stripe account.","operationId":"connect_status_v1_billing_connect_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/waitlist/{business_id}":{"post":{"tags":["Waitlist"],"summary":"Join Waitlist","description":"Public — add a customer to the business's waitlist.","operationId":"join_waitlist_v1_waitlist__business_id__post","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/register":{"post":{"tags":["Auth"],"summary":"Register Business","operationId":"register_business_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/developer/register":{"post":{"tags":["Auth"],"summary":"Register Developer","description":"Register as a developer. Creates a Supabase Auth user with no business attached.","operationId":"register_developer_v1_auth_developer_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key. The full key is returned only once.","operationId":"create_api_key_v1_manage_api_keys_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List API keys for the current business. Cursor-paginated. Full keys are never returned.","operationId":"list_api_keys_v1_manage_api_keys_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Api Keys V1 Manage Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manage/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Revoke Api Key","description":"Revoke an API key by setting is_active = false.","operationId":"revoke_api_key_v1_manage_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/me":{"get":{"tags":["Developer"],"summary":"Get Profile","description":"Return the authenticated user's profile and their businesses.","operationId":"get_profile_v1_developer_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/developer/businesses":{"get":{"tags":["Developer"],"summary":"List Businesses","operationId":"list_businesses_v1_developer_businesses_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Developer"],"summary":"Create Business","description":"Create a new business and return a scoped API key.","operationId":"create_business_v1_developer_businesses_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBusinessRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/businesses/{business_id}":{"get":{"tags":["Developer"],"summary":"Get Business","operationId":"get_business_v1_developer_businesses__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Developer"],"summary":"Deactivate Business","operationId":"deactivate_business_v1_developer_businesses__business_id__delete","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/billing/checkout":{"post":{"tags":["Developer"],"summary":"Developer Checkout","operationId":"developer_checkout_v1_developer_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/billing/portal":{"post":{"tags":["Developer"],"summary":"Developer Portal","operationId":"developer_portal_v1_developer_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/developer/quickstart/{business_id}":{"get":{"tags":["Developer"],"summary":"Quickstart","description":"Return curl + SDK snippets for integrating with a business.","operationId":"quickstart_v1_developer_quickstart__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/google/callback":{"get":{"tags":["Google Calendar"],"summary":"Google Oauth Callback","description":"Google redirects here after user grants/denies consent.\n\nExchanges the code for tokens, stores them encrypted, and redirects\nback to the dashboard with a status query parameter.","operationId":"google_oauth_callback_integrations_google_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/google/connect":{"get":{"tags":["Google Calendar"],"summary":"Connect Google Calendar","description":"Start Google Calendar OAuth flow. Returns the authorization URL.","operationId":"connect_google_calendar_integrations_google_connect_get","parameters":[{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/google/status":{"get":{"tags":["Google Calendar"],"summary":"Get Connection Status","description":"Check whether the current business has a Google Calendar connection.","operationId":"get_connection_status_integrations_google_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionStatus"}}}}}}},"/integrations/google/disconnect":{"delete":{"tags":["Google Calendar"],"summary":"Disconnect Google Calendar","description":"Disconnect Google Calendar: revoke token, delete connection + blocked slots.","operationId":"disconnect_google_calendar_integrations_google_disconnect_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/dynamic/availability/{business_id}":{"get":{"tags":["dynamic"],"summary":"Check Dynamic Availability","description":"Real-time availability check — no grid, no slots.\n\nReturns whether any resource is free at the given time for the given\nduration and party size, plus the count and names of free resources.","operationId":"check_dynamic_availability_v1_dynamic_availability__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}},{"name":"booking_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Booking Date"}},{"name":"start_time","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Start Time"}},{"name":"capacity","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":1,"title":"Capacity"}},{"name":"duration_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":480,"minimum":5,"default":60,"title":"Duration Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dynamic/bookings":{"post":{"tags":["dynamic"],"summary":"Create Dynamic Booking","description":"Create a booking in dynamic mode.\n\nValidates availability on-the-fly by checking resource conflicts directly.\nNo predefined slots or operating-hours constraints.","operationId":"create_dynamic_booking_v1_dynamic_bookings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBookingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox/bookings":{"post":{"tags":["Sandbox"],"summary":"Create Sandbox Booking","description":"Public sandbox — returns a realistic booking response instantly.\nNo API key, no database, no setup required.","operationId":"create_sandbox_booking_v1_sandbox_bookings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/blog/posts":{"get":{"tags":["blog"],"summary":"List Posts","description":"List all blog posts (metadata only — title, excerpt, date, slug).","operationId":"list_posts_v1_blog_posts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/blog/posts/{slug}":{"get":{"tags":["blog"],"summary":"Get Post","description":"Get a single blog post with full HTML content.","operationId":"get_post_v1_blog_posts__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/posts/{slug}/raw":{"get":{"tags":["blog"],"summary":"Get Post Raw","description":"Get the raw markdown source of a blog post.","operationId":"get_post_raw_v1_blog_posts__slug__raw_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/track":{"get":{"tags":["admin"],"summary":"Track Pageview","description":"Public tracking pixel — log pageviews with minimal data.","operationId":"track_pageview_v1_admin_track_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/stats":{"get":{"tags":["admin"],"summary":"Get Stats","description":"Return aggregated analytics for the dashboard.","operationId":"get_stats_v1_admin_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/supabase-stats":{"get":{"tags":["admin"],"summary":"Get Supabase Stats","description":"Return user and business stats from Supabase for the analytics tab.","operationId":"get_supabase_stats_v1_admin_supabase_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/leads":{"get":{"tags":["admin"],"summary":"Get Leads","description":"Get all leads, newest first.","operationId":"get_leads_v1_admin_leads_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Add Lead","description":"Public endpoint: add a lead from the scanning script. No auth needed.","operationId":"add_lead_v1_admin_leads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadItem"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/leads/{lead_id}":{"patch":{"tags":["admin"],"summary":"Update Lead","description":"Mark lead as contacted or change relevance.","operationId":"update_lead_v1_admin_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}},{"name":"contacted","in":"query","required":false,"schema":{"type":"boolean","title":"Contacted"}},{"name":"relevance","in":"query","required":false,"schema":{"type":"string","title":"Relevance"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin":{"get":{"tags":["admin"],"summary":"Admin Page","description":"Serve the admin dashboard HTML (auth-protected).","operationId":"admin_page_admin_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/feed":{"get":{"tags":["admin"],"summary":"Get Content Feed","description":"Scan cron output directory and return posts grouped by platform.","operationId":"get_content_feed_v1_admin_feed_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/changelog":{"get":{"tags":["admin"],"summary":"Get Changelog","operationId":"get_changelog_v1_admin_changelog_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Add Changelog","operationId":"add_changelog_v1_admin_changelog_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangelogEntry"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/changelog/{entry_id}":{"delete":{"tags":["admin"],"summary":"Delete Changelog","operationId":"delete_changelog_v1_admin_changelog__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/calendar":{"get":{"tags":["admin"],"summary":"Get Calendar","operationId":"get_calendar_v1_admin_calendar_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Add Calendar Item","operationId":"add_calendar_item_v1_admin_calendar_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarItem"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/calendar/{item_id}":{"patch":{"tags":["admin"],"summary":"Update Calendar Item","operationId":"update_calendar_item_v1_admin_calendar__item_id__patch","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"content","in":"query","required":false,"schema":{"type":"string","title":"Content"}},{"name":"notes","in":"query","required":false,"schema":{"type":"string","title":"Notes"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Calendar Item","operationId":"delete_calendar_item_v1_admin_calendar__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tasks":{"get":{"tags":["admin"],"summary":"Get Tasks","operationId":"get_tasks_v1_admin_tasks_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Add Task","operationId":"add_task_v1_admin_tasks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskItem"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tasks/{task_id}":{"patch":{"tags":["admin"],"summary":"Update Task","operationId":"update_task_v1_admin_tasks__task_id__patch","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string","title":"Priority"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Task","operationId":"delete_task_v1_admin_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/notes":{"get":{"tags":["admin"],"summary":"Get Notes","operationId":"get_notes_v1_admin_notes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Add Note","operationId":"add_note_v1_admin_notes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteItem"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/notes/{note_id}":{"delete":{"tags":["admin"],"summary":"Delete Note","operationId":"delete_note_v1_admin_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Status Page","description":"Status endpoint — checks DB, Stripe, and returns version info.","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/public/business/{slug}":{"get":{"summary":"Get Business By Slug","description":"Public â€” resolves a business slug to its id, name.","operationId":"get_business_by_slug_v1_public_business__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/hours/{business_id}":{"get":{"summary":"Get Public Hours","description":"Public â€” returns operating hours for the booking widget schedule display.","operationId":"get_public_hours_v1_public_hours__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/blackout-dates/{business_id}":{"get":{"summary":"Get Public Blackout Dates","description":"Public â€” returns future/active blackout dates for the booking widget calendar.","operationId":"get_public_blackout_dates_v1_public_blackout_dates__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/services/{business_id}":{"get":{"summary":"Get Public Services","description":"Public — returns active services for the booking widget (name, duration, price).","operationId":"get_public_services_v1_public_services__business_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{path}":{"get":{"summary":" Spa Fallback","operationId":"_spa_fallback__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AvailabilityResponse":{"properties":{"business_id":{"type":"string","format":"uuid","title":"Business Id"},"booking_date":{"type":"string","format":"date","title":"Booking Date"},"capacity":{"type":"integer","title":"Capacity"},"slots":{"items":{"$ref":"#/components/schemas/Slot"},"type":"array","title":"Slots"}},"type":"object","required":["business_id","booking_date","capacity","slots"],"title":"AvailabilityResponse"},"BlackoutCreate":{"properties":{"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["start_date","end_date"],"title":"BlackoutCreate"},"BlackoutUpdate":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"BlackoutUpdate"},"BookingCreate":{"properties":{"business_id":{"type":"string","format":"uuid","title":"Business Id"},"capacity":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Capacity"},"booking_date":{"type":"string","format":"date","title":"Booking Date"},"start_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Start Time"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"},"customer_notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Customer Notes"}},"type":"object","required":["business_id","capacity","booking_date","start_time","first_name","last_name","email","phone"],"title":"BookingCreate"},"BookingPatch":{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","confirmed","checked_in","completed","cancelled","no_show"]},{"type":"null"}],"title":"Status"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"capacity":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Capacity"}},"type":"object","title":"BookingPatch"},"CalendarItem":{"properties":{"title":{"type":"string","title":"Title"},"platform":{"type":"string","title":"Platform"},"scheduled_date":{"type":"string","title":"Scheduled Date"},"scheduled_time":{"type":"string","title":"Scheduled Time"},"content":{"type":"string","title":"Content","default":""},"status":{"type":"string","title":"Status","default":"draft"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["title","platform","scheduled_date","scheduled_time"],"title":"CalendarItem"},"ChangelogEntry":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category","default":"general"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["title","description"],"title":"ChangelogEntry"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan","default":"developer_monthly"}},"type":"object","title":"CheckoutRequest"},"ConnectionStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calendar Id"},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"},"sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Enabled"}},"type":"object","required":["connected"],"title":"ConnectionStatus"},"CreateBusinessRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"business_type":{"type":"string","maxLength":50,"title":"Business Type","default":"service"},"is_dev":{"type":"boolean","title":"Is Dev","default":false}},"type":"object","required":["name"],"title":"CreateBusinessRequest"},"CreateKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":["read","write"]},"rate_limit_rpm":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Rpm","default":60}},"type":"object","required":["name"],"title":"CreateKeyRequest"},"DeveloperRegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"first_name":{"type":"string","maxLength":50,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":50,"minLength":1,"title":"Last Name"}},"type":"object","required":["email","password","first_name","last_name"],"title":"DeveloperRegisterRequest"},"DynamicAvailabilityResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"remaining_resources":{"type":"integer","title":"Remaining Resources"},"free_resources":{"items":{"type":"string"},"type":"array","title":"Free Resources","default":[]}},"type":"object","required":["available","remaining_resources"],"title":"DynamicAvailabilityResponse","description":"Response from GET /v1/dynamic/availability/{business_id}"},"DynamicBookingCreate":{"properties":{"business_id":{"type":"string","format":"uuid","title":"Business Id"},"capacity":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Capacity"},"booking_date":{"type":"string","format":"date","title":"Booking Date"},"start_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Start Time"},"duration_minutes":{"type":"integer","maximum":480.0,"minimum":5.0,"title":"Duration Minutes","default":60},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"},"customer_notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Customer Notes"}},"type":"object","required":["business_id","capacity","booking_date","start_time","first_name","last_name","email","phone"],"title":"DynamicBookingCreate","description":"Request body for POST /v1/dynamic/bookings"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HourRow":{"properties":{"day_of_week":{"type":"integer","title":"Day Of Week"},"is_open":{"type":"boolean","title":"Is Open"},"open_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Open Time"},"close_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Time"},"last_booking_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Booking Time"}},"type":"object","required":["day_of_week","is_open"],"title":"HourRow"},"LeadItem":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"source":{"type":"string","title":"Source","default":"unknown"},"summary":{"type":"string","title":"Summary","default":""},"relevance":{"type":"string","title":"Relevance","default":"medium"},"contacted":{"type":"boolean","title":"Contacted","default":false}},"type":"object","required":["title","url"],"title":"LeadItem"},"NoteItem":{"properties":{"content":{"type":"string","title":"Content"},"title":{"type":"string","title":"Title","default":""}},"type":"object","required":["content"],"title":"NoteItem"},"NotesPatch":{"properties":{"staff_notes":{"type":"string","maxLength":2000,"title":"Staff Notes"}},"type":"object","required":["staff_notes"],"title":"NotesPatch"},"RegisterRequest":{"properties":{"business_name":{"type":"string","maxLength":100,"minLength":2,"title":"Business Name"},"owner_first_name":{"type":"string","maxLength":50,"minLength":1,"title":"Owner First Name"},"owner_last_name":{"type":"string","maxLength":50,"minLength":1,"title":"Owner Last Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"}},"type":"object","required":["business_name","owner_first_name","owner_last_name","email","password","phone"],"title":"RegisterRequest"},"ResourceCreate":{"properties":{"name":{"type":"string","title":"Name"},"resource_type":{"type":"string","title":"Resource Type","default":"staff"},"capacity_min":{"type":"integer","title":"Capacity Min","default":1},"capacity_max":{"type":"integer","title":"Capacity Max","default":1},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","required":["name"],"title":"ResourceCreate"},"ResourceUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"capacity_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity Min"},"capacity_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity Max"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ResourceUpdate"},"ServiceCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"duration_minutes":{"type":"integer","maximum":480.0,"minimum":5.0,"title":"Duration Minutes"},"price_cents":{"type":"integer","minimum":0.0,"title":"Price Cents","default":0},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","duration_minutes"],"title":"ServiceCreate"},"ServiceUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"duration_minutes":{"anyOf":[{"type":"integer","maximum":480.0,"minimum":5.0},{"type":"null"}],"title":"Duration Minutes"},"price_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Cents"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ServiceUpdate"},"SettingsPatch":{"properties":{"booking_mode":{"anyOf":[{"type":"string","enum":["scheduled","dynamic"]},{"type":"null"}],"title":"Booking Mode"},"default_slot_interval_minutes":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":15.0},{"type":"null"}],"title":"Default Slot Interval Minutes"},"default_slot_duration_minutes":{"anyOf":[{"type":"integer","maximum":360.0,"minimum":15.0},{"type":"null"}],"title":"Default Slot Duration Minutes"},"booking_window_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Booking Window Days"},"min_notice_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":0.0},{"type":"null"}],"title":"Min Notice Hours"},"max_capacity":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Max Capacity"},"min_capacity":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Min Capacity"},"auto_confirm_bookings":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Confirm Bookings"},"default_deposit_amount_cents":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":5.0},{"type":"null"}],"title":"Default Deposit Amount Cents"}},"type":"object","title":"SettingsPatch"},"Slot":{"properties":{"time":{"type":"string","title":"Time"},"available":{"type":"boolean","title":"Available"},"remaining_resources":{"type":"integer","title":"Remaining Resources"}},"type":"object","required":["time","available","remaining_resources"],"title":"Slot"},"StaffBookingCreate":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Time"},"capacity":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Capacity"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["date","time","capacity","first_name","last_name","phone"],"title":"StaffBookingCreate"},"StaffDepositCreate":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Time"},"capacity":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Capacity"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"},"email":{"type":"string","maxLength":254,"title":"Email"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["date","time","capacity","first_name","last_name","phone","email"],"title":"StaffDepositCreate"},"TaskItem":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"status":{"type":"string","title":"Status","default":"pending"},"priority":{"type":"string","title":"Priority","default":"medium"},"category":{"type":"string","title":"Category","default":"general"}},"type":"object","required":["title"],"title":"TaskItem"},"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"},"WaitlistCreate":{"properties":{"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"},"capacity":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Capacity"},"preferred_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Preferred Date"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}},"type":"object","required":["first_name","last_name","email","phone","capacity"],"title":"WaitlistCreate"}}}}