{"openapi":"3.1.0","info":{"title":"HOMEMADE Agent API","version":"1.3.2","summary":"Facts for AI agents (menu, prices, coverage, delivery dates, quotes) and a prepared order the person reviews and pays for.","description":"HOMEMADE is a weekly subscription of home-cooked lunches delivered chilled in Israel. No auth. Agents never transact: the quote returns an order_url that opens checkout prefilled, POST /api/agent/draft keeps the details a person gave for 48 hours and returns a checkout_url where they are filled in (no account, order, charge or message is created), and the person accepts the terms and pays on PayMe's hosted page. The service is not suitable for anyone with a food allergy or sensitivity (see allergy_notice). Support is the in-site chat only.","contact":{"url":"https://homemade-global.com/agents.md"}},"servers":[{"url":"https://homemade-global.com"}],"paths":{"/api/agent/menu":{"get":{"operationId":"getMenu","summary":"Current menu: dishes, ingredients, listed allergens, images","responses":{"200":{"description":"The visible menu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Menu"}}}}}}},"/api/agent/pricing":{"get":{"operationId":"getPricing","summary":"Live price list for new subscriptions, per plan size","responses":{"200":{"description":"Price list in ILS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pricing"}}}}}}},"/api/agent/coverage":{"get":{"operationId":"checkCoverage","summary":"Does HOMEMADE deliver to a city or locality","parameters":[{"name":"city","in":"query","required":true,"description":"City or locality name, Hebrew or English (e.g. רמת גן, Ramat Gan).","schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"Coverage answer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coverage"}}}},"400":{"description":"Missing city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/delivery":{"get":{"operationId":"getDeliveryDates","summary":"Order cutoff and first delivery dates for an order placed now","responses":{"200":{"description":"Delivery dates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}}}}}},"/api/agent/quote":{"get":{"operationId":"getQuote","summary":"Exact first-week and weekly price, plus a prefilled order link","parameters":[{"name":"plan","in":"query","required":true,"description":"Meals per week","schema":{"type":"integer","enum":[3,4,5,6,7,8,10,12,15]}},{"name":"city","in":"query","required":false,"description":"City or locality name, Hebrew or English (e.g. רמת גן, Ramat Gan).","schema":{"type":"string","maxLength":60}},{"name":"dishes","in":"query","required":false,"description":"Comma-separated dish ids from /api/agent/menu, up to the plan size","schema":{"type":"string","pattern":"^[0-9]+(,[0-9]+)*$"}}],"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Invalid plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/draft":{"post":{"operationId":"createOrderDraft","summary":"Prepare an order for the person to review: their details kept for 48 hours, and a checkout link where they are prefilled","description":"Creates no account, order, charge or message. The same input returns the same link. There is no field for notes, a gate code or a door sign: the person types those on the site.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequest"}}}},"responses":{"201":{"description":"The prepared order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"422":{"description":"A field is missing or not valid, the person's confirmation is missing, or the locality is not served","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily limit reached; use the order_url of /api/agent/quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/draft/{draft_id}":{"get":{"operationId":"getOrderDraftStatus","summary":"Whether a prepared-order link is still valid and whether it was opened. No personal details, no payment state","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status of the link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftStatus"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"},"message_he":{"type":"string"},"retryable":{"type":"boolean"},"fix":{"type":"string"}}},"DraftRequest":{"type":"object","required":["plan_size","city","full_name","email","phone","person_confirmed"],"additionalProperties":false,"properties":{"plan_size":{"type":"integer","enum":[3,4,5,6,7,8,10,12,15]},"city":{"type":"string","maxLength":60},"full_name":{"type":"string","minLength":2,"maxLength":80},"email":{"type":"string","format":"email","maxLength":120},"phone":{"type":"string","description":"Israeli mobile, 05XXXXXXXX"},"person_confirmed":{"const":true,"description":"The person saw the details and asked for the order to be prepared"},"dish_ids":{"type":"array","items":{"type":"integer"},"maxItems":15},"delivery_day":{"enum":["sunday","tuesday"]},"street":{"type":"string","maxLength":80},"house_number":{"type":"string","maxLength":10},"floor":{"type":"string","maxLength":10},"apartment":{"type":"string","maxLength":10},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}}},"Draft":{"type":"object","properties":{"draft_id":{"type":"string"},"checkout_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"summary":{"type":"object"},"quote":{"type":"object"},"next_step":{"type":"object","properties":{"actor":{"const":"person"},"actions":{"type":"array","items":{"type":"string"}}}},"allergy_notice":{"$ref":"#/components/schemas/AllergyNotice"}}},"DraftStatus":{"type":"object","properties":{"draft_id":{"type":"string"},"status":{"enum":["open","opened","handed_off","expired","not_found"]},"expires_at":{"type":["string","null"],"format":"date-time"}}},"AllergyNotice":{"type":"object","properties":{"he":{"type":"string"},"en":{"type":"string"},"terms_url":{"type":"string","format":"uri"}}},"Dish":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"name_en":{"type":["string","null"]},"description":{"type":"string"},"description_en":{"type":["string","null"]},"image_url":{"type":["string","null"],"format":"uri"},"ingredients":{"type":["string","null"]},"allergens":{"type":"array","items":{"type":"string"}},"side_variations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"side":{"type":["string","null"]}}}}}},"Menu":{"type":"object","properties":{"currency":{"const":"ILS"},"dish_count":{"type":"integer"},"dishes":{"type":"array","items":{"$ref":"#/components/schemas/Dish"}},"allergy_notice":{"$ref":"#/components/schemas/AllergyNotice"}}},"Pricing":{"type":"object","properties":{"currency":{"const":"ILS"},"plans":{"type":"array","items":{"type":"object","properties":{"plan_size":{"type":"integer"},"meals_per_week":{"type":"integer"},"price_per_meal_nis":{"type":"number"},"weekly_total_nis":{"type":"number"},"recommended":{"type":"boolean"}}}},"delivery_fee_nis":{"type":"number"},"first_week":{"type":"object","properties":{"gift_meals":{"type":"integer"},"discount_pct":{"type":"number"},"note":{"type":"string"}}},"settlement_gate":{"type":"object","properties":{"delivery_fee_nis":{"type":"number"},"note":{"type":"string"},"note_he":{"type":"string"}}}}},"Coverage":{"type":"object","properties":{"query":{"type":"string"},"status":{"enum":["served","not_served","unknown"]},"served":{"type":["boolean","null"]},"confidence":{"enum":["listed","unlisted"],"description":"listed: the name is on the published coverage list. unlisted: accepted by default, confirmed at signup."},"verify_at_checkout":{"type":"boolean"},"matched_city":{"type":["string","null"]},"message":{"type":"string"},"message_he":{"type":"string"},"settlement_gate":{"type":"object","properties":{"possible":{"type":"boolean"},"delivery_fee_nis":{"type":"number"},"note":{"type":"string"}}}}},"Delivery":{"type":"object","properties":{"timezone":{"const":"Asia/Jerusalem"},"order_cutoff":{"type":"string","format":"date-time"},"first_delivery_options":{"type":"array","items":{"type":"object","properties":{"delivery_day":{"enum":["sunday","tuesday"]},"first_delivery_date":{"type":"string","format":"date"},"window":{"type":"string"}}}}}},"Quote":{"type":"object","properties":{"currency":{"const":"ILS"},"plan_size":{"type":"integer"},"price_per_meal_nis":{"type":"number"},"meals_subtotal_nis":{"type":"number"},"delivery_fee_nis":{"type":"number"},"weekly_total_nis":{"type":"number"},"first_week":{"type":"object","properties":{"total_nis":{"type":"number"},"gift_meals":{"type":"integer"},"meals_delivered":{"type":"integer"}}},"settlement_gate":{"type":["object","null"],"properties":{"delivery_fee_nis":{"type":"number"},"weekly_total_nis":{"type":"number"},"first_week_total_nis":{"type":"number"}}},"coverage":{"oneOf":[{"$ref":"#/components/schemas/Coverage"},{"type":"null"}]},"dish_ids":{"type":"array","items":{"type":"integer"}},"order_url":{"type":["string","null"],"format":"uri"},"allergy_notice":{"$ref":"#/components/schemas/AllergyNotice"}}}}}}