# Get Favorites
> Source: /api-reference/members/collections/get-favorites
> Get all favorited properties, optionally filtered by collection
> Endpoint: GET /members/me/collections/favorites

## Overview [#overview]

Returns all favorited properties for the authenticated member. Can be filtered to show favorites from a specific collection or all favorites across collections.

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Query Parameters [#query-parameters]

<ParamField query="collectionId" type="number">
  Filter by collection ID. Omit to get all favorites, use `null` for default collection
</ParamField>

<RequestExample>

```bash cURL - All Favorites
curl -X GET "http://localhost:3000/v1/members/me/collections/favorites" \
  -H "Authorization: Bearer YOUR_CLERK_JWT"
```

```bash cURL - Specific Collection
curl -X GET "http://localhost:3000/v1/members/me/collections/favorites?collectionId=1" \
  -H "Authorization: Bearer YOUR_CLERK_JWT"
```

```typescript TypeScript
// Get all favorites
const response = await fetch('http://localhost:3000/v1/members/me/collections/favorites', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT'
  }
});

// Get favorites from specific collection
const response = await fetch('http://localhost:3000/v1/members/me/collections/favorites?collectionId=1', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT'
  }
});

const favorites = await response.json();
```

</RequestExample>

## Response [#response]

<ResponseField name="favorites" type="array" required>
  Array of favorited properties
  
  <Expandable title="array items">
    <ResponseField name="propertyDocumentId" type="string" required>
      Property document identifier
    </ResponseField>
    
    <ResponseField name="propertyName" type="string" required>
      Property name
    </ResponseField>
    
    <ResponseField name="propertySlug" type="string">
      Property URL slug for building links
    </ResponseField>
    
    <ResponseField name="heroImageUrl" type="string">
      Property hero image URL
    </ResponseField>
    
    <ResponseField name="collectionId" type="number">
      ID of the collection containing this favorite (null for default collection)
    </ResponseField>
    
    <ResponseField name="addedAt" type="string" required>
      ISO 8601 timestamp when property was favorited
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>

```json 200 Response - All Favorites
[
  {
    "propertyDocumentId": "prop_luxury_maldives",
    "propertyName": "Luxury Resort Maldives",
    "propertySlug": "luxury-resort-maldives",
    "heroImageUrl": "https://cdn.journey.com/properties/maldives-hero.jpg",
    "collectionId": 1,
    "addedAt": "2024-04-15T14:30:00Z"
  },
  {
    "propertyDocumentId": "prop_santorini_villa",
    "propertyName": "Santorini Villa",
    "propertySlug": "santorini-villa",
    "heroImageUrl": "https://cdn.journey.com/properties/santorini-hero.jpg",
    "collectionId": 1,
    "addedAt": "2024-04-16T09:20:00Z"
  },
  {
    "propertyDocumentId": "prop_tokyo_business",
    "propertyName": "Tokyo Business Hotel",
    "propertySlug": "tokyo-business-hotel",
    "heroImageUrl": "https://cdn.journey.com/properties/tokyo-business-hero.jpg",
    "collectionId": 2,
    "addedAt": "2024-04-10T16:45:00Z"
  },
  {
    "propertyDocumentId": "prop_paris_boutique",
    "propertyName": "Paris Boutique Hotel",
    "propertySlug": "paris-boutique-hotel",
    "heroImageUrl": "https://cdn.journey.com/properties/paris-boutique-hero.jpg",
    "collectionId": null,
    "addedAt": "2024-04-08T12:15:00Z"
  }
]
```

```json 200 Response - Specific Collection (collectionId=1)
[
  {
    "propertyDocumentId": "prop_luxury_maldives",
    "propertyName": "Luxury Resort Maldives",
    "propertySlug": "luxury-resort-maldives",
    "heroImageUrl": "https://cdn.journey.com/properties/maldives-hero.jpg",
    "collectionId": 1,
    "addedAt": "2024-04-15T14:30:00Z"
  },
  {
    "propertyDocumentId": "prop_santorini_villa",
    "propertyName": "Santorini Villa",
    "propertySlug": "santorini-villa",
    "heroImageUrl": "https://cdn.journey.com/properties/santorini-hero.jpg",
    "collectionId": 1,
    "addedAt": "2024-04-16T09:20:00Z"
  }
]
```

```json 200 Response - Default Collection (collectionId=null)
[
  {
    "propertyDocumentId": "prop_paris_boutique",
    "propertyName": "Paris Boutique Hotel",
    "propertySlug": "paris-boutique-hotel",
    "heroImageUrl": "https://cdn.journey.com/properties/paris-boutique-hero.jpg",
    "collectionId": null,
    "addedAt": "2024-04-08T12:15:00Z"
  }
]
```

</ResponseExample>

## Filtering Options [#filtering-options]

### All Favorites [#all-favorites]
- **No collectionId parameter**: Returns all favorites across all collections
- **Use case**: Master view of all favorited properties

### Specific Collection [#specific-collection]
- **collectionId=1**: Returns favorites only from collection ID 1
- **Use case**: View favorites within a specific themed collection

### Default Collection [#default-collection]
- **collectionId=null**: Returns favorites in the default (unsorted) collection
- **Use case**: View favorites that haven't been organized into collections

## Collection Associations [#collection-associations]

### collectionId Values [#collectionid-values]
- **null**: Property is in the default "Favorites" collection
- **number**: Property is in a specific user-created collection
- **Multiple**: Properties can be in multiple collections (not currently supported)

### Collection Context [#collection-context]
The `collectionId` field helps understand the organization:
- Use it to group favorites by collection in your UI
- Filter by collection for focused browsing experiences
- Show collection context when displaying individual favorites

## Sorting [#sorting]

Favorites are returned in chronological order:
- **Most Recent First**: Newest favorites appear first
- **addedAt Field**: Use for custom sorting if needed
- **Consistent**: Order is stable across requests

## Property Information [#property-information]

Each favorite includes:
- **Identification**: Document ID for API calls, slug for URLs
- **Display**: Name and hero image for UI rendering  
- **Context**: Collection membership and favorite date
- **Linking**: Slug can be used to build property detail URLs

## Related Endpoints [#related-endpoints]

- [Add Favorite](/api-reference/members/collections/add-favorite) - Add a property to favorites
- [Remove Favorite](/api-reference/members/collections/remove-favorite) - Remove a property from favorites
- [Check Favorite Status](/api-reference/members/collections/is-favorited) - Check if property is favorited
