{"openapi":"3.1.0","info":{"title":"mipa-api","description":"Backend for the Mi.pa platform — order intake, BIN-routed payments, merchant notifications, and the foundation for Stage 4 USDC wallet.","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Root  Get"}}}}}}},"/orders":{"post":{"tags":["orders"],"summary":"Create Order","operationId":"create_order_orders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["orders"],"summary":"List Orders","description":"List orders, newest first.\n\nUntil this existed an order could only be read by UUID, so nothing could\nanswer \"what is waiting for this merchant?\" -- which is how 111 orders sat\nunacknowledged for three months.","operationId":"list_orders_orders_get","parameters":[{"name":"merchant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Slug"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only orders created at or after this instant.","title":"Since"},"description":"Only orders created at or after this instant."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderOut"},"title":"Response List Orders Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}":{"get":{"tags":["orders"],"summary":"Get Order","operationId":"get_order_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}/status":{"patch":{"tags":["orders"],"summary":"Update Order Status","description":"The merchant's lifecycle on a store order. `completed` is the moment\nthe customer earns loyalty points — money changed hands, not just a cart.","operationId":"update_order_status_orders__order_id__status_patch","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/merchants/{slug}":{"get":{"tags":["merchants"],"summary":"Get Merchant","operationId":"get_merchant_merchants__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/merchants":{"post":{"tags":["merchants"],"summary":"Upsert Merchant","operationId":"upsert_merchant_merchants_post","parameters":[{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantUpsert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/route":{"post":{"tags":["payments"],"summary":"Route Decision","operationId":"route_decision_payments_route_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}/delivery/quote":{"post":{"tags":["delivery"],"summary":"Quote Delivery","operationId":"quote_delivery_orders__order_id__delivery_quote_post","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/DeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}/delivery/dispatch":{"post":{"tags":["delivery"],"summary":"Dispatch Delivery","operationId":"dispatch_delivery_orders__order_id__delivery_dispatch_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}/accept":{"post":{"tags":["delivery"],"summary":"Accept Order","operationId":"accept_order_orders__order_id__accept_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}/delivery":{"get":{"tags":["delivery"],"summary":"Get Delivery","operationId":"get_delivery_orders__order_id__delivery_get","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/DeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/delivery/{provider_name}":{"post":{"tags":["delivery"],"summary":"Delivery Webhook","operationId":"delivery_webhook_webhooks_delivery__provider_name__post","parameters":[{"name":"provider_name","in":"path","required":true,"schema":{"type":"string","title":"Provider Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delivery Webhook Webhooks Delivery  Provider Name  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/catalog":{"get":{"summary":"Get Catalog","operationId":"get_catalog_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/catalog/items":{"get":{"summary":"Get Catalog Items","operationId":"get_catalog_items_catalog_items_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"merchant","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Merchant"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Tag"}},{"name":"max_price_cents","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Price Cents"}},{"name":"delivery_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Mode"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/catalog/merchants":{"get":{"summary":"Get Catalog Merchants","operationId":"get_catalog_merchants_catalog_merchants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/catalog/merchants/{merchant_slug}":{"get":{"summary":"Get Catalog Merchant","operationId":"get_catalog_merchant_catalog_merchants__merchant_slug__get","parameters":[{"name":"merchant_slug","in":"path","required":true,"schema":{"type":"string","title":"Merchant Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/config":{"get":{"tags":["booking"],"summary":"Get Booking Config","description":"Everything the site widget needs to render itself.\n\nDeliberately includes services with a NULL price: a shop that hasn't\npublished prices can still take bookings, and the widget shows \"precio\npor confirmar\" instead of a number nobody agreed to.","operationId":"get_booking_config_booking__slug__config_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/availability":{"get":{"tags":["booking"],"summary":"Get Availability","operationId":"get_availability_booking__slug__availability_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"service_id","in":"query","required":true,"schema":{"type":"string","description":"Service UUID or intake id, e.g. 'corte'","title":"Service Id"},"description":"Service UUID or intake id, e.g. 'corte'"},{"name":"staff_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Barber UUID/id; omit for any","title":"Staff Id"},"description":"Barber UUID/id; omit for any"},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First local date (default today)","title":"Start"},"description":"First local date (default today)"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":62,"minimum":1,"default":7,"title":"Days"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/appointments":{"post":{"tags":["booking"],"summary":"Create Appointment","operationId":"create_appointment_booking__slug__appointments_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/appointments/{appointment_id}":{"get":{"tags":["booking"],"summary":"Get Appointment","operationId":"get_appointment_booking_appointments__appointment_id__get","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["booking"],"summary":"Delete Appointment","description":"Hard delete — admin token only, for test rows and typos. Real bookings\nare cancelled, never deleted, so the shop's history stays honest.","operationId":"delete_appointment_booking_appointments__appointment_id__delete","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/appointments/{appointment_id}/cancel":{"post":{"tags":["booking"],"summary":"Cancel Appointment","description":"Customer-side cancel.\n\nInside the cutoff we still cancel — holding a chair hostage helps no\none — but the deposit is marked forfeited, which is the whole point of\ntaking one. The merchant is always told, because an empty chair they\ndon't know about is worse than a late cancellation.","operationId":"cancel_appointment_booking_appointments__appointment_id__cancel_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCancel"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/appointments/{appointment_id}/reschedule":{"post":{"tags":["booking"],"summary":"Reschedule Appointment","operationId":"reschedule_appointment_booking_appointments__appointment_id__reschedule_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentReschedule"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/waitlist":{"post":{"tags":["booking"],"summary":"Join Waitlist","description":"Take a name when the calendar is full.\n\nBarbershops fill most cancelled slots from a waitlist; without one, a\ncancellation is simply lost revenue.","operationId":"join_waitlist_booking__slug__waitlist_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/setup":{"post":{"tags":["booking"],"summary":"Setup Booking","description":"Provision a merchant's whole booking configuration in one idempotent call.\n\nThis is what the site build posts, so a barbershop site is bookable the\nmoment it deploys. Re-running it after an intake edit updates in place:\nservices and staff are keyed on their intake ids, and anything no longer\npresent is DEACTIVATED rather than deleted so past appointments keep\npointing at real rows.","operationId":"setup_booking_booking__slug__setup_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSetupIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSetupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/agenda":{"get":{"tags":["booking"],"summary":"Get Agenda","description":"The book, as the shop sees it. Cancellations included — a barber\nneeds to know a slot freed up, not just what is still standing.","operationId":"get_agenda_booking__slug__agenda_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Local date (default today)","title":"Day"},"description":"Local date (default today)"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":62,"minimum":1,"default":1,"title":"Days"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentOut"},"title":"Response Get Agenda Booking  Slug  Agenda Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/appointments/{appointment_id}/status":{"patch":{"tags":["booking"],"summary":"Update Status","description":"Check-in, complete, or mark a no-show from the shop side.","operationId":"update_status_booking_appointments__appointment_id__status_patch","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/panel/login":{"post":{"tags":["booking"],"summary":"Panel Login","description":"Check a shop's panel PIN and nothing else. On success the page sends\nthe same PIN as X-Mipa-Panel-Pin on agenda and edit calls.","operationId":"panel_login_booking__slug__panel_login_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelLoginIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelLoginOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/appointments/{appointment_id}/merchant":{"patch":{"tags":["booking"],"summary":"Merchant Update","description":"The shop's own edits: status, the price actually charged, notes, and\nthe cash/Yappy ledger the site cannot know about on its own.","operationId":"merchant_update_booking_appointments__appointment_id__merchant_patch","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentMerchantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/lookup":{"get":{"tags":["booking"],"summary":"Lookup Appointments","description":"\"Mi reserva\": a customer finds their own bookings by the phone or\nemail they booked with. Deliberately thin — code, what, when, status,\npayment state — no names, no notes, never another person's rows.","operationId":"lookup_appointments_booking__slug__lookup_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LookupOut"},"title":"Response Lookup Appointments Booking  Slug  Lookup Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/sales":{"post":{"tags":["booking"],"summary":"Create Sale","operationId":"create_sale_booking__slug__sales_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["booking"],"summary":"Get Sales","operationId":"get_sales_booking__slug__sales_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Local date (default today)","title":"Day"},"description":"Local date (default today)"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":62,"minimum":1,"default":1,"title":"Days"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SaleOut"},"title":"Response Get Sales Booking  Slug  Sales Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/sales/summary":{"get":{"tags":["booking"],"summary":"Get Sales Summary","operationId":"get_sales_summary_booking__slug__sales_summary_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Local date (default today)","title":"Day"},"description":"Local date (default today)"},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/sales/{sale_id}/void":{"post":{"tags":["booking"],"summary":"Void Sale","operationId":"void_sale_booking_sales__sale_id__void_post","parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/products":{"get":{"tags":["booking"],"summary":"Get Products","operationId":"get_products_booking__slug__products_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductOut"},"title":"Response Get Products Booking  Slug  Products Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/clients/{phone}":{"get":{"tags":["booking"],"summary":"Get Client","description":"One client's card: history, cadence, and the barber's own notes.\n\n`due_for_rebook` compares time-since-last-visit against this client's\nown average gap — the signal a rebooking nudge should fire on, rather\nthan a blanket \"everyone gets a text at 4 weeks\".","operationId":"get_client_booking__slug__clients__phone__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/{slug}/clients/{phone}/notes":{"post":{"tags":["booking"],"summary":"Add Client Note","operationId":"add_client_note_booking__slug__clients__phone__notes_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientNoteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientNoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/reminders/run":{"post":{"tags":["booking"],"summary":"Run Reminders","description":"Fire due appointment reminders. Cron this every 15 minutes.\n\nEach merchant's `reminder_hours` (default 24h and 2h out) is checked\nagainst what has already been sent for that appointment, so a sweep that\nruns twice does not text a client twice.","operationId":"run_reminders_booking_reminders_run_post","parameters":[{"name":"horizon_hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":48,"title":"Horizon Hours"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Reminders Booking Reminders Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/webhook":{"get":{"tags":["whatsapp"],"summary":"Verify Webhook","operationId":"verify_webhook_whatsapp_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["whatsapp"],"summary":"Receive Webhook","operationId":"receive_webhook_whatsapp_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Receive Webhook Whatsapp Webhook Post"}}}}}}},"/voice/tools/{slug}":{"post":{"tags":["voice"],"summary":"Vapi Tools","operationId":"vapi_tools_voice_tools__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Vapi Tools Voice Tools  Slug  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/config":{"get":{"tags":["loyalty"],"summary":"Get Config","operationId":"get_config_loyalty__slug__config_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Config Loyalty  Slug  Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/setup":{"post":{"tags":["loyalty"],"summary":"Setup","operationId":"setup_loyalty__slug__setup_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltySetupIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Setup Loyalty  Slug  Setup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/me":{"get":{"tags":["loyalty"],"summary":"My Points","description":"A customer's own balance — by the phone they book with. Thin on purpose.","operationId":"my_points_loyalty__slug__me_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"phone","in":"query","required":true,"schema":{"type":"string","minLength":5,"maxLength":32,"title":"Phone"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response My Points Loyalty  Slug  Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/accounts/{phone}":{"get":{"tags":["loyalty"],"summary":"Get Account","operationId":"get_account_loyalty__slug__accounts__phone__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Account Loyalty  Slug  Accounts  Phone  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["loyalty"],"summary":"Delete Account","description":"Admin-only hard delete (test accounts). Real customers keep their history.","operationId":"delete_account_loyalty__slug__accounts__phone__delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/accounts":{"get":{"tags":["loyalty"],"summary":"List Accounts","operationId":"list_accounts_loyalty__slug__accounts_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Accounts Loyalty  Slug  Accounts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/earn":{"post":{"tags":["loyalty"],"summary":"Earn Points","operationId":"earn_points_loyalty__slug__earn_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarnIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Earn Points Loyalty  Slug  Earn Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/redeem":{"post":{"tags":["loyalty"],"summary":"Redeem Points","operationId":"redeem_points_loyalty__slug__redeem_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Redeem Points Loyalty  Slug  Redeem Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/loyalty/{slug}/adjust":{"post":{"tags":["loyalty"],"summary":"Adjust Points","operationId":"adjust_points_loyalty__slug__adjust_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Adjust Points Loyalty  Slug  Adjust Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/config":{"get":{"tags":["einvoice"],"summary":"Get Config","operationId":"get_config_einvoice__slug__config_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Config Einvoice  Slug  Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/setup":{"post":{"tags":["einvoice"],"summary":"Setup","operationId":"setup_einvoice__slug__setup_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EinvoiceSetupIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Setup Einvoice  Slug  Setup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/sales/{sale_id}":{"post":{"tags":["einvoice"],"summary":"Emit For Sale","operationId":"emit_for_sale_einvoice__slug__sales__sale_id__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EmitIn"},{"type":"null"}],"title":"Payload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Emit For Sale Einvoice  Slug  Sales  Sale Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["einvoice"],"summary":"Get For Sale","operationId":"get_for_sale_einvoice__slug__sales__sale_id__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get For Sale Einvoice  Slug  Sales  Sale Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/invoices/{einvoice_id}":{"get":{"tags":["einvoice"],"summary":"Get Invoice","operationId":"get_invoice_einvoice__slug__invoices__einvoice_id__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"einvoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Einvoice Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Invoice Einvoice  Slug  Invoices  Einvoice Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/invoices/{einvoice_id}/pdf":{"get":{"tags":["einvoice"],"summary":"Get Pdf","operationId":"get_pdf_einvoice__slug__invoices__einvoice_id__pdf_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"einvoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Einvoice Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/invoices/{einvoice_id}/void":{"post":{"tags":["einvoice"],"summary":"Void Invoice","operationId":"void_invoice_einvoice__slug__invoices__einvoice_id__void_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"einvoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Einvoice Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VoidIn"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Void Invoice Einvoice  Slug  Invoices  Einvoice Id  Void Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/invoices/{einvoice_id}/email":{"post":{"tags":["einvoice"],"summary":"Email Invoice","operationId":"email_invoice_einvoice__slug__invoices__einvoice_id__email_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"einvoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Einvoice Id"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Email Invoice Einvoice  Slug  Invoices  Einvoice Id  Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/folios":{"get":{"tags":["einvoice"],"summary":"Get Folios","operationId":"get_folios_einvoice__slug__folios_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Folios Einvoice  Slug  Folios Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/{slug}/ruc/{ruc}":{"get":{"tags":["einvoice"],"summary":"Lookup Ruc","operationId":"lookup_ruc_einvoice__slug__ruc__ruc__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"ruc","in":"path","required":true,"schema":{"type":"string","title":"Ruc"}},{"name":"tipo","in":"query","required":false,"schema":{"type":"string","pattern":"^[12]$","default":"1","title":"Tipo"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lookup Ruc Einvoice  Slug  Ruc  Ruc  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/giftcards/{slug}/config":{"get":{"tags":["giftcards"],"summary":"Get Config","operationId":"get_config_giftcards__slug__config_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Config Giftcards  Slug  Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/giftcards/{slug}/{code}/balance":{"get":{"tags":["giftcards"],"summary":"Public Balance","operationId":"public_balance_giftcards__slug___code__balance_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Public Balance Giftcards  Slug   Code  Balance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/giftcards/{slug}":{"post":{"tags":["giftcards"],"summary":"Sell","operationId":"sell_giftcards__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftSellIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sell Giftcards  Slug  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["giftcards"],"summary":"List Cards","operationId":"list_cards_giftcards__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cards Giftcards  Slug  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/giftcards/{slug}/{code}":{"get":{"tags":["giftcards"],"summary":"Get Card","operationId":"get_card_giftcards__slug___code__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Card Giftcards  Slug   Code  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/giftcards/{slug}/{code}/void":{"post":{"tags":["giftcards"],"summary":"Void Card","operationId":"void_card_giftcards__slug___code__void_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"x-mipa-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Admin-Token"}},{"name":"x-mipa-panel-pin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Mipa-Panel-Pin"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GiftVoidIn"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Void Card Giftcards  Slug   Code  Void Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptOut":{"properties":{"order_id":{"type":"string","format":"uuid","title":"Order Id"},"status":{"type":"string","title":"Status"},"delivery":{"anyOf":[{"$ref":"#/components/schemas/DeliveryOut"},{"type":"null"}]},"delivery_skipped_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Skipped Reason"}},"type":"object","required":["order_id","status"],"title":"AcceptOut"},"AdjustIn":{"properties":{"phone":{"type":"string","maxLength":32,"minLength":5,"title":"Phone"},"points":{"type":"integer","title":"Points","ne":0},"note":{"type":"string","maxLength":300,"minLength":1,"title":"Note"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"type":"object","required":["phone","points","note"],"title":"AdjustIn"},"AppointmentCancel":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"by":{"type":"string","maxLength":20,"title":"By","default":"customer"}},"type":"object","title":"AppointmentCancel"},"AppointmentCreate":{"properties":{"service_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Service Id"},"service_ids":{"items":{"type":"string"},"type":"array","title":"Service Ids"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"staff_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Staff Id"},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"},"customer_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Customer Phone"},"customer_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Email"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"source":{"type":"string","maxLength":20,"title":"Source","default":"site"},"lang":{"type":"string","maxLength":5,"title":"Lang","default":"es"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["starts_at"],"title":"AppointmentCreate"},"AppointmentMerchantUpdate":{"properties":{"status":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Status"},"price_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Cents"},"payment":{"anyOf":[{"$ref":"#/components/schemas/PaymentUpdate"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"redeem_points":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Redeem Points","default":0}},"type":"object","title":"AppointmentMerchantUpdate","description":"Everything the shop's own panel may change on a booking."},"AppointmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"merchant_slug":{"type":"string","title":"Merchant Slug"},"confirmation_code":{"type":"string","title":"Confirmation Code"},"status":{"type":"string","title":"Status"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"service_name":{"type":"string","title":"Service Name"},"staff_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff Id"},"staff_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staff Name"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_phone_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Phone E164"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"deposit_cents":{"type":"integer","title":"Deposit Cents","default":0},"deposit_status":{"type":"string","title":"Deposit Status","default":"none"},"currency":{"type":"string","title":"Currency","default":"USD"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"source":{"type":"string","title":"Source","default":"site"},"timezone":{"type":"string","title":"Timezone","default":"America/Panama"},"cancel_cutoff_hours":{"type":"integer","title":"Cancel Cutoff Hours","default":4},"created_at":{"type":"string","format":"date-time","title":"Created At"},"services":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Services"},"payment":{"additionalProperties":true,"type":"object","title":"Payment"},"loyalty":{"additionalProperties":true,"type":"object","title":"Loyalty"}},"type":"object","required":["id","merchant_slug","confirmation_code","status","service_name","starts_at","ends_at","created_at"],"title":"AppointmentOut"},"AppointmentReschedule":{"properties":{"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"staff_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Staff Id"}},"type":"object","required":["starts_at"],"title":"AppointmentReschedule"},"AppointmentStatusUpdate":{"properties":{"status":{"type":"string","maxLength":20,"title":"Status"}},"type":"object","required":["status"],"title":"AppointmentStatusUpdate"},"AvailabilityOut":{"properties":{"merchant_slug":{"type":"string","title":"Merchant Slug"},"service_id":{"type":"string","format":"uuid","title":"Service Id"},"staff_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff Id"},"timezone":{"type":"string","title":"Timezone"},"days":{"items":{"$ref":"#/components/schemas/DayAvailabilityOut"},"type":"array","title":"Days"},"next_available":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Available"}},"type":"object","required":["merchant_slug","service_id","timezone","days"],"title":"AvailabilityOut"},"BookingConfigOut":{"properties":{"merchant_slug":{"type":"string","title":"Merchant Slug"},"merchant_name":{"type":"string","title":"Merchant Name"},"booking_enabled":{"type":"boolean","title":"Booking Enabled"},"whatsapp_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp E164"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"services":{"items":{"$ref":"#/components/schemas/ServiceOut"},"type":"array","title":"Services"},"staff":{"items":{"$ref":"#/components/schemas/StaffOut"},"type":"array","title":"Staff"},"hours":{"additionalProperties":{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},"type":"object","title":"Hours"}},"type":"object","required":["merchant_slug","merchant_name","booking_enabled","policy","services","staff"],"title":"BookingConfigOut"},"BookingSetupIn":{"properties":{"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"America/Panama"},"hours":{"additionalProperties":true,"type":"object","title":"Hours"},"services":{"items":{"$ref":"#/components/schemas/ServiceIn"},"type":"array","title":"Services"},"staff":{"items":{"$ref":"#/components/schemas/StaffIn"},"type":"array","title":"Staff"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled","default":true},"replace":{"type":"boolean","title":"Replace","default":true}},"type":"object","title":"BookingSetupIn","description":"Idempotent upsert of a merchant's whole booking configuration.\n\nThis is the call the site build makes so a barbershop site is bookable\nthe moment it deploys, with no human touching an admin panel."},"BookingSetupOut":{"properties":{"merchant_slug":{"type":"string","title":"Merchant Slug"},"booking_enabled":{"type":"boolean","title":"Booking Enabled"},"services_upserted":{"type":"integer","title":"Services Upserted"},"staff_upserted":{"type":"integer","title":"Staff Upserted"},"rules_written":{"type":"integer","title":"Rules Written"},"deactivated":{"type":"integer","title":"Deactivated"}},"type":"object","required":["merchant_slug","booking_enabled","services_upserted","staff_upserted","rules_written","deactivated"],"title":"BookingSetupOut"},"ClientNoteIn":{"properties":{"note":{"type":"string","maxLength":2000,"minLength":1,"title":"Note"},"author":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Author"},"pinned":{"type":"boolean","title":"Pinned","default":false}},"type":"object","required":["note"],"title":"ClientNoteIn"},"ClientNoteOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"note":{"type":"string","title":"Note"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"pinned":{"type":"boolean","title":"Pinned","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","note","created_at"],"title":"ClientNoteOut"},"ClientOut":{"properties":{"merchant_slug":{"type":"string","title":"Merchant Slug"},"phone_e164":{"type":"string","title":"Phone E164"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen"},"last_visit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Visit"},"visit_count":{"type":"integer","title":"Visit Count","default":0},"no_show_count":{"type":"integer","title":"No Show Count","default":0},"cancel_count":{"type":"integer","title":"Cancel Count","default":0},"lifetime_cents":{"type":"integer","title":"Lifetime Cents","default":0},"average_days_between_visits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Days Between Visits"},"due_for_rebook":{"type":"boolean","title":"Due For Rebook","default":false},"usual_service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usual Service"},"usual_staff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usual Staff"},"notes":{"items":{"$ref":"#/components/schemas/ClientNoteOut"},"type":"array","title":"Notes"},"visits":{"items":{"$ref":"#/components/schemas/ClientVisitOut"},"type":"array","title":"Visits"}},"type":"object","required":["merchant_slug","phone_e164"],"title":"ClientOut","description":"The barber's client card: who they are, what they get, what to watch."},"ClientVisitOut":{"properties":{"appointment_id":{"type":"string","format":"uuid","title":"Appointment Id"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"service_name":{"type":"string","title":"Service Name"},"staff_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staff Name"},"status":{"type":"string","title":"Status"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"}},"type":"object","required":["appointment_id","starts_at","service_name","status"],"title":"ClientVisitOut"},"CustomerIn":{"properties":{"ruc":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Ruc"},"dv":{"anyOf":[{"type":"string","maxLength":4},{"type":"null"}],"title":"Dv"},"tipo_contribuyente":{"anyOf":[{"type":"integer","maximum":2.0,"minimum":1.0},{"type":"null"}],"title":"Tipo Contribuyente"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"direccion":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Direccion"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},"type":"object","title":"CustomerIn","description":"Who the invoice is made out to. Empty = consumidor final."},"DayAvailabilityOut":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"slots":{"items":{"$ref":"#/components/schemas/SlotOut"},"type":"array","title":"Slots"}},"type":"object","required":["date","slots"],"title":"DayAvailabilityOut"},"DeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"order_id":{"type":"string","format":"uuid","title":"Order Id"},"provider":{"type":"string","title":"Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"status":{"type":"string","title":"Status"},"fee_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Cents"},"eta_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eta Minutes"},"quote_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Ref"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"dropoff_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dropoff Address"},"events":{"items":{},"type":"array","title":"Events"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","order_id","provider","status","created_at","updated_at"],"title":"DeliveryOut"},"EarnIn":{"properties":{"phone":{"type":"string","maxLength":32,"minLength":5,"title":"Phone"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"amount_cents":{"type":"integer","minimum":0.0,"title":"Amount Cents"},"reference_type":{"type":"string","maxLength":40,"title":"Reference Type","default":"manual"},"reference_id":{"type":"string","maxLength":120,"minLength":1,"title":"Reference Id"},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["phone","amount_cents","reference_id"],"title":"EarnIn"},"EinvoiceSetupIn":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"environment":{"anyOf":[{"type":"string","pattern":"^(demo|prod)$"},{"type":"null"}],"title":"Environment"},"token_empresa":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Token Empresa"},"token_password":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Token Password"},"codigo_sucursal":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Codigo Sucursal"},"tipo_sucursal":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Tipo Sucursal"},"punto_facturacion":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Punto Facturacion"},"next_number":{"anyOf":[{"type":"integer","maximum":9999999.0,"minimum":1.0},{"type":"null"}],"title":"Next Number"},"ruc":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Ruc"},"dv":{"anyOf":[{"type":"string","maxLength":4},{"type":"null"}],"title":"Dv"},"razon_social":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Razon Social"},"direccion":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Direccion"},"prices_include_itbms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prices Include Itbms"},"itbms_code":{"anyOf":[{"type":"string","pattern":"^(00|01|02|03)$"},{"type":"null"}],"title":"Itbms Code"},"emit_on_sale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Emit On Sale"},"tipo_venta":{"anyOf":[{"type":"string","pattern":"^[1-4]$"},{"type":"null"}],"title":"Tipo Venta"},"formato_cafe":{"anyOf":[{"type":"string","pattern":"^[1-3]$"},{"type":"null"}],"title":"Formato Cafe"},"entrega_cafe":{"anyOf":[{"type":"string","pattern":"^[1-3]$"},{"type":"null"}],"title":"Entrega Cafe"}},"type":"object","title":"EinvoiceSetupIn"},"EmailIn":{"properties":{"email":{"type":"string","maxLength":200,"minLength":5,"title":"Email"}},"type":"object","required":["email"],"title":"EmailIn"},"EmitIn":{"properties":{"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerIn"},{"type":"null"}]},"nota":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Nota"}},"type":"object","title":"EmitIn"},"GiftPaymentIn":{"properties":{"method":{"type":"string","pattern":"^(cash|card|yappy|transfer|other)$","title":"Method","default":"cash"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"GiftPaymentIn"},"GiftSellIn":{"properties":{"amount_cents":{"type":"integer","maximum":10000000.0,"exclusiveMinimum":0.0,"title":"Amount Cents"},"payment":{"$ref":"#/components/schemas/GiftPaymentIn"},"purchaser_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Purchaser Phone"},"purchaser_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Purchaser Name"},"recipient_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Recipient Name"},"recipient_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Recipient Phone"},"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message"},"cashier":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cashier"}},"type":"object","required":["amount_cents"],"title":"GiftSellIn"},"GiftVoidIn":{"properties":{"note":{"type":"string","maxLength":300,"minLength":1,"title":"Note","default":"anulada en caja"}},"type":"object","title":"GiftVoidIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LookupOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"confirmation_code":{"type":"string","title":"Confirmation Code"},"status":{"type":"string","title":"Status"},"service_name":{"type":"string","title":"Service Name"},"services":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Services"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"currency":{"type":"string","title":"Currency","default":"USD"},"payment_status":{"type":"string","title":"Payment Status","default":"pending"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"timezone":{"type":"string","title":"Timezone","default":"America/Panama"}},"type":"object","required":["id","confirmation_code","status","service_name","starts_at","ends_at"],"title":"LookupOut","description":"A customer's own booking, as \"Mi reserva\" shows it: deliberately thin."},"LoyaltySetupIn":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"program_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Program Name"},"points_per_dollar":{"anyOf":[{"type":"number","maximum":1000.0,"minimum":0.0},{"type":"null"}],"title":"Points Per Dollar"},"redeem_value_cents_per_point":{"anyOf":[{"type":"number","maximum":1000.0,"minimum":0.0},{"type":"null"}],"title":"Redeem Value Cents Per Point"},"min_redeem_points":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Redeem Points"},"max_redeem_pct":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Max Redeem Pct"},"welcome_points":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Welcome Points"}},"type":"object","title":"LoyaltySetupIn"},"MerchantOut":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"currency_default":{"type":"string","title":"Currency Default"},"whatsapp_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp E164"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"delivery_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Provider"},"delivery_enabled":{"type":"boolean","title":"Delivery Enabled","default":false},"pickup_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Address"},"pickup_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Lat"},"pickup_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Lng"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["slug","name","role","currency_default","created_at","updated_at"],"title":"MerchantOut"},"MerchantUpsert":{"properties":{"slug":{"type":"string","maxLength":80,"minLength":1,"title":"Slug"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"role":{"type":"string","maxLength":20,"title":"Role","default":"starter"},"currency_default":{"type":"string","maxLength":8,"title":"Currency Default","default":"USD"},"whatsapp_e164":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Whatsapp E164"},"domain":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Domain"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"delivery_provider":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Delivery Provider"},"delivery_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Delivery Enabled"},"pickup_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Pickup Address"},"pickup_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Lat"},"pickup_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Lng"}},"type":"object","required":["slug","name"],"title":"MerchantUpsert"},"OrderCreate":{"properties":{"merchant_slug":{"type":"string","maxLength":80,"minLength":1,"title":"Merchant Slug"},"items":{"items":{"$ref":"#/components/schemas/OrderItemIn"},"type":"array","maxItems":200,"minItems":1,"title":"Items"},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"},"customer_phone_e164":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Customer Phone E164"},"customer_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Email"},"delivery_mode":{"type":"string","maxLength":20,"title":"Delivery Mode","default":"pickup"},"delivery_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Delivery Address"},"delivery_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delivery Lat"},"delivery_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delivery Lng"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"currency":{"type":"string","maxLength":8,"title":"Currency","default":"USD"},"delivery_fee_cents":{"type":"integer","maximum":50000.0,"minimum":0.0,"title":"Delivery Fee Cents","default":0},"tip_cents":{"type":"integer","maximum":50000.0,"minimum":0.0,"title":"Tip Cents","default":0},"payment_method":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Payment Method"},"redeem_points":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Redeem Points","default":0},"gift_card_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Gift Card Code"},"gift_card_cents":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":1.0},{"type":"null"}],"title":"Gift Card Cents"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["merchant_slug","items"],"title":"OrderCreate"},"OrderItemIn":{"properties":{"product_id":{"type":"string","maxLength":120,"minLength":1,"title":"Product Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"qty":{"type":"integer","maximum":99.0,"exclusiveMinimum":0.0,"title":"Qty"},"unit_price_cents":{"type":"integer","minimum":0.0,"title":"Unit Price Cents"},"category":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Category"},"options":{"additionalProperties":true,"type":"object","title":"Options"}},"type":"object","required":["product_id","name","qty","unit_price_cents"],"title":"OrderItemIn"},"OrderItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"product_id":{"type":"string","title":"Product Id"},"name":{"type":"string","title":"Name"},"qty":{"type":"integer","title":"Qty"},"unit_price_cents":{"type":"integer","title":"Unit Price Cents"},"line_total_cents":{"type":"integer","title":"Line Total Cents"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"options":{"additionalProperties":true,"type":"object","title":"Options"}},"type":"object","required":["id","product_id","name","qty","unit_price_cents","line_total_cents"],"title":"OrderItemOut"},"OrderOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"merchant_slug":{"type":"string","title":"Merchant Slug"},"customer_phone_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Phone E164"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"delivery_mode":{"type":"string","title":"Delivery Mode"},"delivery_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"subtotal_cents":{"type":"integer","title":"Subtotal Cents"},"tax_cents":{"type":"integer","title":"Tax Cents"},"delivery_fee_cents":{"type":"integer","title":"Delivery Fee Cents"},"tip_cents":{"type":"integer","title":"Tip Cents","default":0},"discount_cents":{"type":"integer","title":"Discount Cents"},"total_cents":{"type":"integer","title":"Total Cents"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"payment_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Provider"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"items":{"items":{"$ref":"#/components/schemas/OrderItemOut"},"type":"array","title":"Items"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","merchant_slug","delivery_mode","subtotal_cents","tax_cents","delivery_fee_cents","discount_cents","total_cents","currency","status","created_at","updated_at"],"title":"OrderOut"},"OrderStatusIn":{"properties":{"status":{"type":"string","maxLength":20,"title":"Status"},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["status"],"title":"OrderStatusIn"},"PanelLoginIn":{"properties":{"pin":{"type":"string","maxLength":32,"minLength":3,"title":"Pin"}},"type":"object","required":["pin"],"title":"PanelLoginIn"},"PanelLoginOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"merchant_slug":{"type":"string","title":"Merchant Slug"},"merchant_name":{"type":"string","title":"Merchant Name"}},"type":"object","required":["merchant_slug","merchant_name"],"title":"PanelLoginOut"},"PaymentSourceOut":{"properties":{"by_method":{"additionalProperties":{"$ref":"#/components/schemas/PaymentTotalOut"},"type":"object","title":"By Method"},"total_cents":{"type":"integer","title":"Total Cents","default":0},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["by_method"],"title":"PaymentSourceOut"},"PaymentTotalOut":{"properties":{"total_cents":{"type":"integer","title":"Total Cents","default":0},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"PaymentTotalOut"},"PaymentUpdate":{"properties":{"status":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Status"},"method":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Method"},"amount_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount Cents"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"PaymentUpdate","description":"What the shop records about money it took at the chair. The site\ncannot know a customer paid cash or Yappy; the barber types it here."},"ProductOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"merchant_slug":{"type":"string","title":"Merchant Slug"},"external_id":{"type":"string","title":"External Id"},"name_es":{"type":"string","title":"Name Es"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"price_cents":{"type":"integer","title":"Price Cents"},"active":{"type":"boolean","title":"Active"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["id","merchant_slug","external_id","name_es","price_cents","active","position"],"title":"ProductOut"},"RedeemIn":{"properties":{"phone":{"type":"string","maxLength":32,"minLength":5,"title":"Phone"},"points":{"type":"integer","exclusiveMinimum":0.0,"title":"Points"},"ticket_cents":{"type":"integer","minimum":0.0,"title":"Ticket Cents"},"reference_type":{"type":"string","maxLength":40,"title":"Reference Type","default":"manual"},"reference_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Reference Id"}},"type":"object","required":["phone","points","ticket_cents"],"title":"RedeemIn"},"RouteRequest":{"properties":{"method":{"type":"string","title":"Method","description":"yappy | tarjeta | wallet | cash"},"bin_first6":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Bin First6"}},"type":"object","required":["method"],"title":"RouteRequest"},"RouteResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"issuer_country":{"type":"string","title":"Issuer Country"},"rationale":{"type":"string","title":"Rationale"}},"type":"object","required":["provider","issuer_country","rationale"],"title":"RouteResponse"},"SaleIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SaleItemIn"},"type":"array","title":"Items"},"payment":{"$ref":"#/components/schemas/SalePaymentIn"},"discount_cents":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Discount Cents","default":0},"cashier":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cashier"},"customer_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Customer Phone"},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"},"redeem_points":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Redeem Points","default":0},"gift_card_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Gift Card Code"},"gift_card_cents":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":1.0},{"type":"null"}],"title":"Gift Card Cents"},"appointment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Appointment Id"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["items","payment"],"title":"SaleIn"},"SaleItemIn":{"properties":{"kind":{"type":"string","enum":["service","product","other"],"title":"Kind"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"quantity":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Quantity","default":1},"unit_price_cents":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Unit Price Cents"}},"type":"object","required":["kind","label","unit_price_cents"],"title":"SaleItemIn"},"SaleItemOut":{"properties":{"kind":{"type":"string","enum":["service","product","other"],"title":"Kind"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"quantity":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Quantity","default":1},"unit_price_cents":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Unit Price Cents"},"id":{"type":"string","format":"uuid","title":"Id"},"sale_id":{"type":"string","format":"uuid","title":"Sale Id"},"line_total_cents":{"type":"integer","title":"Line Total Cents"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["kind","label","unit_price_cents","id","sale_id","line_total_cents","position"],"title":"SaleItemOut"},"SaleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"merchant_slug":{"type":"string","title":"Merchant Slug"},"receipt_code":{"type":"string","title":"Receipt Code"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"subtotal_cents":{"type":"integer","title":"Subtotal Cents"},"discount_cents":{"type":"integer","title":"Discount Cents"},"total_cents":{"type":"integer","title":"Total Cents"},"payment":{"$ref":"#/components/schemas/SalePaymentIn"},"cashier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashier"},"appointment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Appointment Id"},"status":{"type":"string","enum":["complete","void"],"title":"Status"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"items":{"items":{"$ref":"#/components/schemas/SaleItemOut"},"type":"array","title":"Items"}},"type":"object","required":["id","merchant_slug","receipt_code","occurred_at","subtotal_cents","discount_cents","total_cents","payment","status","created_at","items"],"title":"SaleOut"},"SalePaymentIn":{"properties":{"method":{"type":"string","enum":["cash","card","yappy","transfer","other"],"title":"Method"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["method"],"title":"SalePaymentIn"},"SaleSummaryOut":{"properties":{"merchant_slug":{"type":"string","title":"Merchant Slug"},"day":{"type":"string","format":"date","title":"Day"},"timezone":{"type":"string","title":"Timezone"},"sales":{"$ref":"#/components/schemas/PaymentSourceOut"},"appointment_payments":{"$ref":"#/components/schemas/PaymentSourceOut"},"by_method":{"additionalProperties":{"$ref":"#/components/schemas/PaymentTotalOut"},"type":"object","title":"By Method"},"grand_total_cents":{"type":"integer","title":"Grand Total Cents"},"sale_count":{"type":"integer","title":"Sale Count"},"payment_count":{"type":"integer","title":"Payment Count"}},"type":"object","required":["merchant_slug","day","timezone","sales","appointment_payments","by_method","grand_total_cents","sale_count","payment_count"],"title":"SaleSummaryOut"},"ServiceIn":{"properties":{"id":{"type":"string","maxLength":120,"minLength":1,"title":"Id"},"name_es":{"type":"string","maxLength":200,"minLength":1,"title":"Name Es"},"name_en":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name En"},"description_es":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description Es"},"description_en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description En"},"duration_minutes":{"type":"integer","maximum":600.0,"exclusiveMinimum":0.0,"title":"Duration Minutes","default":30},"buffer_after_minutes":{"type":"integer","maximum":120.0,"minimum":0.0,"title":"Buffer After Minutes","default":0},"price_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Cents"},"deposit_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Deposit Cents"},"staff_ids":{"items":{"type":"string"},"type":"array","title":"Staff Ids"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["id","name_es"],"title":"ServiceIn"},"ServiceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"external_id":{"type":"string","title":"External Id"},"name_es":{"type":"string","title":"Name Es"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"description_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Es"},"description_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description En"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"deposit_cents":{"type":"integer","title":"Deposit Cents","default":0},"staff_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Staff Ids"}},"type":"object","required":["id","external_id","name_es","duration_minutes"],"title":"ServiceOut"},"SlotOut":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"staff_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Staff Ids"}},"type":"object","required":["start","end"],"title":"SlotOut"},"StaffIn":{"properties":{"id":{"type":"string","maxLength":120,"minLength":1,"title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"role_es":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Role Es"},"role_en":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Role En"},"bio_es":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Bio Es"},"bio_en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Bio En"},"photo_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Photo Url"},"phone_e164":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone E164"},"hours":{"additionalProperties":true,"type":"object","title":"Hours"},"accepts_bookings":{"type":"boolean","title":"Accepts Bookings","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["id","name"],"title":"StaffIn"},"StaffOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"external_id":{"type":"string","title":"External Id"},"name":{"type":"string","title":"Name"},"role_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Es"},"role_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role En"},"bio_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio Es"},"bio_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio En"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","required":["id","external_id","name"],"title":"StaffOut"},"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"},"VoidIn":{"properties":{"motivo":{"type":"string","maxLength":200,"minLength":3,"title":"Motivo","default":"Anulación de la venta"}},"type":"object","title":"VoidIn"},"WaitlistIn":{"properties":{"service_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Service Id"},"staff_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Staff Id"},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"},"customer_phone":{"type":"string","maxLength":32,"minLength":5,"title":"Customer Phone"},"window_start":{"type":"string","format":"date-time","title":"Window Start"},"window_end":{"type":"string","format":"date-time","title":"Window End"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}},"type":"object","required":["customer_phone","window_start","window_end"],"title":"WaitlistIn"},"WaitlistOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"merchant_slug":{"type":"string","title":"Merchant Slug"},"status":{"type":"string","title":"Status"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_phone_e164":{"type":"string","title":"Customer Phone E164"},"window_start":{"type":"string","format":"date-time","title":"Window Start"},"window_end":{"type":"string","format":"date-time","title":"Window End"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","merchant_slug","status","customer_phone_e164","window_start","window_end","created_at"],"title":"WaitlistOut"}}}}