{"openapi":"3.1.0","info":{"title":"BULKRAZORS ordering API","version":"1.0.0","description":"Order bulk disposable razors shipped to a US address. Quote first, then pay the quote with x402 (USDC) or by card."},"servers":[{"url":"https://bulkrazors.com"}],"paths":{"/api/v1/quote":{"post":{"summary":"Price a quantity shipped to an address (live carrier rates)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["quantity","address"],"properties":{"quantity":{"type":"integer","minimum":1,"maximum":10000},"address":{"type":"object","required":["name","phone","line1","city","state","zip"],"properties":{"name":{"type":"string","example":"Jane Doe"},"company":{"type":"string","example":"Optional Co"},"phone":{"type":"string","example":"603-555-0100"},"email":{"type":"string","example":"optional@example.com"},"line1":{"type":"string","example":"1 Main St"},"line2":{"type":"string","example":"Suite 2"},"city":{"type":"string","example":"Keene"},"state":{"type":"string","example":"NH"},"zip":{"type":"string","example":"03431"}}}}}}}},"responses":{"201":{"description":"Quote","content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"quantity":{"type":"integer"},"razors":{"type":"object","properties":{"cents":{"type":"integer"},"usd":{"type":"string","example":"12.34"}}},"shipping":{"type":"object"},"total":{"type":"object","properties":{"cents":{"type":"integer"},"usd":{"type":"string","example":"12.34"}}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/v1/orders":{"post":{"summary":"Place and pay for an order with x402","description":"Unpaid requests get HTTP 402 with x402 v2 payment requirements for the quote total. Retry with the PAYMENT-SIGNATURE header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["quote_id"],"properties":{"quote_id":{"type":"string"}}}}}},"responses":{"201":{"description":"Order placed and paid"},"402":{"description":"Payment required (x402)"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"410":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/v1/orders/{order_id}":{"get":{"summary":"Order status and tracking","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/checkout":{"post":{"summary":"Pay a quote by card (returns a Stripe Checkout URL for a human)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string"}}}}}},"responses":{"200":{"description":"{ url }"},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"410":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}