{"version":"1.0","name":"UCP Demo Store","description":"An online store selling electronics, fashion, and home products. Prices in INR.","currency":"INR","capabilities":["products","checkout","orders","identity_linking"],"flows":{"browse":{"description":"Browse and search the product catalog","steps":["list_products"],"endpoints":{"list_products":{"method":"GET","path":"/products","auth_required":false,"params":{"category":{"type":"string","required":false,"description":"Filter by category (electronics, fashion, home)"}},"response":{"type":"array","item_fields":["id","name","price","category","description","inventory","imageUrl"]}},"get_product":{"method":"GET","path":"/products/{product_id}","auth_required":false}}},"identity_linking":{"description":"Link user's identity via OAuth 2.0 with agent polling pattern","method":"oauth2_agent_polling","steps":["generate_session_id","redirect_user_to_login","poll_for_token"],"login_url_template":"http://ucp.c0a1.in/oauth/authorize?client_id={agent_id}&redirect_uri=http://ucp.c0a1.in/agent/callback?session_id={session_id}&state={session_id}","poll_endpoint":"http://ucp.c0a1.in/agent/session/{session_id}","poll_interval_ms":2000,"poll_max_attempts":30,"token_type":"Bearer","token_lifetime_seconds":3600,"poll_response":{"pending":{"status":"pending"},"success":{"status":"linked","token":"<jwt>","email":"<user_email>"}}},"purchase":{"description":"Complete purchase flow: create session → add buyer info → complete","auth_required":true,"steps":[{"name":"create_session","method":"POST","path":"/checkout/sessions","description":"Create a checkout session with items from the catalog","request_body":{"line_items":{"type":"array","items":{"id":{"type":"string","description":"Product ID from /products","maps_to":"product.id"},"name":{"type":"string","description":"Product name","maps_to":"product.name"},"quantity":{"type":"integer","description":"Number to purchase"},"price":{"type":"number","description":"Unit price in INR","maps_to":"product.price"}}}},"response_status":"incomplete","next_step":"update_buyer"},{"name":"update_buyer","method":"POST","path":"/checkout/sessions/{session_id}/update","description":"Add buyer shipping and payment info","request_body":{"buyer":{"email":{"type":"string","required":true},"shipping_address":{"street":{"type":"string","required":false},"city":{"type":"string","required":true},"state":{"type":"string","required":true},"zip":{"type":"string","required":false}},"payment_method":{"type":"string","default":"razorpay","description":"Use 'razorpay' for this merchant"}}},"response_status":"ready_for_complete","next_step":"complete"},{"name":"complete","method":"POST","path":"/checkout/sessions/{session_id}/complete","description":"Finalize the purchase and create the order","response_status":"complete","response_includes":["order_id"]}]},"order_tracking":{"description":"Check order status after purchase","auth_required":true,"endpoints":{"get_order":{"method":"GET","path":"/orders/{order_id}","response_fields":["id","status","line_items","buyer","total","tracking_url"]},"list_orders":{"method":"GET","path":"/orders","description":"List all orders for the authenticated user"}}}},"openapi_url":"http://ucp.c0a1.in/openapi.json","oauth":{"authorization_endpoint":"http://ucp.c0a1.in/oauth/authorize","token_endpoint":"http://ucp.c0a1.in/oauth/token","agent_callback_endpoint":"http://ucp.c0a1.in/agent/callback","agent_session_endpoint":"http://ucp.c0a1.in/agent/session/{session_id}"}}