> For the complete documentation index, see [llms.txt](https://trident-cas.sabn.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trident-cas.sabn.xyz/api/rewards.md).

# Rewards

**Base Path**: `/rewards`

***

### Endpoints

#### 1. GET `/rewards`

Get rewards history and free case countdown.

**Request Headers**

| Header          | Value                | Description        |
| --------------- | -------------------- | ------------------ |
| `Authorization` | `Bearer <jwt_token>` | JWT Token (Bearer) |

**Response**

```json
{
    "history": {
        "daily": 1703817600000,
        "weekly": 1703212800000
    },
    "freeCaseCountdown": 1703904000000
}
```

* `history`: Object containing timestamps of last claimed rewards (daily, weekly, monthly).
* `freeCaseCountdown`: Timestamp when the next free case is available, or 0 if available now.

***

#### 2. GET `/rewards/deposit-bonus`

Get deposit bonus status.

**Request Headers**

| Header          | Value                | Description        |
| --------------- | -------------------- | ------------------ |
| `Authorization` | `Bearer <jwt_token>` | JWT Token (Bearer) |

**Response**

```json
false
```

OR

```json
true
```

Returns a boolean indicating if the user has an active deposit bonus.

***

#### 3. GET `/rewards/free-cases/details`

Get details for free cases.

**Request Headers**

| Header          | Value                | Description        |
| --------------- | -------------------- | ------------------ |
| `Authorization` | `Bearer <jwt_token>` | JWT Token (Bearer) |

**Response**

**Success:**

```json
{
    "status": true,
    "freeCases": 2
}
```

**Failure:**

```json
{
    "status": false,
    "message": "You have already opened a free case today"
}
```

***

#### 4. POST `/rewards/claim`

Claim rakeback reward (daily, weekly, monthly).

**Request Headers**

| Header          | Value                | Description        |
| --------------- | -------------------- | ------------------ |
| `Authorization` | `Bearer <jwt_token>` | JWT Token (Bearer) |
| `Content-Type`  | `application/json`   |                    |

**Request Body**

```json
{
    "type": "daily"
}
```

* `type`: "daily", "weekly", or "monthly".

**Response**

**Success:**

```json
{
    "status": true,
    "reward": 10.5
}
```

**Failure:**

```json
{
    "status": false,
    "error": "You've already claimed the prize"
}
```

***

#### 5. POST `/rewards/promo-code`

Redeem a promo code.

**Request Headers**

| Header          | Value                | Description        |
| --------------- | -------------------- | ------------------ |
| `Authorization` | `Bearer <jwt_token>` | JWT Token (Bearer) |
| `Content-Type`  | `application/json`   |                    |

**Request Body**

```json
{
    "promoCode": "WELCOME2024"
}
```

**Response**

**Success:**

```json
{
    "prize": 5.0
}
```

**Failure:**

```json
{
    "message": "Invalid promo code"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trident-cas.sabn.xyz/api/rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
