Refer-a-friend summary

Live
GET/api/v1/affiliate

The 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

FieldTypeRequiredDescription
AuthorizationstringYesUsed — send Bearer <member access_token>
X-Api-KeystringYesAgent API key (ak_…) from the bo screen
X-TimestampstringYesSigning time in unix milliseconds (±300s skew allowed)
X-NoncestringYesUnique per-request value (UUIDv4) for replay protection
X-SignaturestringYeshex(HMAC-SHA256(secret, canonical)) — see the Authentication page
X-Player-IPstring—The player's real IP (IPv4/IPv6) — recommended (used in login history)
X-Player-UAstring—The player's User-Agent (optional — recorded in login history)
X-Request-Idstring—Your correlation id — echoed back as request_uuid (recommended)
x-langstring—th (default) or en — the language of message

Response

Fields in data

FieldTypeRequiredDescription
linkobject—The member's invite link (auto-created on first call)
└ codestring—Referral code — append as ?ref= on your site
└ urlstring | null—Full share URL on the agent's domain — null when the agent has no custom domain set (build it yourself from code).
referred_countnumber—Members who registered through this member's link
balancestring—Accumulated unclaimed commission (THB, string)
enabledboolean—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_earningsobject[]—Recent earnings (up to 30 rows, newest date first)
└ date_idnumber—Numeric date YYYYMMDD (Bangkok day), e.g. 20260704
└ game_typestring | null—Game category the commission came from, e.g. SLOT — null when unspecified
└ amountstring—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

codeNameHTTPMessage
1003USER_NOT_FOUND404User not foundThe member record is in a bad state (missing identity/agent) — should not normally happen
1001UNAUTHORIZED401Unauthorized
1007TOKEN_INVALID401Token invalid