เกมแนะนำ
ใช้งานได้GET
/api/v1/games/featuredเกมแนะนำที่คัดสรรไว้สำหรับไซต์ของคุณ เรียงตาม position — ถ้ายังไม่ได้จัดชุดเอง จะได้ชุดแนะนำกลางของระบบ
เกมที่ปิดใช้งาน หรือค่ายที่ไม่ได้เปิดให้ไซต์ของคุณ จะถูกตัดออกจากรายการอัตโนมัติ
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
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| data[] | array<object> | — | รายการเกมแนะนำ เรียงตาม position |
| └ position | number | — | ตำแหน่งการจัดเรียง (เริ่มที่ 1) |
| └ game | object | — | ข้อมูลเกม (โครงเดียวกับรายการเกม) |
| └ id | string (uuid) | — | id เกม — ใช้เปิดเกมผ่าน POST /api/v1/games/:gameId/launch |
| └ provider_id | string (uuid) | — | id ค่ายเจ้าของเกม |
| └ provider | object | — | ข้อมูลย่อของค่ายเกม |
| └ code | string | — | รหัสค่าย เช่น PGSOFT |
| └ name | string | — | ชื่อค่าย |
| └ logo_url | string | null | — | URL โลโก้ค่าย |
| └ code | string | — | รหัสเกมฝั่งค่าย |
| └ name | string | — | ชื่อเกมสำหรับแสดงผล |
| └ type | string | — | ประเภทเกมSLOT | ARCADE | LIVE_CASINO | TABLE | FISHING | SPORT | LOTTERY | ESPORT | KENO | COCKFIGHT |
| └ thumbnail_url | string | null | — | URL ภาพปกเกม |
| └ tags | string[] | — | แท็กของเกม (ใช้ทำป้าย เช่น ฮิต/ใหม่)POPULAR | NEW | HOT |
| └ rtp | string | null | — | ค่า RTP เป็นสตริงทศนิยม เช่น "96.95" (null = ไม่ระบุ) |
| └ volatility | string | null | — | ความผันผวนของเกม เช่น HIGH |
| └ has_demo | boolean | — | มีโหมดทดลองเล่นหรือไม่ |
| └ sort_order | number | — | ลำดับแสดงผลที่แนะนำ |
| └ maintenance_until | string | null | — | เวลาที่ปิดปรับปรุงถึง (หาก null = ให้บริการปกติ) |
ตัวอย่าง response
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": [
{
"position": 1,
"game": {
"id": "3f8c2a71-5b9e-4d26-8a4f-c1e7d9b0a253",
"provider_id": "b7a3e6c2-1f4d-4e8a-9c5b-2d7f8a1e3b6c",
"provider": {
"code": "PGSOFT",
"name": "PG Soft",
"logo_url": "https://cdn.example.com/providers/pgsoft.png"
},
"code": "mahjong-ways2",
"name": "ไพ่นกกระจอก 2 (Mahjong Ways 2)",
"type": "SLOT",
"thumbnail_url": "https://cdn.example.com/games/mahjong-ways2.png",
"tags": ["POPULAR", "HOT"],
"rtp": "96.95",
"volatility": "HIGH",
"has_demo": true,
"sort_order": 1,
"maintenance_until": null
}
}
],
"request_uuid": "9f2b7d1e-4a83-4c1f-b2ce-6d5a0e8f3c21"
}Error codes ที่พบได้
| code | ชื่อ | HTTP | ข้อความ |
|---|---|---|---|
| 4002 | BAD_REQUEST | 400 | คำขอไม่ถูกต้องระบุ agent ของ request ไม่ได้ (ไม่รู้จักโดเมน/credential) |