Get user's likes
Retrieve the current user’s liked items with optional filtering by type.
Authentication Required: Yes - Valid JWT token in Authorization header
Query Parameters:
- type (optional): Filter by type (restaurant, hotel, flight, experience)
- page (optional): Page number (default: 1, minimum: 1)
- limit (optional): Items per page (default: 20, minimum: 1, maximum: 100)
Response includes:
- success: Boolean indicating success
- data: Object containing likes data
- items: Array of liked items with details
- id: Like record ID
- listId: List ID (default likes list)
- type: Type of item (restaurant, hotel, flight, experience)
- productId: ID of the item
- addedAt: When the item was added to likes
- notes: Optional notes for the item
- [type]: Product object (if available)
- pagination: Pagination information
- page: Current page number
- limit: Items per page
- total: Total number of items
- totalPages: Total number of pages
- hasNext: Whether there’s a next page
- hasPrev: Whether there’s a previous page
- items: Array of liked items with details
Usage:
- Generate a test token using the
/auth/generate-test-tokenendpoint - Include the token in the Authorization header:
Bearer <token> - Call this endpoint to retrieve the user’s likes
Note: This endpoint returns items from the user’s default “Likes” list.
Error Handling:
- 400: Invalid query parameters (invalid page/limit values, invalid type)
- 401: Invalid or missing JWT token
- 503: Database service temporarily unavailable
- 500: Internal server error
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Response
User likes retrieved successfully
success
data
Errors
400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error
503
Service Unavailable Error

