Diamond shop
LiveGET
/api/v1/diamond/shopFetch all details of the diamond shop.
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 |
|---|---|---|---|
| enabled | boolean | — | Whether the diamond program is on (diamonds can be earned) — hide the diamond menu when false (must be enabled at the agent level and the account must be a TRANSFER wallet). |
| shop_enabled | boolean | — | Whether redeeming is open — enabled = true with shop_enabled = false means diamonds still accrue but redemption is paused (show the catalog with the redeem button disabled). |
| diamond_balance | number | — | The member's diamond balance (integer) |
| items | object[] | — | Redeemable shop items ordered by sort order — always returned even when the shop is closed (shop_enabled = false) so the catalog still renders. |
| └ id | string | — | Shop item id — pass it as item_id when redeeming (UUID) |
| └ cost_diamonds | number | — | Price in diamonds (integer) |
| └ credit_amount | string | — | Wallet credit granted on redeem (THB, string) |
| └ label | string | null | — | Item label (may be null) |
Response example
{
"success": true,
"code": 0,
"message": "Diamond shop fetched successfully",
"data": {
"enabled": true,
"shop_enabled": true,
"diamond_balance": 320,
"items": [
{ "id": "3f1c9a2e-7b41-4d6c-9a8e-2f5b1c0d7e10", "cost_diamonds": 100, "credit_amount": "50", "label": "แลกเครดิต 50 บาท" },
{ "id": "8b2d4f60-1c93-4a57-b0e2-6d3a9f1c8e42", "cost_diamonds": 200, "credit_amount": "120", "label": "แลกเครดิต 120 บาท" },
{ "id": "a1e7c5d3-9f24-4b18-8c60-3e2d7a4f9b51", "cost_diamonds": 500, "credit_amount": "350", "label": "แลกเครดิต 350 บาท" }
]
},
"request_uuid": "3b7e0d9c-4f61-4a28-b5e3-8d2c6f1a9e07"
}Possible error codes
| code | Name | HTTP | Message |
|---|---|---|---|
| 6221 | DIAMOND_NOT_ENABLED | 400 | Diamond program is not enabled or member not eligibleToday an account with the diamond program off answers success with enabled = false and empty items instead — still handle this code, as redeem uses it |
| 1001 | UNAUTHORIZED | 401 | Unauthorized |
| 1007 | TOKEN_INVALID | 401 | Token invalid |