{"openapi":"3.0.3","info":{"title":"Pointbasin Agentic Commerce API","version":"1.0.0","description":"Pointbasin's mobile API for agentic commerce. Browse merchants and products, chat with the Pointbasin shopping agent over SSE, and place orders on a user's behalf."},"servers":[{"url":"https://pointbasin.com/api/v1"}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-payvory-key"}},"schemas":{"Merchant":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"brand_color":{"type":"string"},"logo_emoji":{"type":"string"},"hero_image_url":{"type":"string","nullable":true}}},"Product":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"price_cents":{"type":"integer"},"image_url":{"type":"string"},"category":{"type":"string"},"rating":{"type":"number"},"review_count":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}}}},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"customer_name":{"type":"string"},"agent_surface":{"type":"string"},"items":{"type":"array","items":{"type":"object"}},"subtotal_cents":{"type":"integer"},"total_cents":{"type":"integer"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"deep_link":{"type":"string"},"web_url":{"type":"string"}}}}},"security":[{"ApiKey":[]}],"paths":{"/merchants":{"get":{"summary":"List all merchants","responses":{"200":{"description":"OK"}}}},"/merchants/{slug}":{"get":{"summary":"Get a single merchant with its products","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/products":{"get":{"summary":"Search/list products","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"merchant","in":"query","schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"max_price_cents","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}}],"responses":{"200":{"description":"OK"}}}},"/products/{id}":{"get":{"summary":"Get a product by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/orders":{"get":{"summary":"List recent orders"},"post":{"summary":"Place an order on the user's behalf","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["product_id","quantity"],"properties":{"product_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer","minimum":1,"maximum":10}}}},"customer_name":{"type":"string"},"agent_surface":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"}}}},"/orders/{id}":{"get":{"summary":"Get an order by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/agent/chat":{"post":{"summary":"Stream a Pointbasin shopping agent response (Server-Sent Events)","description":"POST a message and optional history. Response is text/event-stream. Each event is JSON: { type: 'token'|'tool_call'|'tool_result'|'done'|'error', ... }.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"history":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}}}},"surface":{"type":"string","default":"mobile"}}}}}},"responses":{"200":{"description":"SSE stream"}}}}}}