{"openapi":"3.1.0","info":{"title":"Orlo Merchant API","version":"1","description":"Build and pay for restaurant orders. Payment via MPP (stripe/charge) for agents, Stripe Checkout for people."},"servers":[{"url":"https://merchant.orlo.today/api/v1"}],"paths":{"/merchants":{"get":{"summary":"List merchants, optionally near a point","parameters":[{"name":"near","in":"query","schema":{"type":"string"},"description":"lat,lng"},{"name":"radiusMiles","in":"query","schema":{"type":"number"}}]}},"/merchants/by-place/{placeId}":{"get":{"summary":"Merchant profile by Google place id"}},"/merchants/{slug}":{"get":{"summary":"Merchant profile, hours, fulfilment, payment details"}},"/merchants/{slug}/menu":{"get":{"summary":"Menu with item ids, prices, availability and modifier groups"}},"/merchants/{slug}/quotes":{"post":{"summary":"Price a cart. The only authority on cost.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"201":{"description":"Priced quote"},"422":{"description":"Every problem with the cart, at once"}}}},"/merchants/{slug}/orders":{"get":{"summary":"Payment details for this merchant (protocol, networkId)"},"post":{"summary":"Place an order from a quote. Responds 402 (MPP challenge) until paid with a Shared Payment Token.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"201":{"description":"Order placed"},"402":{"description":"MPP challenge at the quote total"},"409":{"description":"Quote expired or already used"}}}},"/merchants/{slug}/orders/{orderId}":{"get":{"summary":"Order status","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}]}},"/merchants/{slug}/checkout-sessions":{"post":{"summary":"Human checkout: a Stripe Checkout URL for a quote"}}},"components":{"schemas":{"QuoteRequest":{"type":"object","required":["items","fulfillment"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","quantity"],"properties":{"id":{"type":"string"},"quantity":{"type":"integer","minimum":1},"options":{"type":"array","items":{"type":"string"}}}}},"fulfillment":{"type":"string","enum":["pickup","delivery"]},"address":{"type":"string"}}},"OrderRequest":{"type":"object","required":["quoteId","contact"],"properties":{"quoteId":{"type":"string"},"contact":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"phone":{"type":"string"}}},"note":{"type":"string"}}},"Money":{"type":"integer","description":"Amount in cents (USD)"}}}}