{"openapi":"3.1.0","info":{"title":"ConSergio Public Booking API","version":"1.0.0","description":"Public API for embedding ConSergio merchant booking pages, white-label widgets, CLI flows, WordPress plugins, MCP tools, and direct booking integrations."},"servers":[{"url":"https://consergio.com/api/v2"}],"components":{"securitySchemes":{"ConsergioApiKey":{"type":"http","scheme":"bearer","description":"Optional merchant API key for paid/high-volume integrations. Public low-volume calls can omit it."}},"headers":{"ConsergioPlan":{"schema":{"type":"string"},"description":"Merchant plan used for quota calculation."},"ConsergioApiRemaining":{"schema":{"type":"integer"},"description":"Remaining public API units for this merchant today."},"ConsergioAiRemaining":{"schema":{"type":"integer"},"description":"Remaining AI voice/chat sessions for this merchant today."}}},"paths":{"/merchants/{slug}":{"get":{"summary":"Get a public merchant profile","security":[{"ConsergioApiKey":[]},{}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Merchant profile"},"401":{"description":"Invalid API key"},"404":{"description":"Not found"}}}},"/merchants/{slug}/availability":{"get":{"summary":"List available slots for a merchant service","security":[{"ConsergioApiKey":[]},{}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"serviceId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Available slots","headers":{"X-Consergio-Plan":{"$ref":"#/components/headers/ConsergioPlan"},"X-Consergio-Api-Remaining":{"$ref":"#/components/headers/ConsergioApiRemaining"},"X-Consergio-AI-Remaining":{"$ref":"#/components/headers/ConsergioAiRemaining"}}},"429":{"description":"Merchant API quota reached"}}}},"/merchants/{slug}/bookings":{"post":{"summary":"Create a public booking","security":[{"ConsergioApiKey":[]},{}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["serviceId","startTime","customer"],"properties":{"serviceId":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"customer":{"type":"object","required":["name","phone"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"},"preferences":{"type":"object"}}}}}}}},"responses":{"201":{"description":"Booking created","headers":{"X-Consergio-Plan":{"$ref":"#/components/headers/ConsergioPlan"},"X-Consergio-Api-Remaining":{"$ref":"#/components/headers/ConsergioApiRemaining"}}},"401":{"description":"Invalid API key"},"409":{"description":"Slot unavailable"},"429":{"description":"Merchant API quota reached"}}}}}}