> 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/kinguin.md).

# Kinguin

**Base URL**: `/kinguin`

***

### Endpoints

#### 1. POST `/kinguin/claim`

Claim a Kinguin gift code.

* **Authentication Required**: Yes
* **Method**: `POST`
* **URL**: `/kinguin/claim`

**Headers**

| Header          | Value                | Description                            |
| --------------- | -------------------- | -------------------------------------- |
| `Content-Type`  | `application/json`   | Required for sending JSON payload.     |
| `Authorization` | `Bearer <jwt_token>` | JWT Token (Bearer) for authentication. |

**Request Body**

```json
{
    "code": "XXXX-XXXX-XXXX"
}
```

| Field  | Type   | Description                                           |
| ------ | ------ | ----------------------------------------------------- |
| `code` | String | The unique Kinguin gift code to claim (1-1200 chars). |

**Response**

**Success (200 OK):**

Returns the result of the claim operation including the credited amount.

```json
{
    "success": true,
    "message": "Successfully claimed 5.00 USD",
    "creditedUsd": 5.0
}
```

| Field         | Type    | Description                                       |
| ------------- | ------- | ------------------------------------------------- |
| `success`     | Boolean | Indicates if the claim was successful.            |
| `message`     | String  | A human-readable message describing the result.   |
| `creditedUsd` | Number  | The amount credited to the user's balance in USD. |

**Error Response (Example):**

```json
{
    "success": false,
    "message": "Code already claimed or invalid code"
}
```

**Errors**

| Status Code | Description                                        |
| ----------- | -------------------------------------------------- |
| `400`       | Bad Request. Invalid payload (e.g., missing code). |
| `401`       | Unauthorized. User is not logged in.               |
| `500`       | Internal Server Error (e.g., Transaction failed).  |

***


---

# 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/kinguin.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.
