API Reference
This page provides detailed information about the FelAIProductAdvisor API.
Recommendation API
Get Recommendations
GET /api/fel-ai-product-advisor/recommendations
Query Parameters
Parameter | Type | Description |
---|---|---|
productId | string | ID of the product to get recommendations for |
limit | integer | Number of recommendations to return (default: 5) |
algorithm | string | Algorithm to use (collaborative, content-based, hybrid) |
minConfidence | float | Minimum confidence score (0.0-1.0) |
Response
{
"recommendations": [
{
"id": "product-id-1",
"name": "Product Name",
"price": 19.99,
"thumbnailUrl": "https://example.com/image.jpg",
"url": "/detail/product-id-1",
"confidence": 0.95
},
// More products...
]
}
Get Customer Recommendations
GET /api/fel-ai-product-advisor/customer-recommendations
Query Parameters
Parameter | Type | Description |
---|---|---|
customerId | string | ID of the customer to get recommendations for |
limit | integer | Number of recommendations to return (default: 5) |
Response
Same as Get Recommendations.
Analytics API
Get Recommendation Performance
GET /api/fel-ai-product-advisor/analytics/performance
Query Parameters
Parameter | Type | Description |
---|---|---|
startDate | string | Start date (YYYY-MM-DD) |
endDate | string | End date (YYYY-MM-DD) |
Response
{
"clickThroughRate": 0.15,
"conversionRate": 0.05,
"totalImpressions": 10000,
"totalClicks": 1500,
"totalConversions": 500,
"revenue": 15000
}
Webhook API
Register Webhook
POST /api/fel-ai-product-advisor/webhooks
Request Body
{
"url": "https://your-server.com/webhook",
"events": ["recommendation.clicked", "recommendation.converted"],
"secret": "your-secret-key"
}
Response
{
"id": "webhook-id",
"url": "https://your-server.com/webhook",
"events": ["recommendation.clicked", "recommendation.converted"],
"createdAt": "2023-06-15T10:30:00Z"
}