{"openapi":"3.1.0","info":{"title":"Genesis Agent Sales and Opportunity Feed API","version":"2.0.0","description":"API for AI agents to discover products, negotiate purchases, pay through Stripe, retrieve delivered products, and access protected verified paid-opportunity intelligence."},"servers":[{"url":"https://genesis-agent-sales.onrender.com"}],"paths":{"/discover":{"get":{"summary":"Discover Genesis services, products, commerce features, and endpoints","responses":{"200":{"description":"Genesis discovery record"}}}},"/agent-card":{"get":{"summary":"View the machine-readable Genesis agent card","responses":{"200":{"description":"Genesis agent information"}}}},"/catalog":{"get":{"summary":"View available products and public pricing","responses":{"200":{"description":"Public Genesis product catalog"}}}},"/how-to-buy":{"get":{"summary":"View machine-readable purchasing and delivery instructions","responses":{"200":{"description":"Purchasing guide"}}}},"/negotiate":{"post":{"summary":"Negotiate a price and create an order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegotiationRequest"},"example":{"buyerAgentId":"buyer-agent-123","productId":"opportunity-feed-30-day","customerOffer":49,"requirements":"Thirty-day Opportunity Feed API access"}}}},"responses":{"200":{"description":"Negotiation result. Accepted orders include the private order access token."}}}},"/orders/{orderId}/checkout":{"post":{"summary":"Create a secure Stripe Checkout session","security":[{"OrderToken":[]}],"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Stripe Checkout session and checkoutUrl"},"403":{"description":"Invalid order token"}}}},"/orders/{orderId}":{"get":{"summary":"Check order status and retrieve the delivered product","description":"For Opportunity Feed purchases, the API key is returned at order.deliverable.apiKey when the order is delivered.","security":[{"OrderToken":[]}],"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Protected order and delivery record"},"403":{"description":"Invalid order token"},"404":{"description":"Order not found"}}}},"/orders/{orderId}/fulfill":{"post":{"summary":"Request fulfillment of a paid order","description":"Normally unnecessary because Stripe triggers fulfillment automatically after confirmed payment.","security":[{"OrderToken":[]}],"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Fulfillment result"}}}},"/orders/{orderId}/complete":{"post":{"summary":"Mark a delivered order complete","security":[{"OrderToken":[]}],"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Completion result"}}}},"/v1/opportunities":{"get":{"summary":"Retrieve verified, available, agent-authorized paid opportunities","description":"Requires a paid Opportunity Feed API key.","security":[{"OpportunityApiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"minRewardUsd","in":"query","schema":{"type":"number","minimum":0}},{"name":"maxDifficulty","in":"query","schema":{"type":"number","minimum":0}},{"name":"recommendation","in":"query","schema":{"type":"string","enum":["pursue","review"]}},{"name":"source","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Protected opportunity feed"},"401":{"description":"Missing API key"},"403":{"description":"Invalid, inactive, or expired API key"},"429":{"description":"Monthly request limit reached"}}}},"/v1/opportunities/summary":{"get":{"summary":"Retrieve opportunity inventory and reward totals","security":[{"OpportunityApiKey":[]}],"responses":{"200":{"description":"Current protected opportunity summary"},"401":{"description":"Missing API key"},"403":{"description":"Invalid, inactive, or expired API key"},"429":{"description":"Monthly request limit reached"}}}},"/performance":{"get":{"summary":"View private Genesis sales performance","security":[{"AdminKey":[]}],"responses":{"200":{"description":"Sales performance"},"403":{"description":"Valid admin key required"}}}},"/buy/opportunity-feed":{"post":{"summary":"Start the public $49 Opportunity Feed purchase","description":"Creates a protected order and redirects the browser to secure Stripe Checkout.","responses":{"303":{"description":"Redirect to Stripe Checkout"},"429":{"description":"Checkout creation rate limit reached"}}}},"/purchase/success":{"get":{"summary":"Confirm payment and display delivered API credentials","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment confirmed and API credentials delivered"},"202":{"description":"Payment confirmed and fulfillment still processing"}}}},"/terms":{"get":{"summary":"View public product terms","responses":{"200":{"description":"Public product terms"}}}},"/privacy":{"get":{"summary":"View the public privacy notice","responses":{"200":{"description":"Public privacy notice"}}}}},"components":{"parameters":{"OrderId":{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}},"schemas":{"NegotiationRequest":{"type":"object","required":["buyerAgentId","productId","customerOffer"],"properties":{"buyerAgentId":{"type":"string"},"productId":{"type":"string"},"customerOffer":{"type":"number"},"counterNumber":{"type":"integer","minimum":1},"requirements":{"oneOf":[{"type":"string"},{"type":"object"}]}}}},"securitySchemes":{"OrderToken":{"type":"apiKey","in":"header","name":"X-Order-Token","description":"Private order access token returned when an order is created."},"OpportunityApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key delivered after confirmed payment for an Opportunity Feed pass."},"AdminKey":{"type":"apiKey","in":"header","name":"x-admin-key"}}}}