> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claim Perk

> Claims a perk on behalf of the authenticated customer, returning a redirect URL if applicable.

# Claim Perk

Records that the authenticated customer has claimed a specific perk. If the perk has an associated external URL (e.g. a discount code landing page), the response includes a `Url` field for redirection.

## Authentication

Requires a valid customer bearer token.

## Path Parameters

<ParamField path="perkId" type="number" required>
  The integer ID of the perk to claim. Obtained as `Perks[].Id` from `GET /api/public/perks`.
</ParamField>

## Request Body

No request body required.

## Response

<ResponseField name="Url" type="string">
  External URL to redirect the customer to after claiming the perk. May be empty if the perk has no associated link.
</ResponseField>

## Examples

### Claim a perk

```http theme={null}
POST /api/public/perks/101/claim
Authorization: Bearer {token}
```

```json theme={null}
{
  "Url": "https://cornercafe.example.com/discount?code=NX15"
}
```

## TypeScript Integration

```typescript theme={null}
import endpoints from '@/api/endpoints'

const result = await httpClient.post(endpoints.perks.claim(101))
if (result.Url) {
  window.open(result.Url, '_blank')
}
```
