Authentication Required
This endpoint requires API key authentication via Bearer token in the Authorization header.Path Parameters
Unique identifier for the customer to get recommendations for
Query Parameters
Whether to include segment-based recommendations in the response. Defaults to
false.
Filter recommendations by region (e.g., “BH” for Bahrain). Comma-separated
values for multiple regions.
Response
The API returns a JSON array of recommendation objects:| Field | Type | Description |
|---|---|---|
recommendation_id | string | Unique identifier for the recommendation |
name | string | Human-readable name for the recommendation set |
student_id | string | UUID of the customer (matches the path parameter) |
offers | array | Array of offer UUIDs that are recommended |
type | string | Type of recommendation (SELF or SEGMENT) |
Error Codes
| Status Code | Description |
|---|---|
| 200 | Recommendations retrieved successfully |
| 400 | Invalid customer_id format |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Customer not found |
| 500 | Internal server error |
Example
Best Practices
- Caching: Cache recommendations for frequently requested customers to improve performance
- Error Handling: Implement proper error handling for cases where no recommendations are available
- Rate Limiting: Be mindful of API rate limits (1000 requests per minute)
- Validation: Validate the customer_id format before making the request