{"openapi":"3.0.3","info":{"title":"AgentPier Storefront API","description":"API for AI procurement agents to search, quote, negotiate, and order from B2B suppliers on AgentPier.","version":"1.0.0","contact":{"name":"AgentPier","url":"https://agentpier.co","email":"hello@agentpier.co"}},"servers":[{"url":"https://agentpier.co","description":"Production"}],"paths":{"/api/storefront/{slug}":{"get":{"summary":"Get supplier info","description":"Returns supplier details, certifications, product count, categories, and API endpoint URLs.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Supplier storefront slug"}],"responses":{"200":{"description":"Supplier info with API endpoints"},"404":{"description":"Storefront not found or offline"}}}},"/api/storefront/{slug}/search":{"get":{"summary":"Search products","description":"Search supplier products by name, category, material, and price range.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"min_price","in":"query","schema":{"type":"number"}},{"name":"max_price","in":"query","schema":{"type":"number"}},{"name":"page","in":"query","schema":{"type":"integer","default":0}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"Product search results with pagination"}}}},"/api/storefront/{slug}/quote":{"post":{"summary":"Request a quote","description":"Get itemized pricing with volume discounts applied for specified products and quantities.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"quantity":{"type":"integer"}}}},"agent_company":{"type":"string"}}}}}},"responses":{"200":{"description":"Itemized quote with discounts"}}}},"/api/storefront/{slug}/negotiate":{"post":{"summary":"Negotiate pricing","description":"Submit price offers for AI-powered negotiation. Available for Growth and Scale suppliers only.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"quantity":{"type":"integer"},"offered_price":{"type":"number"}}}},"agent_company":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"200":{"description":"Negotiation response (accept, counter, or reject)"},"400":{"description":"Supplier does not support negotiation"}}}},"/api/storefront/{slug}/order":{"post":{"summary":"Place an order","description":"Place a purchase order. May be auto-approved based on supplier rules.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"quantity":{"type":"integer"},"agreed_price":{"type":"number"}}}},"delivery_address":{"type":"string"},"payment_terms":{"type":"string"},"agent_company":{"type":"string"},"agent_identifier":{"type":"string"}}}}}},"responses":{"200":{"description":"Order confirmation with order number and status"}}}}}}