Diamond shop

Live
GET/api/v1/diamond/shop

Fetch all details of the diamond shop.

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
enabledboolean—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_enabledboolean—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_balancenumber—The member's diamond balance (integer)
itemsobject[]—Redeemable shop items ordered by sort order — always returned even when the shop is closed (shop_enabled = false) so the catalog still renders.
└ idstring—Shop item id — pass it as item_id when redeeming (UUID)
└ cost_diamondsnumber—Price in diamonds (integer)
└ credit_amountstring—Wallet credit granted on redeem (THB, string)
└ labelstring | 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

codeNameHTTPMessage
6221DIAMOND_NOT_ENABLED400Diamond 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
1001UNAUTHORIZED401Unauthorized
1007TOKEN_INVALID401Token invalid