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

# Requests and responses

> API URLs, headers, parameter format, time format and the common response structure.

## Request URL

```text theme={null}
{host}/{action}
```

* `{host}` is the API domain we provide.
* Example: `https://game.bala.jp/vendor/v2.0/member/create`

## Parameter format

* `GET` and `DELETE`: pass parameters in the query string.
* Other methods: send parameters as `multipart/form-data`.

## Headers

Every request must include the headers below. For services we provide, you send the token; for services you provide, you verify the token we send.

| Header | Value | Description |
| - | - | - |
| `Authorization` | Token | Required on all methods |
| `Content-Type` | `multipart/form-data` | Required on all methods except `GET` and `DELETE` |

## Connection

Send us the IPs of the servers that call the API so we can add them to the allowlist.

## API rules

* Accounts under different channels are treated as **different** members. For example, `Player001` in channel-1 and `Player001` in channel-2 are different members in our system.
* Channel IDs range from `1` to `2147483647`.
* Each member session is a single, independent connection identified by its own token.
* While a member plays, the game client refreshes the member's balance on screen, and checks the balance before every bet.
* If a member is idle (places no bets) for more than **5 minutes**, we close the connection.
* A member can hold wallets in multiple currencies. Balances **cannot** be transferred between currencies.
* Some APIs are rate limited. The limit is stated in each API's notes; no note means no limit.

### Time format

Unless an API states otherwise, times use **RFC3339**, precise to the **millisecond** and including the **time zone**:

```text theme={null}
2022-01-01T00:00:00.000+08:00
```

> [!NOTE]
>
> [Get currency report](https://doc.va777.net/en/api-reference/report/currency.md) and [Get member report](https://doc.va777.net/en/api-reference/report/member.md) use an hour-precision RFC3339 format, for example `2022-01-01T00+08:00`.

## Response format

The HTTP status code is always `200`. Every response contains `data` and `status`; check `status.code` for the result.

**data** `object | string | null`

Response data. Its content depends on the API.

**status** `object` *required*

Processing status of the request.

**Properties**

**code** `string` *required*

Response code. See [Response codes](https://doc.va777.net/en/reference/response-codes.md).

**message** `string` *required*

Response message describing the result.

**datetime** `string` *required*

Time the request was received, in RFC3339.

**traceCode** `string` *required*

Unique trace code for matching responses on both sides.

```json Response example theme={null}
{
  "data": "",
  "status": {
    "code": "0",
    "message": "success",
    "datetime": "2022-07-01T10:13:54.920+08:00",
    "traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
  }
}
```


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