# Check Favorite Status
> Source: /api-reference/members/collections/is-favorited
> Check if a property is favorited by the member
> Endpoint: GET /members/me/collections/favorites/{propertyDocumentId}/status

## Overview [#overview]

Returns whether the specified property is currently favorited by the authenticated member. Useful for showing the correct favorite state in UI (filled vs empty heart icons).

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Path Parameters [#path-parameters]

<ParamField path="propertyDocumentId" type="string" required>
  Property document ID to check favorite status for
</ParamField>

<RequestExample>

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

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

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

</RequestExample>

## Response [#response]

<ResponseField name="isFavorited" type="boolean" required>
  Whether the property is currently favorited by the member
</ResponseField>

<ResponseExample>

```json 200 Response - Is Favorited
{
  "isFavorited": true
}
```

```json 200 Response - Not Favorited
{
  "isFavorited": false
}
```

</ResponseExample>

## Use Cases [#use-cases]

### UI State Management [#ui-state-management]
```typescript
// Check favorite status before rendering property card
const checkFavoriteStatus = async (propertyId: string) => {
  const response = await fetch(`/api/members/me/collections/favorites/${propertyId}/status`);
  const { isFavorited } = await response.json();
  
  // Update UI accordingly
  setHeartIcon(isFavorited ? 'filled' : 'empty');
};
```

### Preventing Duplicates [#preventing-duplicates]
```typescript
// Check before adding to prevent 409 errors
const addToFavorites = async (propertyId: string) => {
  const statusResponse = await fetch(`/api/members/me/collections/favorites/${propertyId}/status`);
  const { isFavorited } = await statusResponse.json();
  
  if (!isFavorited) {
    // Safe to add
    await fetch('/api/members/me/collections/favorites', {
      method: 'POST',
      body: JSON.stringify({ propertyDocumentId: propertyId })
    });
  }
};
```

### Bulk Status Checking [#bulk-status-checking]
```typescript
// Check multiple properties (call this endpoint for each)
const checkMultipleFavorites = async (propertyIds: string[]) => {
  const statuses = await Promise.all(
    propertyIds.map(async (id) => {
      const response = await fetch(`/api/members/me/collections/favorites/${id}/status`);
      const { isFavorited } = await response.json();
      return { propertyId: id, isFavorited };
    })
  );
  return statuses;
};
```

## Performance Notes [#performance-notes]

### Caching [#caching]
- **Fast Response**: Optimized for quick UI state checks
- **Safe to Cache**: Results can be cached briefly for UI responsiveness
- **Invalidation**: Cache should be invalidated when adding/removing favorites

### Rate Limits [#rate-limits]
- **Frequent Calls**: Safe to call frequently for UI updates
- **Batch Considerations**: For many properties, consider checking only visible items

## Related Endpoints [#related-endpoints]

- [Add Favorite](/api-reference/members/collections/add-favorite) - Add property to favorites
- [Remove Favorite](/api-reference/members/collections/remove-favorite) - Remove from favorites
- [Get Favorites](/api-reference/members/collections/get-favorites) - Get all favorited properties
