{"openapi":"3.1.0","info":{"title":"Gastrobot Agenten-Schnittstelle","version":"2b","description":"Lesen und geschuetzte Bestellaufnahme sind fuer diesen Tenant freigegeben.","x-gastrobot-accepting":{"accepting":false,"delivery":false,"pickup":false}},"servers":[{"url":"https://bot.dialoga-ai.de"}],"paths":{"/public/order/{slug}/info":{"get":{"operationId":"getRestaurantInfo","summary":"Restaurant- und Bestellinformationen","parameters":[{"$ref":"#/components/parameters/SlugParameter"}],"responses":{"200":{"description":"Information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoResponse"}}}},"404":{"description":"Unbekannter Tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/order/{slug}/menu":{"get":{"operationId":"getMenu","summary":"Aktuell angebotene Speisekarte","parameters":[{"$ref":"#/components/parameters/SlugParameter"}],"responses":{"200":{"description":"Speisekarte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuResponse"}}}},"404":{"description":"Unbekannter Tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Menue nicht verfuegbar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/order/{slug}/liefercheck":{"get":{"operationId":"checkDelivery","summary":"Unverbindliche Lieferpruefung; Checkout prueft erneut","parameters":[{"$ref":"#/components/parameters/SlugParameter"},{"$ref":"#/components/parameters/StreetParameter"},{"$ref":"#/components/parameters/ZipcodeParameter"},{"$ref":"#/components/parameters/CityParameter"}],"responses":{"200":{"description":"Lieferpruefung","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryCheckResponse"}}}},"404":{"description":"Unbekannter Tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/order/{slug}/recommendations":{"get":{"operationId":"getRecommendations","summary":"Vorhandene Empfehlungen","x-gastrobot-mcp-tool":false,"parameters":[{"$ref":"#/components/parameters/SlugParameter"}],"responses":{"200":{"description":"Empfehlungen","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/public/order/{slug}/loyalty-status":{"get":{"operationId":"getLoyaltyStatus","summary":"Vorhandener Treuestatus","x-gastrobot-mcp-tool":false,"parameters":[{"$ref":"#/components/parameters/SlugParameter"}],"responses":{"200":{"description":"Treuestatus","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/public/order/{slug}":{"post":{"operationId":"createOrder","summary":"Bestellung ueber den geschuetzten Widget-Checkout aufnehmen","description":"Vor dem Aufgeben muessen dem Menschen Artikel, Bestellart, Adresse und erwartete Gesamtkosten genannt werden. Eine erfolgreiche Antwort bedeutet Aufnahme, nicht Bestaetigung.","parameters":[{"$ref":"#/components/parameters/SlugParameter"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrderRequest"}}}},"responses":{"200":{"description":"Aufnahmevertrag; contact_verified bleibt false und pos_status unknown","headers":{"X-Gastrobot-Track":{"schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderReceipt"}}}},"400":{"description":"Ungueltige Anfrage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotenzkonflikt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Idempotenzschluessel abgelaufen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fachliche Ablehnung","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"425":{"description":"Anfrage laeuft","headers":{"Retry-After":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Missbrauchsgrenze","headers":{"Retry-After":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Annahme oder Beleg derzeit nicht verfuegbar","headers":{"Retry-After":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/t/{token}/status":{"get":{"operationId":"getOrderStatus","summary":"PII-freier Bestellstatus per unerratbarem Token","parameters":[{"$ref":"#/components/parameters/TokenParameter"}],"responses":{"200":{"description":"Bestellstatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingStatus"}}}},"404":{"description":"Einheitlich unbekannt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}},"components":{"parameters":{"SlugParameter":{"name":"slug","in":"path","required":true,"schema":{"type":"string","const":"la-baita"}},"TokenParameter":{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":20}},"IdempotencyKeyHeader":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"pattern":"^[A-Za-z0-9._~-]+$"}},"StreetParameter":{"name":"street","in":"query","required":true,"schema":{"type":"string","maxLength":120}},"ZipcodeParameter":{"name":"zipcode","in":"query","required":true,"schema":{"type":"string","maxLength":10}},"CityParameter":{"name":"city","in":"query","required":true,"schema":{"type":"string","maxLength":80}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["agent_idempotency_key_required","agent_idempotency_key_invalid","agent_body_field_forbidden","agent_service_required","agent_contact_required","agent_contact_invalid","agent_item_not_offered","agent_variant_not_offered","agent_extra_not_offered","agent_idempotency_conflict","agent_idempotency_expired","agent_request_in_progress","agent_order_total_limit","agent_ip_limit","agent_tenant_limit","agent_concurrency_limit","agent_fraud_limit","agent_ordering_unavailable","agent_receipt_pending","agent_client_ip_missing","agent_body_invalid","agent_items_required","agent_extras_invalid","validation_failed","tenant_not_found","no_api_key","menu_unavailable","restaurant_closed","internal_error"]},"message":{"type":"string"},"field":{"type":"string"}},"additionalProperties":true},"NotFound":{"type":"object","required":["error"],"properties":{"error":{"type":"string","const":"not_found"}},"additionalProperties":false},"Price":{"type":"object","required":["priceLevel","price"],"properties":{"priceLevel":{"type":["string","number"]},"price":{"type":"number","minimum":0},"currency":{"type":"string","const":"EUR"}},"additionalProperties":true},"MenuItem":{"type":"object","required":["posId","name","prices"],"properties":{"posId":{"type":["string","number"]},"name":{"type":"string"},"description":{"type":"string"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"extras":{"type":"array","items":{"type":"object"}}},"additionalProperties":true},"MenuResponse":{"type":"object","required":["categories","shared_extras"],"properties":{"categories":{"type":"array","items":{"type":"object","required":["name","items"],"properties":{"name":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/MenuItem"}}},"additionalProperties":true}},"shared_extras":{"type":"array","items":{"type":"object"}}},"additionalProperties":true},"InfoResponse":{"type":"object","required":["tenant","widget_enabled","delivery_enabled","pickup_enabled","min_order_value","delivery_fee"],"properties":{"tenant":{"type":"object","required":["name","slug"],"properties":{"id":{"type":["integer","string"]},"name":{"type":"string"},"slug":{"type":"string"}},"additionalProperties":true},"widget_enabled":{"type":"boolean"},"delivery_enabled":{"type":"boolean"},"pickup_enabled":{"type":"boolean"},"min_order_value":{"type":"number"},"delivery_fee":{"type":"number"}},"additionalProperties":true},"DeliveryCheckResponse":{"type":"object","required":["ok","reason"],"properties":{"ok":{"type":"boolean"},"in_area":{"type":"boolean"},"reason":{"type":["string","null"]},"delivery_fee":{"type":"number"},"min_order_value":{"type":"number"}},"additionalProperties":true},"AgentExtra":{"type":"object","required":["id"],"properties":{"id":{"type":["string","number"]}},"additionalProperties":false},"AgentItem":{"type":"object","required":["id","priceLevel","qty"],"properties":{"id":{"type":["string","number"]},"priceLevel":{"type":["string","number"]},"qty":{"type":"integer","minimum":1,"maximum":20},"extras":{"type":"array","items":{"$ref":"#/components/schemas/AgentExtra"}}},"additionalProperties":false},"Contact":{"type":"object","required":["name","phone"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string","format":"email"}},"additionalProperties":false},"Address":{"type":"object","required":["street","zipcode","city"],"properties":{"street":{"type":"string"},"zipcode":{"type":"string"},"city":{"type":"string"}},"additionalProperties":false},"AgentOrderRequest":{"type":"object","required":["items","service","contact"],"properties":{"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AgentItem"}},"service":{"type":"string","enum":["delivery","pickup"]},"contact":{"$ref":"#/components/schemas/Contact"},"address":{"$ref":"#/components/schemas/Address"},"scheduled_for":{"type":"string"}},"additionalProperties":false,"allOf":[{"if":{"properties":{"service":{"const":"delivery"}}},"then":{"required":["address"]}}]},"OrderReceipt":{"type":"object","required":["accepted","contact_verified","order_status","pos_status","conversation_id","order_number","total","track_url"],"properties":{"accepted":{"type":"boolean","const":true},"contact_verified":{"type":"boolean","const":false},"order_status":{"type":"string","const":"received"},"pos_status":{"type":"string","const":"unknown"},"conversation_id":{"type":["integer","string"]},"order_number":{"type":["integer","string"]},"total":{"type":"number"},"track_url":{"type":"string","format":"uri"}},"additionalProperties":true},"TrackingStatus":{"type":"object","required":["restaurant","order","contact"],"properties":{"restaurant":{"type":"object"},"order":{"type":"object","required":["status","ref","service","phases","items","total"],"properties":{"status":{"type":"string"},"ref":{"type":["integer","string"]},"service":{"type":"string"},"phases":{"type":"array"},"items":{"type":"array"},"total":{"type":["number","null"]}},"additionalProperties":true},"contact":{"type":["object","null"]}},"additionalProperties":true}}}}