Skip to main content

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

http://localhost:5051/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/recommend - Get personalized recommendations

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.