Refer-a-friend summary
LiveGET
/api/v1/affiliateThe member's refer-a-friend dashboard — invite link, referred count, unclaimed commission balance, program status, and recent earnings.
Commission accrues daily from referred friends' play — the member moves it to the wallet via POST /affiliate/claim.
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Used — send Bearer <member access_token> |
| X-Api-Key | string | Yes | Agent API key (ak_…) from the bo screen |
| X-Timestamp | string | Yes | Signing time in unix milliseconds (±300s skew allowed) |
| X-Nonce | string | Yes | Unique per-request value (UUIDv4) for replay protection |
| X-Signature | string | Yes | hex(HMAC-SHA256(secret, canonical)) — see the Authentication page |
| X-Player-IP | string | — | The player's real IP (IPv4/IPv6) — recommended (used in login history) |
| X-Player-UA | string | — | The player's User-Agent (optional — recorded in login history) |
| X-Request-Id | string | — | Your correlation id — echoed back as request_uuid (recommended) |
| x-lang | string | — | th (default) or en — the language of message |
Response
Fields in data
| Field | Type | Required | Description |
|---|---|---|---|
| link | object | — | The member's invite link (auto-created on first call) |
| └ code | string | — | Referral code — append as ?ref= on your site |
| └ url | string | null | — | Full share URL on the agent's domain — null when the agent has no custom domain set (build it yourself from code). |
| referred_count | number | — | Members who registered through this member's link |
| balance | string | — | Accumulated unclaimed commission (THB, string) |
| enabled | boolean | — | Whether the agent has the program enabled — hide the claim button when false · members under a SEAMLESS-wallet agent always get false (the wallet lives on the agent side) |
| recent_earnings | object[] | — | Recent earnings (up to 30 rows, newest date first) |
| └ date_id | number | — | Numeric date YYYYMMDD (Bangkok day), e.g. 20260704 |
| └ game_type | string | null | — | Game category the commission came from, e.g. SLOT — null when unspecified |
| └ amount | string | — | Commission amount for the row (THB, string) |
Response example
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": {
"link": {
"code": "AB12CD34",
"url": "https://your-site.example.com/?ref=AB12CD34"
},
"referred_count": 12,
"balance": "245.75",
"enabled": true,
"recent_earnings": [
{ "date_id": 20260704, "game_type": "SLOT", "amount": "35.50" },
{ "date_id": 20260703, "game_type": "LIVE_CASINO", "amount": "80.25" },
{ "date_id": 20260702, "game_type": "SLOT", "amount": "130.00" }
]
},
"request_uuid": "a6c1e4f8-2d95-4b07-83ce-7f0b9d2a5e18"
}Possible error codes
| code | Name | HTTP | Message |
|---|---|---|---|
| 1003 | USER_NOT_FOUND | 404 | User not foundThe member record is in a bad state (missing identity/agent) — should not normally happen |
| 1001 | UNAUTHORIZED | 401 | Unauthorized |
| 1007 | TOKEN_INVALID | 401 | Token invalid |