{"openapi":"3.1.0","info":{"title":"Suplementor API","version":"1.0.0","description":"Public discovery and paid x402 endpoints for Suplementor agents."},"paths":{"/api/v1/x402/products":{"get":{"summary":"Search products with x402 payment","description":"Returns a product list after x402 payment verification or settlement.","operationId":"search-products","responses":{"200":{"description":"Success"},"402":{"description":"Payment required"}},"x-x402":{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"5000","maxTimeoutSeconds":300,"extra":{"assetTransferMethod":"eip3009"}}],"discovery":{"bazaar":{"info":{"input":{"type":"http","method":"GET","queryParams":{"q":"vitamin","page":1,"limit":20,"showOffMarket":false}},"inputSchema":{"type":"object","properties":{"q":{"type":"string","description":"Free-text product search query."},"page":{"type":"integer","minimum":1,"description":"Page number (1-based)."},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Page size (max 100)."},"showOffMarket":{"type":"boolean","description":"Include off-market products when true."}},"required":["q"]},"output":{"type":"json","example":{"data":[{"id":123,"name":"Vitamin C 1000","brand_name":"Example Labs"}],"page":1,"limit":20,"total":1,"totalPages":1}},"routeTemplate":"/api/v1/x402/products"}}}}}},"/api/v1/x402/products/{id}":{"get":{"summary":"Get product detail with x402 payment","description":"Returns a product detail payload after x402 payment verification or settlement.","operationId":"product-detail","responses":{"200":{"description":"Success"},"402":{"description":"Payment required"}},"x-x402":{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000","maxTimeoutSeconds":300,"extra":{"assetTransferMethod":"eip3009"}}],"discovery":{"bazaar":{"info":{"input":{"type":"http","method":"GET","pathParams":{"id":"123"}},"inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"Product ID in the Suplementor catalog."}},"required":["id"]},"output":{"type":"json","example":{"data":{"id":123,"name":"Vitamin D3 1000 IU","brand_name":"Example Labs","ingredients":[{"raw_name":"Vitamin D3","quantity":25,"unit":"mcg","raw_quantity":1000,"raw_unit":"IU"}]}}},"routeTemplate":"/api/v1/x402/products/:id"}}}}}},"/api/v1/x402/submissions":{"post":{"summary":"Submit a product with x402 payment","description":"Creates a product submission after payment verification, replay, and balance checks. The submitting wallet is the x402 payer.","operationId":"submission","responses":{"200":{"description":"Success"},"402":{"description":"Payment required"}},"x-x402":{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000","maxTimeoutSeconds":300,"extra":{"assetTransferMethod":"eip3009"}}],"discovery":{"bazaar":{"info":{"input":{"type":"http","method":"POST","body":{"name":"Vitamin C 1000","official_product_url":"https://example.com/products/vitamin-c-1000","brand_name":"Example Labs","ingredients":[{"raw_name":"Vitamin C","raw_quantity":1000,"raw_unit":"mg"}]}},"inputSchema":{"type":"object","description":"The submitting wallet is the x402 payer (from the X-PAYMENT authorization), so no wallet_address/signature fields are required in the body.","properties":{"name":{"type":"string","description":"Product name."},"official_product_url":{"type":"string","description":"Official product page URL."},"brand_name":{"type":"string","description":"Brand name (optional)."},"ingredients":{"type":"array","minItems":1,"description":"Required ingredient list as seen on label.","items":{"type":"object","properties":{"raw_name":{"type":"string"},"raw_quantity":{"type":"number","exclusiveMinimum":0},"raw_unit":{"type":"string","enum":["mcg","mg","g","kg","ml","l","IU"]},"substance_id":{"type":["integer","null"]},"order":{"type":"integer","minimum":0}},"required":["raw_name","raw_quantity","raw_unit"]}}},"required":["name","official_product_url","ingredients"]},"output":{"type":"json","example":{"data":{"id":321,"name":"Vitamin C 1000","approval_status":"pending","submitted_by_wallet_address":"0xabc123..."}}},"routeTemplate":"/api/v1/x402/submissions"}}}}}},"/api/v1/x402/usage":{"post":{"summary":"Get wallet usage summary (signature-authenticated)","description":"Returns usage metrics and submitted product statuses for the signed wallet. This endpoint is free and does not require x402 payment settlement.","operationId":"usage-summary","responses":{"200":{"description":"Usage summary"},"401":{"description":"Invalid or expired wallet signature"}},"x-x402":{"x402Version":2,"accepts":[],"discovery":{"bazaar":{"info":{"input":{"type":"http","method":"POST","body":{"wallet_address":"0xabc123...","signature":"0xsignature...","nonce_timestamp":"2026-06-17T20:06:02.844Z"}},"inputSchema":{"type":"object","properties":{"wallet_address":{"type":"string","description":"Agent EVM wallet address to inspect."},"signature":{"type":"string","description":"EIP-191 signature over canonical usage payload (wallet + nonce timestamp)."},"nonce_timestamp":{"type":"string","description":"ISO timestamp signed with payload (anti-replay)."}},"required":["wallet_address","signature","nonce_timestamp"]},"output":{"type":"json","example":{"data":{"wallet_address":"0xabc123...","searches_count":42,"products_fetched_count":18,"outstanding_credits":0,"submitted_products":[{"id":321,"name":"Vitamin C 1000","status":"pending","official_product_url":"https://example.com/products/vitamin-c-1000","approved_product_id":null,"created_at":"2026-01-01T00:00:00.000Z"}]}}},"routeTemplate":"/api/v1/x402/usage"}}}}}},"/api/v1/x402/discovery":{"get":{"summary":"Public x402 discovery index","description":"Machine-readable list of x402-capable routes.","operationId":"x402-discovery-index","responses":{"200":{"description":"Discovery document"}}}}}}