Conventions

Shared rules that apply to every member-API endpoint — read this page once and the endpoint pages only need to cover what is specific to each route

Base URL and versioning

  • BASE_URL is per environment — provided by the best-system team
  • Every endpoint lives under the /api/v1 prefix (URI versioning — the current version is v1)
text
https://api.example.com/api/v1/games/providers
└──────── BASE_URL ───────┘└─ prefix ─┘└─ endpoint ─┘

Response envelope

Every endpoint returns the same JSON shape, on success and on error — write your parser once and reuse it everywhere

json
{
  "success": true,
  "code": 0,
  "message": "สำเร็จ",
  "data": { "revoked": true },
  "request_uuid": "9f2b7d1e-4a83-4c1f-b2ce-6d5a0e8f3c21"
}
FieldTypeMeaning
successbooleantrue on success (paired with code = 0) · false on error
codenumberBusinessCode — 0 = success, anything else is a business result code (one catalog across the whole system)
messagestringHuman-readable text for code — language follows x-lang (default th)
dataobject · array · nullThe endpoint's payload · always null on error
request_uuidstringRequest id — echoes X-Request-Id if sent, otherwise server-generated

Rate limit

ChannelScopeLimit
External S2SWhole key, all endpoints600 req/min
External S2S/auth/* group120 req/min
HostedPer IP, all endpoints120 req/min
Hosted/auth/* group per IP10 req/min