Endpoints
Segment Recommendations
Get recommendations for a specific customer segment based on collective preferences.
Segment Recommendations
Authentication Required
This endpoint requires API key authentication via Bearer token in the Authorization header.Path Parameters
Unique identifier for the customer segment to get recommendations for
Response
The API returns a JSON object with segment recommendations:| Field | Type | Description |
|---|---|---|
recommendation_id | string | Unique identifier for the recommendation |
name | string | Human-readable name for the segment |
segment_id | string | Identifier of the segment (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 segment_id format |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Segment not found |
| 500 | Internal server error |
Example
Best Practices
- Caching: Cache segment recommendations as they change less frequently than individual customer recommendations
- 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 segment_id format before making the request