# Get Notifications
> Source: /api-reference/members/notifications/get-notifications
> Get paginated list of notifications with optional filtering
> Endpoint: GET /members/me/notifications

## Overview [#overview]

Returns a paginated list of notifications for the authenticated member. Notifications include system messages, wallet updates, reservation confirmations, and other important updates.

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Query Parameters [#query-parameters]

<ParamField query="limit" type="number">
  Maximum number of notifications to return (default: 20, max: 100)
</ParamField>

<ParamField query="offset" type="number">
  Number of notifications to skip for pagination (default: 0)
</ParamField>

<ParamField query="sortOrder" type="string">
  Sort order: "asc" or "desc" (default: "desc" - newest first)
</ParamField>

<ParamField query="read" type="boolean">
  Filter by read status: true for read only, false for unread only, omit for all
</ParamField>

<ParamField query="wallet" type="boolean">
  Filter for wallet-related notifications only (points, transactions, etc.)
</ParamField>

<RequestExample>

```bash cURL - All Notifications
curl -X GET "http://localhost:3000/v1/members/me/notifications?limit=10" \
  -H "Authorization: Bearer YOUR_CLERK_JWT"
```

```bash cURL - Unread Only
curl -X GET "http://localhost:3000/v1/members/me/notifications?read=false&limit=10" \
  -H "Authorization: Bearer YOUR_CLERK_JWT"
```

```bash cURL - Wallet Notifications
curl -X GET "http://localhost:3000/v1/members/me/notifications?wallet=true&limit=10" \
  -H "Authorization: Bearer YOUR_CLERK_JWT"
```

```typescript TypeScript
// Get recent unread notifications
const response = await fetch('http://localhost:3000/v1/members/me/notifications?read=false&limit=10', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT'
  }
});

// Get wallet notifications
const response = await fetch('http://localhost:3000/v1/members/me/notifications?wallet=true', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT'
  }
});

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

</RequestExample>

## Response [#response]

<ResponseField name="items" type="array" required>
  List of notification objects
  
  <Expandable title="array items">
    <ResponseField name="id" type="number" required>
      Unique notification ID
    </ResponseField>
    
    <ResponseField name="type" type="string" required>
      Notification type: "wallet", "reservation", "system", "promotion", etc.
    </ResponseField>
    
    <ResponseField name="title" type="string">
      Notification title/subject
    </ResponseField>
    
    <ResponseField name="message" type="string">
      Notification message content
    </ResponseField>
    
    <ResponseField name="messageParts" type="object">
      Structured message parts for rich formatting
    </ResponseField>
    
    <ResponseField name="isRead" type="boolean" required>
      Whether the notification has been marked as read
    </ResponseField>
    
    <ResponseField name="isWallet" type="boolean" required>
      Whether this is a wallet-related notification
    </ResponseField>
    
    <ResponseField name="metadata" type="object">
      Additional notification metadata (links, actions, etc.)
    </ResponseField>
    
    <ResponseField name="createdAt" type="string" required>
      ISO 8601 timestamp when notification was created
    </ResponseField>
    
    <ResponseField name="updatedAt" type="string" required>
      ISO 8601 timestamp when notification was last updated
    </ResponseField>
    
    <ResponseField name="readAt" type="string">
      ISO 8601 timestamp when notification was marked as read (null if unread)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number" required>
  Total number of notifications matching filters
</ResponseField>

<ResponseField name="limit" type="number" required>
  Current pagination limit
</ResponseField>

<ResponseField name="offset" type="number" required>
  Current pagination offset
</ResponseField>

<ResponseExample>

```json 200 Response
{
  "items": [
    {
      "id": 1234,
      "type": "wallet",
      "title": "Points Earned",
      "message": "You earned 2,500 points from your recent stay at Luxury Resort Bali",
      "messageParts": {
        "action": "points_earned",
        "amount": 2500,
        "source": "reservation",
        "propertyName": "Luxury Resort Bali"
      },
      "isRead": false,
      "isWallet": true,
      "metadata": {
        "reservationId": "550e8400-e29b-41d4-a716-446655440000",
        "propertyId": "prop_luxury_resort_bali",
        "pointsType": "VALID"
      },
      "createdAt": "2024-04-20T10:30:00Z",
      "updatedAt": "2024-04-20T10:30:00Z",
      "readAt": null
    },
    {
      "id": 1233,
      "type": "reservation",
      "title": "Booking Confirmed",
      "message": "Your reservation at Tokyo Business Hotel is confirmed for May 15-17",
      "messageParts": {
        "action": "booking_confirmed",
        "propertyName": "Tokyo Business Hotel",
        "checkIn": "2024-05-15",
        "checkOut": "2024-05-17"
      },
      "isRead": true,
      "isWallet": false,
      "metadata": {
        "reservationId": "550e8400-e29b-41d4-a716-446655440001",
        "confirmationCode": "ABC123",
        "actionUrl": "/reservations/550e8400-e29b-41d4-a716-446655440001"
      },
      "createdAt": "2024-04-18T14:20:00Z",
      "updatedAt": "2024-04-18T16:45:00Z",
      "readAt": "2024-04-18T16:45:00Z"
    },
    {
      "id": 1232,
      "type": "promotion",
      "title": "Limited Time Offer",
      "message": "Get 25% bonus points on your next booking this weekend",
      "messageParts": {
        "action": "promotion",
        "bonusPercent": 25,
        "expiryDate": "2024-04-22"
      },
      "isRead": false,
      "isWallet": false,
      "metadata": {
        "campaignId": "weekend-bonus-2024",
        "actionUrl": "/discover/featured",
        "cta": "Book Now"
      },
      "createdAt": "2024-04-17T09:00:00Z",
      "updatedAt": "2024-04-17T09:00:00Z",
      "readAt": null
    },
    {
      "id": 1231,
      "type": "system",
      "title": "Profile Updated",
      "message": "Your travel preferences have been updated successfully",
      "messageParts": {
        "action": "profile_updated",
        "section": "travelPreferences"
      },
      "isRead": true,
      "isWallet": false,
      "metadata": {
        "actionUrl": "/profile"
      },
      "createdAt": "2024-04-16T11:15:00Z",
      "updatedAt": "2024-04-16T12:00:00Z",
      "readAt": "2024-04-16T12:00:00Z"
    }
  ],
  "total": 47,
  "limit": 10,
  "offset": 0
}
```

</ResponseExample>

## Notification Types [#notification-types]

### wallet [#wallet]
- **Purpose**: Points earned, spent, transfers, balance updates
- **isWallet**: Always true
- **Common Metadata**: `pointsType`, `amount`, `reservationId`

### reservation [#reservation]
- **Purpose**: Booking confirmations, check-in reminders, modifications
- **isWallet**: Always false  
- **Common Metadata**: `reservationId`, `confirmationCode`, `actionUrl`

### promotion [#promotion]
- **Purpose**: Special offers, bonus campaigns, member benefits
- **isWallet**: Usually false
- **Common Metadata**: `campaignId`, `expiryDate`, `cta`

### system [#system]
- **Purpose**: Account updates, profile changes, system messages
- **isWallet**: Usually false
- **Common Metadata**: `actionUrl`, `section`

## Filtering Options [#filtering-options]

### By Read Status [#by-read-status]
- **read=true**: Only read notifications
- **read=false**: Only unread notifications
- **Omitted**: All notifications (both read and unread)

### By Category [#by-category]
- **wallet=true**: Only wallet-related notifications (points, transactions)
- **wallet=false**: Only non-wallet notifications
- **Omitted**: All notification types

### Sorting [#sorting]
- **sortOrder="desc"**: Newest first (default)
- **sortOrder="asc"**: Oldest first

## Message Structure [#message-structure]

### Simple Text [#simple-text]
- **message**: Plain text notification
- **title**: Optional title/subject

### Rich Messages [#rich-messages]
- **messageParts**: Structured data for rich formatting
- **metadata**: Additional context and actions
- **actionUrl**: Deep link for user actions

### Example Rich Message [#example-rich-message]
```json
{
  "messageParts": {
    "action": "points_earned",
    "amount": 2500,
    "source": "reservation",
    "propertyName": "Luxury Resort Bali"
  },
  "metadata": {
    "reservationId": "550e8400...",
    "actionUrl": "/reservations/550e8400..."
  }
}
```

## Related Endpoints [#related-endpoints]

- [Get Unread Count](/api-reference/members/notifications/get-unread-count) - Get count of unread notifications
- [Mark as Read](/api-reference/members/notifications/mark-read) - Mark specific notification as read
- [Mark as Unread](/api-reference/members/notifications/mark-unread) - Mark specific notification as unread
