Skip to main content

Authentication Required

This endpoint requires API key authentication via Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Path Parameters

customer_id
string (UUID)
required
Unique identifier for the customer to get recommendations for

Query Parameters

includeSegments
boolean
Whether to include segment-based recommendations in the response. Defaults to false.
regions
string
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:
[
  {
    "recommendation_id": "00000000-1234-5678-9abc-def012345678",
    "name": "Recommended For you",
    "student_id": "00000000-9779-438e-ae0d-b52099f6be51",
    "offers": [
      "00000000-e9c5-4b43-9d46-4cd02baabc6a",
      "00000002-c1f0-44d4-af13-32028f522f31",
      "00000001-4d21-4206-8ced-ff2a11162bf0"
    ],
    "type": "SELF"
  }
]
FieldTypeDescription
recommendation_idstringUnique identifier for the recommendation
namestringHuman-readable name for the recommendation set
student_idstringUUID of the customer (matches the path parameter)
offersarrayArray of offer UUIDs that are recommended
typestringType of recommendation (SELF or SEGMENT)

Error Codes

Status CodeDescription
200Recommendations retrieved successfully
400Invalid customer_id format
401Unauthorized - Invalid or missing API key
404Customer not found
500Internal server error

Example

curl -X GET "https://api.hellocobi.com/v1/recommendations/customers/00000000-9779-438e-ae0d-b52099f6be51?includeSegments=false&regions=BH" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Best Practices

  1. Caching: Cache recommendations for frequently requested customers to improve performance
  2. Error Handling: Implement proper error handling for cases where no recommendations are available
  3. Rate Limiting: Be mindful of API rate limits (1000 requests per minute)
  4. Validation: Validate the customer_id format before making the request
Need help? Contact our support team at [email protected]