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

# List free spin grants

> List free spin grants: request parameters, response format and response codes.

> [!NOTE]
>
> * Queries grants by event and channel, with optional member filter and paging.

## Path

```text theme={null}
GET {host}/vendor/v2.0/freespin/grant
```

## Headers

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="56%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`Authorization`</td><td>string</td><td>Yes</td><td>Token we provide</td></tr>
  </tbody>
</table>

## Request parameters

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="11%" />

    <col width="45%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Signed</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`channelID`</td><td>number</td><td>Yes</td><td>✓</td><td>Channel ID (use 1 if you have no channels)</td></tr>
    <tr><td>`eventID`</td><td>string</td><td>Yes</td><td>✓</td><td>Event ID (24-character hex)</td></tr>
    <tr><td>`memberAccount`</td><td>string</td><td>No</td><td>✓</td><td>Member account (allowed characters: `a-z A-Z 0-9 _-`)</td></tr>
    <tr><td>`nextToken`</td><td>string</td><td>No</td><td>✓</td><td>Query token (empty on the first query, then the nextToken from the previous result)</td></tr>
    <tr><td>`maxResults`</td><td>number</td><td>Yes</td><td>✓</td><td>Maximum number of results (min 2000, max 5000)</td></tr>
    <tr><td>`sign`</td><td>string</td><td>Yes</td><td /><td>Signature. See [Signature](https://doc.va777.net/en/v2/guides/signature.md) for how to generate it</td></tr>
  </tbody>
</table>

## Response

Success (the HTTP status code is always 200; check `status.code` for the result)

<table>
  <colgroup>
    <col width="34%" />

    <col width="12%" />

    <col width="54%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`data`</td><td>object</td><td /></tr>
    <tr><td>`data.grantList`</td><td>object\[]</td><td>Grants</td></tr>
    <tr><td>`data.grantList[].eventID`</td><td>string</td><td>Event ID</td></tr>
    <tr><td>`data.grantList[].grantID`</td><td>string</td><td>Grant ID</td></tr>
    <tr><td>`data.grantList[].channelID`</td><td>number</td><td>Channel ID</td></tr>
    <tr><td>`data.grantList[].memberAccount`</td><td>string</td><td>Member account</td></tr>
    <tr><td>`data.grantList[].status`</td><td>string</td><td>Status (New / Active / Completed / Freeze / Expired / SettleFailed)</td></tr>
    <tr><td>`data.grantList[].totalSpinTimes`</td><td>number</td><td>Free spins given when granted</td></tr>
    <tr><td>`data.grantList[].usedSpinTimes`</td><td>number</td><td>Spins used</td></tr>
    <tr><td>`data.grantList[].paidAmount`</td><td>number</td><td>Total payout credited to the wallet</td></tr>
    <tr><td>`data.grantList[].paidCount`</td><td>number</td><td>Number of payouts</td></tr>
    <tr><td>`data.grantList[].grantedAt`</td><td>string</td><td>Grant creation time (see [Time format](https://doc.va777.net/en/v2/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.grantList[].completedAt`</td><td>string</td><td>Completion time, empty if not completed (see [Time format](https://doc.va777.net/en/v2/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.grantList[].frozenAt`</td><td>string</td><td>Freeze time, empty if not frozen (see [Time format](https://doc.va777.net/en/v2/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.grantList[].expiredAt`</td><td>string</td><td>Expiry time (see [Time format](https://doc.va777.net/en/v2/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.nextToken`</td><td>string</td><td>Token for the next query (empty string on the last page)</td></tr>
    <tr><td>`data.maxResults`</td><td>number</td><td>Maximum number of results returned</td></tr>
    <tr><td>`data.total`</td><td>number</td><td>Total number of records in this query</td></tr>
    <tr><td>`status`</td><td>object</td><td>Response status. See [Response format](https://doc.va777.net/en/v2/guides/request-format.md#response-format)</td></tr>
  </tbody>
</table>

### Response example

```json theme={null}
{
  "data": {
    "grantList": [
      {
        "eventID": "qwertyuiop1234569876541",
        "grantID": "zaqwsxcder1234569879999",
        "channelID": 1,
        "memberAccount": "test123",
        "status": "Active",
        "totalSpinTimes": 50,
        "usedSpinTimes": 48,
        "paidAmount": 12.34,
        "paidCount": 45,
        "grantedAt": "2022-07-01T10:13:54.920+08:00",
        "completedAt": null,
        "frozenAt": null,
        "expiredAt": null
      }
    ],
    "nextToken": "gdfv5451gg5574fs",
    "maxResults": 2000,
    "total": 1
  },
  "status": {
    "code": "0",
    "message": "success",
    "datetime": "2022-07-01T10:13:54.920+08:00",
    "traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
  }
}
```

## Response codes

Besides the [common codes](https://doc.va777.net/en/v2/reference/response-codes.md), this API may also return:

| Code | Description |
| - | - |
| `416` | Event not found |
| `429` | Too many requests |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.