API Overview
The Recommendation API provides personalized product recommendations and product management capabilities. This document outlines the available endpoints and how to use them.
Base URL
https://recommend.trydodo.xyz/api
Authentication
All API endpoints (except /health) require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Available Endpoints
Health Check
- GET
/health- Check API health status (no auth required)
Recommendation Endpoints
- POST
/recommend- Get personalized recommendations
Example:
curl -X POST "https://recommend.trydodo.xyz/api/recommend" \
-H "Authorization: Bearer <jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"user_id": "user123",
"num_recommendations": 5
}'
Product Endpoints
- POST
/products/upload- Create new products - GET
/products/get- Retrieve products
Response Format
All responses follow a consistent JSON format with appropriate HTTP status codes.
Error Handling
The API returns standard HTTP status codes and error messages in JSON format for failed requests.