⚙️ SystemService (3 APIs)
API สำหรับตั้งค่าระบบ — config ทั่วไป, รูปภาพ, Carousel/Banner
1. ดึงค่า Config ระบบ (Get System Config)
Authorization
| Type | Key | Value |
|---|---|---|
| Bearer Token | Authorization | Bearer <token> |
Request
POST {{ENDPOINT}}/system-config/find-config
Body application/json
| Field | ตัวอย่าง | คำอธิบาย |
|---|---|---|
agent | "b9auto" | ชื่อ Agent |
Example
Request
curl -X POST '{{ENDPOINT}}/system-config/find-config' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"agent": "b9auto"
}'
Response 200 OK
{
"config": {
"site_name": "B9 Auto",
"min_deposit": 10,
"min_withdraw": 100,
"line_id": "@b9auto",
"line_url": "https://line.me/R/ti/p/@b9auto",
"enable_register": true,
"enable_lotto": true,
"enable_wheel": true,
"maintenance": false
}
}
2. ดึง Image Config จาก CDN (Get Image Config CDN)
Authorization
ไม่ต้องใช้ (No Auth)
Request
GET https://s3.b9auto.com/AGENT/{app_name}-sys-image-config.json?v={timestamp}
Path Parameters
| Parameter | ตัวอย่าง | คำอธิบาย |
|---|---|---|
app_name | b9auto | ชื่อ App (lowercase) จาก REACT_APP_NAME |
Example
Request
curl -X GET 'https://s3.b9auto.com/AGENT/b9auto-sys-image-config.json?v=1705312000000'
Response 200 OK
{
"logo": "https://s3.b9auto.com/images/logo.png",
"logo_land": "https://s3.b9auto.com/images/logo-land.png",
"favicon": "https://s3.b9auto.com/images/favicon.ico",
"loading_image": "https://s3.b9auto.com/images/loading.gif",
"background": "https://s3.b9auto.com/images/bg.jpg"
}
3. ดึง Carousel/Banner จาก CDN (Get Carousel CDN)
Authorization
ไม่ต้องใช้ (No Auth)
Request
GET https://s3.b9auto.com/AGENT/{app_name}-media.json?v={timestamp}
Path Parameters
| Parameter | ตัวอย่าง | คำอธิบาย |
|---|---|---|
app_name | b9auto | ชื่อ App (lowercase) จาก REACT_APP_NAME |
Example
Request
curl -X GET 'https://s3.b9auto.com/AGENT/b9auto-media.json?v=1705312000000'
Response 200 OK
{
"carousel": [
{
"image": "https://s3.b9auto.com/media/banner1.webp",
"link": "https://example.com/promo",
"order": 1
},
{
"image": "https://s3.b9auto.com/media/banner2.webp",
"link": "",
"order": 2
}
],
"popup": [
{
"image": "https://s3.b9auto.com/media/popup1.webp",
"link": "https://example.com/event"
}
]
}