ตัวเลือกโปรโมชั่นตอนฝาก
ใช้งานได้GET
/api/v1/promotions/deposit-optionsดึงข้อมูลโปรโมชั่นที่สมาชิกสามารถเลือกรับได้
สมาชิกที่ยังไม่เคยรับโบนัสต้อนรับ (tier NEW) → forced เลือกเฉพาะ NEW_REGISTER | หากเคยรับแล้วจะเป็น mode choose เลือกโปรระหว่าง FIRST_DEPOSIT (ยังไม่มียอดฝากสำเร็จวันนี้) กับ GOLDEN_MINUTE (อยู่ในช่วงเวลา) | หากไม่มีโปรที่รับได้จะเป็น mode none
หน้านี้ใช้แสดง/เลือกเท่านั้น — โบนัสแจกจริงตอนยอดฝากเข้าสำเร็จ และระบบตรวจเงื่อนไขซ้ำอีกครั้งตอนนั้น
Headers
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| Authorization | string | ใช่ | ใช้ — แนบ Bearer <access_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
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| mode | string | — | forced = มีเฉพาะโบนัสต้อนรับ (NEW_REGISTER) — สมาชิกเปลี่ยนตัวเลือกไม่ได้ ให้ UI แสดงตัวเดียวแบบล็อกไว้ · choose = ให้สมาชิกเลือกหนึ่งตัวจาก options (หรือไม่รับ) · none = ไม่มีโบนัสฝากที่เข้าเงื่อนไขตอนนี้ — ซ่อนตัวเลือกโบนัสไปเลยforced | choose | none |
| options | object[] | — | โปรโมชั่นที่เลือกได้ — โครงเดียวกับรายการใน "โปรโมชั่นทั้งหมด" และทุกตัวผ่านเงื่อนไขแล้ว (eligible = true เสมอ) |
| └ id | string | — | id โปรโมชั่น — ใช้ส่งเข้า PUT /promotions/selected |
| └ type | string | — | โบนัสฝากมีได้ 3 ชนิดนี้เท่านั้นNEW_REGISTER | FIRST_DEPOSIT | GOLDEN_MINUTE |
| └ name | string | — | ชื่อโปรโมชั่น |
| └ banner_url | string | null | — | URL แบนเนอร์พร้อมแสดงผล |
| └ config | object | — | config โบนัส { percentage, max_bonus_thb, min_deposit_thb } |
| └ time_window | object | null | — | ช่วงเวลาของ GOLDEN_MINUTE (เวลาไทย) |
| └ wager_multiplier | string | null | — | ตัวคูณเทิร์นเมื่อรับโบนัสนี้ |
| └ withdraw_cap_thb | string | null | — | เพดานถอนของโบนัสนี้ |
| └ eligible | boolean | — | true เสมอในรายการนี้ |
| selected_id | string | null | — | โปรที่สมาชิกเลือกค้างไว้ล่าสุด — null = ไม่รับโบนัส; ใช้ highlight ตัวที่เลือกใน UI |
ตัวอย่าง response
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": {
"mode": "choose",
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440111",
"type": "FIRST_DEPOSIT",
"name": "ฝากแรกของวันรับเพิ่ม 10%",
"description": "โบนัส 10% สำหรับยอดฝากแรกที่สำเร็จของวัน",
"banner_url": "https://cdn.bestsystem.example/promotions/first-deposit-10.jpg",
"sort_order": 3,
"config": { "percentage": 10, "max_bonus_thb": 300, "min_deposit_thb": 100 },
"time_window": null,
"wager_mode": "TURNOVER",
"wager_multiplier": "3",
"withdraw_cap_thb": null,
"allowed_provider_ids": [],
"allowed_categories": [],
"ends_at": null,
"eligible": true,
"cashback_available_thb": null,
"cashback_claimed_today": false
},
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"type": "GOLDEN_MINUTE",
"name": "นาทีทอง 20.00-22.00 รับเพิ่ม 15%",
"description": "ฝากช่วงนาทีทองรับโบนัสเพิ่ม 15%",
"banner_url": "https://cdn.bestsystem.example/promotions/golden-minute.jpg",
"sort_order": 4,
"config": { "percentage": 15, "max_bonus_thb": 500, "min_deposit_thb": 200 },
"time_window": { "recurrence": "DAILY", "start_hour": 20, "end_hour": 22 },
"wager_mode": "TURNOVER",
"wager_multiplier": "5",
"withdraw_cap_thb": "10000.00",
"allowed_provider_ids": [],
"allowed_categories": [],
"ends_at": null,
"eligible": true,
"cashback_available_thb": null,
"cashback_claimed_today": false
}
],
"selected_id": "550e8400-e29b-41d4-a716-446655440111"
},
"request_uuid": "5c8d2f4a-1e37-49b0-a6d4-8e2f5c1b7d90"
}Error codes ที่พบได้
| code | ชื่อ | HTTP | ข้อความ |
|---|---|---|---|
| 1001 | UNAUTHORIZED | 401 | ไม่ได้รับอนุญาต |
| 1007 | TOKEN_INVALID | 401 | โทเค็นไม่ถูกต้อง |