โปรโมชั่นทั้งหมด
ใช้งานได้GET
/api/v1/promotions/activeรายการโปรโมชั่นสถานะ ACTIVE ของ agent ที่อยู่ในช่วงเวลาแสดงผล เรียงตาม sort_order
Headers
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| Authorization | string | — | ไม่ใช้ — endpoint นี้เป็น public ไม่ต้องแนบ token สมาชิก |
| X-Api-Key | string | ใช่ | API key ของ agent (ak_…) จากหน้า bo |
| X-Timestamp | string | ใช่ | เวลา sign เป็น unix milliseconds (คลาดเคลื่อนได้ ±300 วินาที) |
| X-Nonce | string | ใช่ | ค่าไม่ซ้ำต่อ request (UUIDv4) กัน replay |
| X-Signature | string | ใช่ | hex(HMAC-SHA256(secret, canonical)) — ดูหน้า Authentication |
| X-Player-IP | string | — | IP จริงของผู้เล่น (IPv4/IPv6) — แนะนำให้ส่ง (ใช้ใน login history) |
| X-Player-UA | string | — | User-Agent ของผู้เล่น (optional — ลง login history) |
| X-Request-Id | string | — | correlation id ของฝั่งคุณ — ระบบ echo กลับใน request_uuid (แนะนำให้ส่ง) |
| x-lang | string | — | th (default) หรือ en — ภาษาของ message |
Response
ฟิลด์ใน data
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| [] | object[] | — | data เป็น array ของโปรโมชั่น — ฟิลด์ของแต่ละรายการตามด้านล่าง |
| └ id | string | — | id โปรโมชั่น (uuid) — ใช้กับ POST /promotions/:id/claim |
| └ type | string | — | ชนิดโปรโมชั่น — NEW_REGISTER/FIRST_DEPOSIT/GOLDEN_MINUTE แจกอัตโนมัติตอนฝากเงิน ส่วน CASHBACK/FREE_CREDIT/DAILY_LOGIN สมาชิกกดรับเองผ่าน claimNEW_REGISTER | FIRST_DEPOSIT | CASHBACK | FREE_CREDIT | DAILY_LOGIN | GOLDEN_MINUTE | REFER_A_FRIEND | COUPON_CODE |
| └ name | string | — | ชื่อโปรโมชั่นที่แสดงต่อสมาชิก |
| └ description | string | null | — | คำอธิบาย |
| └ banner_url | string | null | — | URL รูปแบนเนอร์พร้อมแสดงผล (ลิงก์มีอายุ — อย่า cache ถาวร) |
| └ sort_order | number | — | ลำดับการแสดงผล (น้อย = ขึ้นก่อน) |
| └ config | object | — | config แยกตามชนิดโปร เช่น CASHBACK { percentage, max_cashback_thb } · โบนัสฝาก { percentage, max_bonus_thb, min_deposit_thb } · FREE_CREDIT { amount_thb, min_deposit_thb, min_turnover_thb } · DAILY_LOGIN { day_1_thb … day_7_thb } |
| └ time_window | object | null | — | GOLDEN_MINUTE เท่านั้น — { recurrence: "DAILY"|"WEEKLY", start_hour, end_hour, days_of_week? } ประเมินตามเวลาไทย (UTC+7); ชนิดอื่นเป็น null |
| └ wager_mode | string | — | วิธีนับเทิร์นของโบนัสนี้ — TURNOVER นับยอดเดิมพัน · TURN_CREDIT นับเครดิตTURNOVER | TURN_CREDIT |
| └ wager_multiplier | string | null | — | ตัวคูณเทิร์น (เช่น "5") — null = ไม่ติดเทิร์น ถอนได้เลย |
| └ withdraw_cap_thb | string | null | — | เพดานถอนสูงสุดของโบนัสนี้ (THB) — null = ไม่จำกัด |
| └ allowed_provider_ids | string[] | — | จำกัดค่ายเกมที่นับเทิร์น — ว่าง = ทุกค่าย |
| └ allowed_categories | string[] | — | จำกัดหมวดเกมที่นับเทิร์น — ว่าง = ทุกหมวด |
| └ ends_at | string (ISO 8601) | null | — | วันสิ้นสุดโปรโมชั่น — null = ไม่กำหนด |
| └ eligible | boolean | — | ผลประเมินสิทธิ์เบื้องต้นของสมาชิก — endpoint นี้ไม่ผูกกับสมาชิก จึงเป็น false เสมอ; สิทธิ์จริงตรวจซ้ำอีกครั้งตอน claim / deposit-options |
| └ cashback_available_thb | string | null | — | CASHBACK เท่านั้น: ยอดที่จะได้จากยอดฝากวันนี้ — เป็น null บน endpoint นี้ (ต้องรู้ตัวสมาชิก) |
| └ cashback_claimed_today | boolean | — | CASHBACK เท่านั้น: วันนี้รับไปแล้วหรือยัง — เป็น false บน endpoint นี้ |
ตัวอย่าง response
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "NEW_REGISTER",
"name": "โบนัสต้อนรับสมาชิกใหม่ 100%",
"description": "ฝากครั้งแรกรับโบนัสเพิ่ม 100% สูงสุด 500 บาท",
"banner_url": "https://cdn.bestsystem.example/promotions/welcome-100.jpg",
"sort_order": 1,
"config": { "percentage": 100, "max_bonus_thb": 500, "min_deposit_thb": 100 },
"time_window": null,
"wager_mode": "TURNOVER",
"wager_multiplier": "5",
"withdraw_cap_thb": "5000.00",
"allowed_provider_ids": [],
"allowed_categories": ["SLOT"],
"ends_at": null,
"eligible": false,
"cashback_available_thb": null,
"cashback_claimed_today": false
},
{
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"type": "CASHBACK",
"name": "แคชแบ็ก 5% จากยอดฝากวันนี้",
"description": "รับเงินคืน 5% ของยอดฝากรวมวันนี้ สูงสุด 500 บาท กดรับได้วันละครั้ง",
"banner_url": "https://cdn.bestsystem.example/promotions/cashback-5.jpg",
"sort_order": 2,
"config": { "percentage": 5, "max_cashback_thb": 500 },
"time_window": null,
"wager_mode": "TURNOVER",
"wager_multiplier": null,
"withdraw_cap_thb": null,
"allowed_provider_ids": [],
"allowed_categories": [],
"ends_at": "2026-12-31T16:59:59.000Z",
"eligible": false,
"cashback_available_thb": null,
"cashback_claimed_today": false
}
],
"request_uuid": "1a7f4c2e-9b3d-4e6a-8c15-2f0d7b9e4a63"
}Error codes ที่พบได้
| code | ชื่อ | HTTP | ข้อความ |
|---|---|---|---|
| 4002 | BAD_REQUEST | 400 | คำขอไม่ถูกต้องระบุ agent จากบริบทของ request ไม่ได้ (ยังไม่ได้ตั้งค่าโดเมนไซต์) |