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

# Bonus List

> This API is used to retrieve a paginated list of bonus. It also allows optional filtering by gameId, playerId and status.

Status

* **1** = Pending
* **2** = Active
* **3** = Awarded
* **5** = Cancelled

## Headers

<ParamField header="x-api-key" type="string" required>
  A unique identifier associated with operator calling API.
</ParamField>

<ParamField header="x-signature" type="string" required>
  A SHA256 HMAC signature generated using the request body and timestamp.
  Format: HMAC\_SHA256(JSON.stringify(data) + '|' + timestamp), signed using the
  provided secret key.
</ParamField>

<ParamField header="x-timestamp" type="string" required>
  An Unix timestamp (milliseconds) Used to verify the request’s freshness.
  Ensure the same value is used in signature generation.

  <Note>
    The signature will remain valid for only 5 minutes from the provided
    timestamp.
  </Note>
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be set to `application/json`.
</ParamField>

## Query Parameters

<ParamField query="page" type="number" default={1}>
  Specifies the current page number for pagination purposes.
</ParamField>

<ParamField query="limit" type="number" default={10}>
  Specifies how many records to display on each page, controlling the size of each data segment.
</ParamField>

<ParamField query="gameId" type="string">
  Retrieve bonus rewards for a specific game.
</ParamField>

<ParamField query="playerId" type="string">
  Retrieve bonus rewards received by a specific player.
</ParamField>

<ParamField query="status" type="string">
  Retrieve bonus rewards received by a specific status.
</ParamField>

## Response

<ResponseField name="status" type="string" required>
  Code indicates status of the request weather it is succeed or failed. We have listed error codes <a href="/introduction#error-codes">here</a>
</ResponseField>

<ResponseField name="data" type="Data Object">
  <Expandable title="Data properties">
    <ResponseField name="currentPage" type="integer" required>
      The current page number of the results.
    </ResponseField>

    <ResponseField name="totalPages" type="integer" required>
      The total number of pages available.
    </ResponseField>

    <ResponseField name="totalCount" type="integer" required>
      The total number of records matching the query.
    </ResponseField>

    <ResponseField name="result" type="array" required>
      List of result parameters.
    </ResponseField>

    <Expandable title="result properties">
      <ResponseField name="bonusId" type="string" required>
        Unique identifier of bonus.
      </ResponseField>

      <ResponseField name="playerId" type="string" required>
        Unique identifier for player.
      </ResponseField>

      <ResponseField name="gameId" type="string" required>
        Unique identifier of game.
      </ResponseField>

      <ResponseField name="type" type="string" required>
        Type of bonus.
      </ResponseField>

      <ResponseField name="status" type="integer" required>
        Status of the bonus request (1 = PENDING, 2 = ACTIVE, 3 = USED, 4 = EXPIRED, 5 = CANCELLED).
      </ResponseField>

      <ResponseField name="rewardedAmount" type="integer" required>
        The amount which has been awarded to player for this bonus. This amount should be less than or equals to bonusAmount.

        <Note>
          To maintain precision and avoid floating-point errors, the rewardedAmount field is processed as an integer value by multiplying the actual amount by 100000.

          For example, a rewardedAmount of 12.34567 will be represented as 1234567 in the API.
        </Note>
      </ResponseField>

      <ResponseField name="bonusAmount" type="integer" required>
        Amount configure to be awarded to player for this bonus.

        <Note>
          To maintain precision and avoid floating-point errors, the bonusAmount field is processed as an integer value by multiplying the actual amount by 100000.

          For example, a bonusAmount of 12.34567 will be represented as 1234567 in the API.
        </Note>
      </ResponseField>

      <ResponseField name="redeemAt" type="string" required>
        Timestamp indicating when the bonus had been redeemed.
      </ResponseField>

      <ResponseField name="createdAt" type="string" required>
        Amount configure to be awarded to player for this bonus.
      </ResponseField>
    </Expandable>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json SUCCESS theme={null}
  {
      "status": "RS_OK",
      "data": {
          "totalPages": 1,
          "currentPage": 1,
          "totalCount": 1,
          "result": [
              {
                  "bonusId": "253c5712-1043-410c-a29e-dde9a333bc44",
                  "playerId": "JAY10111111",
                  "gameId": "G1729071770000",
                  "type": "Fortune Guess",
                  "status": 5,
                  "rewardedAmount": 87000000,
                  "bonusAmount": 100000000,
                  "redeemAt": "2025-07-25T09:56:04.926Z",
                  "createdAt": "2025-07-25T09:56:03.169Z"
              }
          ]
      }
  }

  Note : bonusAmount = bonusAmount * 100000
  (e.g.,1000 = 100000000)

  ```

  ```json FAILURE theme={null}
  {
    "status": "RS_ERROR",
    "message": "Oops! Something went wrong. Please refresh the page or try again in a moment"
  }
  ```
</ResponseExample>
