Skip to main content

API Reference

This page provides detailed information about the FelAIProductAdvisor API.

Recommendation API

Get Recommendations

GET /api/fel-ai-product-advisor/recommendations

Query Parameters

ParameterTypeDescription
productIdstringID of the product to get recommendations for
limitintegerNumber of recommendations to return (default: 5)
algorithmstringAlgorithm to use (collaborative, content-based, hybrid)
minConfidencefloatMinimum 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

ParameterTypeDescription
customerIdstringID of the customer to get recommendations for
limitintegerNumber 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

ParameterTypeDescription
startDatestringStart date (YYYY-MM-DD)
endDatestringEnd 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"
}