# Lookup & Claim Reservation
> Source: /api-reference/members/reservations/lookup-claim
> Claim a reservation by confirmation code and guest details
> Endpoint: POST /members/me/reservations/lookup-claim

## Overview [#overview]

Claim a reservation by confirmation code and guest name, awarding loyalty points to the authenticated member. Accepts either check-in or check-out date — use whichever you have available from the booking source.

## Authentication [#authentication]

Requires a valid Clerk JWT token.

## Request Body [#request-body]

At least one of `confirmationCode` or `reservationId` is required. At least one of `checkOutDate` or `checkInDate` is required.

<ParamField body="confirmationCode" type="string">
  Reservation confirmation code. Required if `reservationId` not provided.
</ParamField>

<ParamField body="reservationId" type="string">
  Reservation external ID. Required if `confirmationCode` not provided.
</ParamField>

<ParamField body="lastName" type="string" required>
  Guest last name (must match reservation)
</ParamField>

<ParamField body="checkOutDate" type="string">
  Check-out date in `YYYY-MM-DD` format. Required if `checkInDate` not provided.
</ParamField>

<ParamField body="checkInDate" type="string">
  Check-in date in `YYYY-MM-DD` format. Required if `checkOutDate` not provided.
</ParamField>

## Response [#response]

<ResponseField name="claimed" type="boolean" required>
  Whether the claim succeeded
</ResponseField>

<ResponseField name="reservationId" type="string">
  External reservation ID (present on success)
</ResponseField>

<ResponseField name="pointsAwarded" type="number">
  Points credited to the member's wallet
</ResponseField>

<ResponseField name="errorCode" type="string">
  Present on failure — see error codes below
</ResponseField>

<RequestExample>

```bash Using Check-in Date
curl -X POST "https://api.journey.com/members/me/reservations/lookup-claim" \
  -H "Authorization: Bearer YOUR_CLERK_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "confirmationCode": "JRN123456",
    "lastName": "Smith",
    "checkInDate": "2024-03-10"
  }'
```

```bash Using Check-out Date
curl -X POST "https://api.journey.com/members/me/reservations/lookup-claim" \
  -H "Authorization: Bearer YOUR_CLERK_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "confirmationCode": "JRN123456",
    "lastName": "Smith",
    "checkOutDate": "2024-03-15"
  }'
```

```typescript TypeScript
const result = await fetch(
  'https://api.journey.com/members/me/reservations/lookup-claim',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${clerkToken}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      confirmationCode: 'JRN123456',
      lastName: 'Smith',
      checkInDate: '2024-03-10'
    })
  }
).then(r => r.json());

if (result.claimed) {
  console.log(`Earned ${result.pointsAwarded} points!`);
} else if (result.errorCode === 'CLAIMED_BY_OTHER') {
  // Redirect to claim/verify flow
}
```

</RequestExample>

<ResponseExample>

```json 200 Success
{
  "claimed": true,
  "reservationId": "RES_01J5XYZ",
  "pointsAwarded": 2500
}
```

```json 200 Failure - Claimed by Other
{
  "claimed": false,
  "errorCode": "CLAIMED_BY_OTHER"
}
```

</ResponseExample>

## Error Codes [#error-codes]

| Code | Meaning |
|------|---------|
| `NOT_FOUND` | No matching reservation |
| `ALREADY_CLAIMED` | Already claimed by this member |
| `CLAIMED_BY_OTHER` | Claimed by a different member — use `claim/verify` to resolve |
| `DATE_MISMATCH` | Date does not match reservation |
| `NAME_MISMATCH` | Last name does not match guest record |

---

## Claim Verify (Account Merge) [#claim-verify-account-merge]

When a reservation is claimed by a different member, verify identity to trigger an account merge. The reservation holder's account survives as the merge winner.

```
POST /members/me/reservations/:reservationId/claim/verify
```

Rate limited to **10 requests per 5 minutes per IP**.

<ParamField path="reservationId" type="string" required>
  Reservation external ID
</ParamField>

<ParamField body="clerkToken" type="string" required>
  Fresh Clerk JWT confirming the current user's identity
</ParamField>

### Response [#response-1]

<ResponseField name="merged" type="boolean" required>
  Whether the merge completed
</ResponseField>

<ResponseField name="mergeHistoryId" type="number">
  Merge history record ID (present when merged)
</ResponseField>

### Merge Behavior [#merge-behavior]

- The reservation holder's account is the **survivor**
- The current member's account merges into the reservation holder's
- The current member's Clerk session is invalidated — they must re-authenticate

<RequestExample>

```typescript TypeScript
const result = await fetch(
  'https://api.journey.com/members/me/reservations/RES_01J5XYZ/claim/verify',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${clerkToken}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ clerkToken: freshClerkJwt })
  }
).then(r => r.json());

if (result.merged) {
  await clerkSignOut();  // session invalidated — must re-auth
}
```

</RequestExample>

## Bruno [#bruno]

`bruno/Members (Surface)/Reservations/Lookup Claim.bru`
