@smartico/public-api 0.0.343 → 0.0.345
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MiniGames/SAWExposeUserSpinId.d.ts +6 -0
- package/dist/MiniGames/SAWGameLayout.d.ts +6 -0
- package/dist/WSAPI/WSAPITypes.d.ts +5 -1
- package/dist/index.js +42 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +45 -15
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +2 -8
- package/docs/api/enums/SAWExposeUserSpinIdName.md +13 -0
- package/docs/api/enums/SAWGameLayoutName.md +13 -0
- package/docs/api/interfaces/TMiniGameTemplate.md +16 -0
- package/docs/native/PROTOCOL.md +907 -406
- package/package.json +1 -1
- package/src/MiniGames/SAWExposeUserSpinId.ts +16 -1
- package/src/MiniGames/SAWGameLayout.ts +16 -1
- package/src/MiniGames/SAWGetTemplatesResponse.ts +10 -1
- package/src/WSAPI/WSAPITypes.ts +5 -1
- package/docs/README.md +0 -230
- package/docs/api/interfaces/GemsDiamondsLog.md +0 -43
- package/docs/api/interfaces/PointsLog.md +0 -43
package/docs/native/PROTOCOL.md
CHANGED
|
@@ -8,6 +8,14 @@ This document describes the low-level protocol for communicating with Smartico b
|
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
11
|
+
- [Connection Lifecycle](#connection-lifecycle)
|
|
12
|
+
- [Ping / Pong](#ping--pong)
|
|
13
|
+
- [Init](#init)
|
|
14
|
+
- [Identify](#identify)
|
|
15
|
+
- [Login](#login)
|
|
16
|
+
- [Logout](#logout)
|
|
17
|
+
- [Common Message Fields](#common-message-fields)
|
|
18
|
+
|
|
11
19
|
### Server Initiated Messages
|
|
12
20
|
- [Overview](#server-initiated-messages)
|
|
13
21
|
- [CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT](#client_public_properties_changed_event)
|
|
@@ -16,13 +24,17 @@ This document describes the low-level protocol for communicating with Smartico b
|
|
|
16
24
|
- [SAW_SPINS_COUNT_PUSH](#saw_spins_count_push)
|
|
17
25
|
- [SAW_SHOW_SPIN_PUSH](#saw_show_spin_push)
|
|
18
26
|
- [JP_WIN_PUSH](#jp_win_push)
|
|
27
|
+
- [SAW_PRIZE_DROP_WIN_PUSH](#saw_prize_drop_win_push)
|
|
28
|
+
- [CLIENT_EXECUTE_DEEPLINK_EVENT](#client_execute_deeplink_event)
|
|
29
|
+
- [CLIENT_EXECUTE_JS_EVENT](#client_execute_js_event)
|
|
19
30
|
|
|
20
31
|
### API Methods
|
|
21
32
|
|
|
22
33
|
#### User
|
|
23
34
|
- [getUserGamificationInfo](#getusergamificationinfo)
|
|
24
|
-
- [checkSegmentMatch](#checksegmentmatch)
|
|
25
35
|
- [checkSegmentListMatch](#checksegmentlistmatch)
|
|
36
|
+
- [setAvatar](#setavatar)
|
|
37
|
+
- [setCustomUsername](#setcustomusername)
|
|
26
38
|
|
|
27
39
|
#### Levels
|
|
28
40
|
- [getLevels](#getlevels)
|
|
@@ -52,6 +64,9 @@ This document describes the low-level protocol for communicating with Smartico b
|
|
|
52
64
|
- [playMiniGameBatch](#playminigamebatch)
|
|
53
65
|
- [miniGameWinAcknowledge](#minigamewinacknowledge)
|
|
54
66
|
- [getMiniGamesHistory](#getminigameshistory)
|
|
67
|
+
- [acknowledgeMiniGameSpinPush](#acknowledgeminigamespinpush)
|
|
68
|
+
- [miniGameWinAcknowledgeBatch](#minigamewinacknowledgebatch)
|
|
69
|
+
- [prizeDropWinAcknowledge](#prizedropwinacknowledge)
|
|
55
70
|
|
|
56
71
|
#### Tournaments
|
|
57
72
|
- [getTournamentsList](#gettournamentslist)
|
|
@@ -77,6 +92,16 @@ This document describes the low-level protocol for communicating with Smartico b
|
|
|
77
92
|
- [jackpotOptOut](#jackpotoptout)
|
|
78
93
|
- [getJackpotWinners](#getjackpotwinners)
|
|
79
94
|
- [getJackpotEligibleGames](#getjackpoteligiblegames)
|
|
95
|
+
- [getJackpotLatestPots](#getjackpotlatestpots)
|
|
96
|
+
|
|
97
|
+
#### Engagement Tracking
|
|
98
|
+
- [reportEngagementImpression](#reportengagementimpression)
|
|
99
|
+
- [reportEngagementAction](#reportengagementaction)
|
|
100
|
+
- [reportEngagementFailed](#reportengagementfailed)
|
|
101
|
+
- [trackActivity](#trackactivity)
|
|
102
|
+
|
|
103
|
+
#### Push Notifications
|
|
104
|
+
- [registerPushNotificationsToken](#registerpushnotificationstoken)
|
|
80
105
|
|
|
81
106
|
#### Other
|
|
82
107
|
- [getTranslations](#gettranslations)
|
|
@@ -92,6 +117,269 @@ This document describes the low-level protocol for communicating with Smartico b
|
|
|
92
117
|
|
|
93
118
|
---
|
|
94
119
|
|
|
120
|
+
# Connection Lifecycle
|
|
121
|
+
|
|
122
|
+
This section describes the mandatory sequence of messages required to establish a session with the Smartico backend. Native clients **must** implement this flow before calling any API methods.
|
|
123
|
+
|
|
124
|
+
**Connection flow:**
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
1. Connect to WebSocket
|
|
128
|
+
2. Send INIT (cid: 3) → Receive INIT_RESPONSE (cid: 4)
|
|
129
|
+
3. Send IDENTIFY (cid: 5) → Receive IDENTIFY_RESPONSE (cid: 6)
|
|
130
|
+
4. Send LOGIN (cid: 7) → Receive LOGIN_RESPONSE (cid: 11)
|
|
131
|
+
5. Session is now active — API methods can be called
|
|
132
|
+
6. Maintain connection with PING/PONG keepalive
|
|
133
|
+
7. When user logs out: Send LOGOUT (cid: 8) → Receive LOGOUT_RESPONSE (cid: 12)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Ping / Pong
|
|
139
|
+
|
|
140
|
+
WebSocket keepalive mechanism. The server sends `PING` (cid: 1), the client must respond with `PONG` (cid: 2). Additionally, the client should send a proactive `PING` if no messages are received within **29 seconds** to prevent the connection from being dropped.
|
|
141
|
+
|
|
142
|
+
**Server → Client:**
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{"cid": 1}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Client → Server (response):**
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{"cid": 2}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
> **Implementation note:** When any message is received from the server, reset the keepalive timer. If no messages arrive within 29 seconds, send `{"cid": 1}` proactively.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Init
|
|
159
|
+
|
|
160
|
+
First message after WebSocket connection is established. Identifies the label (operator) and brand.
|
|
161
|
+
|
|
162
|
+
### Request
|
|
163
|
+
|
|
164
|
+
**ClassId:** `3` (INIT)
|
|
165
|
+
|
|
166
|
+
| Field | Type | Description |
|
|
167
|
+
|-------|------|-------------|
|
|
168
|
+
| `label_key` | `string` | Public API key for the label |
|
|
169
|
+
| `brand_key` | `string` | Brand key (optional, `null` if not used) |
|
|
170
|
+
| `device_id` | `string` | Unique device identifier (persisted across sessions) |
|
|
171
|
+
|
|
172
|
+
**Example:**
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"cid": 3,
|
|
177
|
+
"label_key": "your_label_api_key",
|
|
178
|
+
"brand_key": null,
|
|
179
|
+
"device_id": "550e8400-e29b-41d4-a716-446655440000"
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Response
|
|
184
|
+
|
|
185
|
+
**ClassId:** `4` (INIT_RESPONSE)
|
|
186
|
+
|
|
187
|
+
| Field | Type | Description |
|
|
188
|
+
|-------|------|-------------|
|
|
189
|
+
| `errCode` | `number` | Error code (`0` = success) |
|
|
190
|
+
| `errMsg` | `string` | Error message (optional) |
|
|
191
|
+
| `settings` | `object` | Label settings (key-value map) |
|
|
192
|
+
| `products` | `number[]` | Enabled product types for this label |
|
|
193
|
+
| `label_id` | `number` | Internal label ID |
|
|
194
|
+
|
|
195
|
+
**Example:**
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"cid": 4,
|
|
200
|
+
"errCode": 0,
|
|
201
|
+
"settings": {
|
|
202
|
+
"PUBLIC_API_URL": "https://api.smartico.ai"
|
|
203
|
+
},
|
|
204
|
+
"products": [1, 2],
|
|
205
|
+
"label_id": 123
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
> **Important:** Wait for a successful `INIT_RESPONSE` (errCode: 0) before sending `IDENTIFY`.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Identify
|
|
214
|
+
|
|
215
|
+
Identifies (authenticates) the user. Must be sent after a successful `INIT`.
|
|
216
|
+
|
|
217
|
+
### Request
|
|
218
|
+
|
|
219
|
+
**ClassId:** `5` (IDENTIFY)
|
|
220
|
+
|
|
221
|
+
| Field | Type | Description |
|
|
222
|
+
|-------|------|-------------|
|
|
223
|
+
| `ext_user_id` | `string` | External user ID (your system's user identifier) |
|
|
224
|
+
| `hash` | `string` | HMAC authentication hash |
|
|
225
|
+
| `ua` | `object` | User agent / device information (optional) |
|
|
226
|
+
|
|
227
|
+
**Example:**
|
|
228
|
+
|
|
229
|
+
```json
|
|
230
|
+
{
|
|
231
|
+
"cid": 5,
|
|
232
|
+
"ext_user_id": "user_12345",
|
|
233
|
+
"hash": "a1b2c3d4e5f6..."
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Response
|
|
238
|
+
|
|
239
|
+
**ClassId:** `6` (IDENTIFY_RESPONSE)
|
|
240
|
+
|
|
241
|
+
| Field | Type | Description |
|
|
242
|
+
|-------|------|-------------|
|
|
243
|
+
| `errCode` | `number` | Error code (`0` = success) |
|
|
244
|
+
| `errMsg` | `string` | Error message (optional) |
|
|
245
|
+
| `user_id` | `number` | Smartico internal user ID |
|
|
246
|
+
| `ext_user_id` | `string` | External user ID (echoed back) |
|
|
247
|
+
| `public_username` | `string` | User's display name |
|
|
248
|
+
| `avatar_id` | `string` | User's current avatar ID |
|
|
249
|
+
| `props` | `object` | User's public properties (points, level, balances) |
|
|
250
|
+
| `pubic_username_set` | `boolean` | Whether the user has set a custom username |
|
|
251
|
+
|
|
252
|
+
**Example:**
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"cid": 6,
|
|
257
|
+
"errCode": 0,
|
|
258
|
+
"user_id": 98765,
|
|
259
|
+
"ext_user_id": "user_12345",
|
|
260
|
+
"public_username": "Player123",
|
|
261
|
+
"avatar_id": "av_001",
|
|
262
|
+
"props": {
|
|
263
|
+
"ach_points_balance": 1500,
|
|
264
|
+
"ach_level_current": "Silver",
|
|
265
|
+
"ach_points_ever": 5000
|
|
266
|
+
},
|
|
267
|
+
"pubic_username_set": false
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
> **Important:** Wait for a successful `IDENTIFY_RESPONSE` (errCode: 0) before sending `LOGIN` or any API methods.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Login
|
|
276
|
+
|
|
277
|
+
Sent after a successful `IDENTIFY` to report a user login event. Contains optional user-agent metadata.
|
|
278
|
+
|
|
279
|
+
### Request
|
|
280
|
+
|
|
281
|
+
**ClassId:** `7` (LOGIN)
|
|
282
|
+
|
|
283
|
+
| Field | Type | Description |
|
|
284
|
+
|-------|------|-------------|
|
|
285
|
+
| `payload` | `object` | Optional metadata (user agent info, custom data) |
|
|
286
|
+
|
|
287
|
+
**Example:**
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"cid": 7,
|
|
292
|
+
"payload": {
|
|
293
|
+
"ua_os_name": "iOS",
|
|
294
|
+
"ua_device_type": "mobile",
|
|
295
|
+
"ua_browser": "native"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Response
|
|
301
|
+
|
|
302
|
+
**ClassId:** `11` (LOGIN_RESPONSE)
|
|
303
|
+
|
|
304
|
+
| Field | Type | Description |
|
|
305
|
+
|-------|------|-------------|
|
|
306
|
+
| `errCode` | `number` | Error code (`0` = success) |
|
|
307
|
+
| `errMsg` | `string` | Error message (optional) |
|
|
308
|
+
|
|
309
|
+
**Example:**
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"cid": 11,
|
|
314
|
+
"errCode": 0
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Logout
|
|
321
|
+
|
|
322
|
+
Logs the user out. After receiving a successful response, the client should forget user data and reconnect if needed.
|
|
323
|
+
|
|
324
|
+
### Request
|
|
325
|
+
|
|
326
|
+
**ClassId:** `8` (LOGOUT)
|
|
327
|
+
|
|
328
|
+
No method-specific fields required.
|
|
329
|
+
|
|
330
|
+
**Example:**
|
|
331
|
+
|
|
332
|
+
```json
|
|
333
|
+
{
|
|
334
|
+
"cid": 8
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Response
|
|
339
|
+
|
|
340
|
+
**ClassId:** `12` (LOGOUT_RESPONSE)
|
|
341
|
+
|
|
342
|
+
| Field | Type | Description |
|
|
343
|
+
|-------|------|-------------|
|
|
344
|
+
| `errCode` | `number` | Error code (`0` = success) |
|
|
345
|
+
| `errMsg` | `string` | Error message (optional) |
|
|
346
|
+
|
|
347
|
+
**Example:**
|
|
348
|
+
|
|
349
|
+
```json
|
|
350
|
+
{
|
|
351
|
+
"cid": 12,
|
|
352
|
+
"errCode": 0
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
> **Recommended action:** On successful logout, clear cached user data and reconnect the WebSocket to start a fresh session.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Common Message Fields
|
|
361
|
+
|
|
362
|
+
All **request** messages must include the following base fields:
|
|
363
|
+
|
|
364
|
+
| Field | Type | Description |
|
|
365
|
+
|-------|------|-------------|
|
|
366
|
+
| `cid` | `number` | ClassId — message type identifier |
|
|
367
|
+
| `uuid` | `string` | Unique request identifier (used to match request with response) |
|
|
368
|
+
| `ts` | `number` | Timestamp in milliseconds |
|
|
369
|
+
|
|
370
|
+
All **response** messages include the following base fields:
|
|
371
|
+
|
|
372
|
+
| Field | Type | Description |
|
|
373
|
+
|-------|------|-------------|
|
|
374
|
+
| `cid` | `number` | ClassId — message type identifier |
|
|
375
|
+
| `uuid` | `string` | Same identifier from the request |
|
|
376
|
+
| `errCode` | `number` | Error code (`0` = success) |
|
|
377
|
+
| `errMsg` | `string` | Error message (optional, present when `errCode` != 0) |
|
|
378
|
+
|
|
379
|
+
> **Note:** These common fields are omitted from individual method descriptions below to avoid duplication. Only method-specific fields are listed.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
95
383
|
# Server Initiated Messages
|
|
96
384
|
|
|
97
385
|
Server initiated messages are sent by the server to the client without a prior request. The client should listen for these ClassIds and react accordingly (update UI, show notification, re-fetch data).
|
|
@@ -108,6 +396,9 @@ Unlike request/response methods, server initiated messages can arrive at any tim
|
|
|
108
396
|
| `706` | SAW_SPINS_COUNT_PUSH | Spin count updated |
|
|
109
397
|
| `707` | SAW_SHOW_SPIN_PUSH | Trigger to show mini-game |
|
|
110
398
|
| `808` | JP_WIN_PUSH | Jackpot win notification |
|
|
399
|
+
| `708` | SAW_PRIZE_DROP_WIN_PUSH | Prize drop win notification |
|
|
400
|
+
| `105` | CLIENT_EXECUTE_DEEPLINK_EVENT | Execute deep link on client |
|
|
401
|
+
| `107` | CLIENT_EXECUTE_JS_EVENT | Execute JavaScript on client |
|
|
111
402
|
|
|
112
403
|
---
|
|
113
404
|
|
|
@@ -223,25 +514,31 @@ Sent when the user's available spin count changes.
|
|
|
223
514
|
|
|
224
515
|
## SAW_SHOW_SPIN_PUSH
|
|
225
516
|
|
|
226
|
-
Sent as a trigger to display a mini-game to the user (Spin-A-Wheel, Scratch Card,
|
|
517
|
+
Sent as a trigger to display a mini-game to the user (Spin-A-Wheel, Scratch Card, Gift Box, etc.).
|
|
227
518
|
|
|
228
519
|
**ClassId:** `707`
|
|
229
520
|
|
|
521
|
+
**Fields:**
|
|
522
|
+
|
|
523
|
+
| Field | Type | Description |
|
|
524
|
+
|-------|------|-------------|
|
|
525
|
+
| `cid` | `number` | Message type identifier |
|
|
526
|
+
| `pending_message_id` | `number` | ID of the pending message that triggered this push |
|
|
527
|
+
| `saw_template_id` | `number` | ID of the mini-game template to display |
|
|
528
|
+
| `saw_game_type_id` | `number` | Game type: `1` = SpinAWheel, `2` = ScratchCard, `3` = MatchX, `4` = GiftBox, `5` = PrizeDrop, `6` = Quiz, `7` = LootboxWeekdays, `8` = LootboxCalendarDays, `9` = TreasureHunt, `10` = Voyager, `11` = Plinko, `12` = CoinFlip |
|
|
529
|
+
|
|
230
530
|
**Example:**
|
|
231
531
|
|
|
232
532
|
```json
|
|
233
533
|
{
|
|
234
|
-
"cid": 707
|
|
534
|
+
"cid": 707,
|
|
535
|
+
"pending_message_id": 456,
|
|
536
|
+
"saw_template_id": 123,
|
|
537
|
+
"saw_game_type_id": 1
|
|
235
538
|
}
|
|
236
539
|
```
|
|
237
540
|
|
|
238
|
-
**
|
|
239
|
-
|
|
240
|
-
| Field | Type | Description |
|
|
241
|
-
|-------|------|-------------|
|
|
242
|
-
| `cid` | `number` | Message type identifier |
|
|
243
|
-
|
|
244
|
-
**Recommended action:** Fetch mini-game templates and display the appropriate game modal/screen.
|
|
541
|
+
**Recommended action:** Use `saw_template_id` and `saw_game_type_id` to display the appropriate mini-game UI to the user.
|
|
245
542
|
|
|
246
543
|
---
|
|
247
544
|
|
|
@@ -283,6 +580,104 @@ Sent when a jackpot is won (can be the current user or another player).
|
|
|
283
580
|
|
|
284
581
|
---
|
|
285
582
|
|
|
583
|
+
## SAW_PRIZE_DROP_WIN_PUSH
|
|
584
|
+
|
|
585
|
+
Sent when a prize drop is won by the user.
|
|
586
|
+
|
|
587
|
+
**ClassId:** `708`
|
|
588
|
+
|
|
589
|
+
**Fields:**
|
|
590
|
+
|
|
591
|
+
| Field | Type | Description |
|
|
592
|
+
|-------|------|-------------|
|
|
593
|
+
| `cid` | `number` | Message type identifier |
|
|
594
|
+
| `request_id` | `string` | Unique request ID (GUID) |
|
|
595
|
+
| `saw_template_id` | `number` | Mini-game template ID |
|
|
596
|
+
| `saw_prize` | `object` | Prize details (SAWPrize object) |
|
|
597
|
+
| `saw_template` | `object` | Template details (SAWTemplate object) |
|
|
598
|
+
| `pending_message_id` | `number` | ID of the pending message |
|
|
599
|
+
|
|
600
|
+
**Example:**
|
|
601
|
+
|
|
602
|
+
```json
|
|
603
|
+
{
|
|
604
|
+
"cid": 708,
|
|
605
|
+
"request_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
606
|
+
"saw_template_id": 123,
|
|
607
|
+
"saw_prize": { "saw_prize_id": 1, "prize_value": 100 },
|
|
608
|
+
"saw_template": { "saw_template_id": 123, "saw_game_type_id": 5 },
|
|
609
|
+
"pending_message_id": 456
|
|
610
|
+
}
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
**Recommended action:** Display prize drop win notification and call `prizeDropWinAcknowledge` to acknowledge.
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
## CLIENT_EXECUTE_DEEPLINK_EVENT
|
|
618
|
+
|
|
619
|
+
Server-initiated event to execute a deep link on the client.
|
|
620
|
+
|
|
621
|
+
**ClassId:** `105`
|
|
622
|
+
|
|
623
|
+
**Fields:**
|
|
624
|
+
|
|
625
|
+
| Field | Type | Description |
|
|
626
|
+
|-------|------|-------------|
|
|
627
|
+
| `cid` | `number` | Message type identifier |
|
|
628
|
+
| `engagement_uid` | `string` | Engagement unique ID |
|
|
629
|
+
| `engagement_id` | `number` | Engagement ID |
|
|
630
|
+
| `root_audience_id` | `number` | Root audience ID |
|
|
631
|
+
| `payload` | `object` | Contains `dp` field with the deep link URL |
|
|
632
|
+
|
|
633
|
+
**Example:**
|
|
634
|
+
|
|
635
|
+
```json
|
|
636
|
+
{
|
|
637
|
+
"cid": 105,
|
|
638
|
+
"engagement_uid": "eng-001",
|
|
639
|
+
"engagement_id": 1,
|
|
640
|
+
"root_audience_id": 1,
|
|
641
|
+
"payload": { "dp": "myapp://promotions/summer" }
|
|
642
|
+
}
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
**Recommended action:** Report impression via ClassId 103, then navigate to the deep link URL.
|
|
646
|
+
|
|
647
|
+
---
|
|
648
|
+
|
|
649
|
+
## CLIENT_EXECUTE_JS_EVENT
|
|
650
|
+
|
|
651
|
+
Server-initiated event to execute JavaScript code on the client. Native clients should handle this appropriately or ignore.
|
|
652
|
+
|
|
653
|
+
**ClassId:** `107`
|
|
654
|
+
|
|
655
|
+
**Fields:**
|
|
656
|
+
|
|
657
|
+
| Field | Type | Description |
|
|
658
|
+
|-------|------|-------------|
|
|
659
|
+
| `cid` | `number` | Message type identifier |
|
|
660
|
+
| `engagement_uid` | `string` | Engagement unique ID |
|
|
661
|
+
| `engagement_id` | `number` | Engagement ID |
|
|
662
|
+
| `root_audience_id` | `number` | Root audience ID |
|
|
663
|
+
| `script` | `string` | JavaScript code to execute |
|
|
664
|
+
|
|
665
|
+
**Example:**
|
|
666
|
+
|
|
667
|
+
```json
|
|
668
|
+
{
|
|
669
|
+
"cid": 107,
|
|
670
|
+
"engagement_uid": "eng-001",
|
|
671
|
+
"engagement_id": 1,
|
|
672
|
+
"root_audience_id": 1,
|
|
673
|
+
"script": "console.log('hello')"
|
|
674
|
+
}
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
**Recommended action:** Report impression via ClassId 103. For native clients, evaluate if the script can be handled natively or ignore.
|
|
678
|
+
|
|
679
|
+
---
|
|
680
|
+
|
|
286
681
|
# API Methods
|
|
287
682
|
|
|
288
683
|
## User
|
|
@@ -295,11 +690,7 @@ Get user's gamification data including points, level, balances and counters.
|
|
|
295
690
|
|
|
296
691
|
**ClassId:** `527` (GET_ACHIEVEMENT_USER_REQUEST)
|
|
297
692
|
|
|
298
|
-
|
|
299
|
-
|-------|------|-------------|
|
|
300
|
-
| `cid` | `number` | `527` |
|
|
301
|
-
| `uuid` | `string` | Unique request identifier |
|
|
302
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
693
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
303
694
|
|
|
304
695
|
**Example:**
|
|
305
696
|
|
|
@@ -317,10 +708,6 @@ Get user's gamification data including points, level, balances and counters.
|
|
|
317
708
|
|
|
318
709
|
| Field | Type | Description |
|
|
319
710
|
|-------|------|-------------|
|
|
320
|
-
| `cid` | `number` | `528` |
|
|
321
|
-
| `uuid` | `string` | Request identifier (matches request) |
|
|
322
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
323
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
324
711
|
| `points_balance` | `number` | Current points balance |
|
|
325
712
|
| `gems_balance` | `number` | Current gems balance |
|
|
326
713
|
| `diamonds_balance` | `number` | Current diamonds balance |
|
|
@@ -354,14 +741,18 @@ Get user's gamification data including points, level, balances and counters.
|
|
|
354
741
|
|
|
355
742
|
---
|
|
356
743
|
|
|
357
|
-
###
|
|
744
|
+
### checkSegmentListMatch
|
|
358
745
|
|
|
359
|
-
Check if the current user belongs to a
|
|
746
|
+
Check if the current user belongs to one or more segments. Pass a single ID or multiple IDs in the array.
|
|
360
747
|
|
|
361
748
|
#### Request
|
|
362
749
|
|
|
363
750
|
**ClassId:** `161`
|
|
364
751
|
|
|
752
|
+
| Field | Type | Required | Description |
|
|
753
|
+
|-------|------|----------|-------------|
|
|
754
|
+
| `segment_id` | `number[]` | ✓ | Array of segment IDs to check |
|
|
755
|
+
|
|
365
756
|
**Example:**
|
|
366
757
|
|
|
367
758
|
```json
|
|
@@ -369,25 +760,18 @@ Check if the current user belongs to a specific segment.
|
|
|
369
760
|
"cid": 161,
|
|
370
761
|
"uuid": "550e8400-e29b-41d4-a716-446655440000",
|
|
371
762
|
"ts": 1704067200000,
|
|
372
|
-
"segment_id": [
|
|
763
|
+
"segment_id": [1, 2, 3]
|
|
373
764
|
}
|
|
374
765
|
```
|
|
375
766
|
|
|
376
|
-
**Fields:**
|
|
377
|
-
|
|
378
|
-
| Field | Type | Required | Description |
|
|
379
|
-
|-------|------|----------|-------------|
|
|
380
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
381
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
382
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
383
|
-
| `segment_id` | `number[]` | ✓ | Array with single segment ID |
|
|
384
|
-
|
|
385
|
-
---
|
|
386
|
-
|
|
387
767
|
#### Response
|
|
388
768
|
|
|
389
769
|
**ClassId:** `162`
|
|
390
770
|
|
|
771
|
+
| Field | Type | Description |
|
|
772
|
+
|-------|------|-------------|
|
|
773
|
+
| `segments` | [`TSegmentCheckResult[]`](../api/interfaces/TSegmentCheckResult.md) | Array of segment check results |
|
|
774
|
+
|
|
391
775
|
**Example:**
|
|
392
776
|
|
|
393
777
|
```json
|
|
@@ -396,79 +780,101 @@ Check if the current user belongs to a specific segment.
|
|
|
396
780
|
"errCode": 0,
|
|
397
781
|
"errMsg": null,
|
|
398
782
|
"segments": [
|
|
399
|
-
{ "segment_id":
|
|
783
|
+
{ "segment_id": 1, "is_matching": true },
|
|
784
|
+
{ "segment_id": 2, "is_matching": false },
|
|
785
|
+
{ "segment_id": 3, "is_matching": true }
|
|
400
786
|
]
|
|
401
787
|
}
|
|
402
788
|
```
|
|
403
789
|
|
|
404
|
-
|
|
790
|
+
---
|
|
791
|
+
|
|
792
|
+
### setAvatar
|
|
793
|
+
|
|
794
|
+
Set user's avatar.
|
|
795
|
+
|
|
796
|
+
#### Request
|
|
797
|
+
|
|
798
|
+
**ClassId:** `157`
|
|
405
799
|
|
|
406
800
|
| Field | Type | Description |
|
|
407
801
|
|-------|------|-------------|
|
|
408
|
-
| `
|
|
409
|
-
| `
|
|
410
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
411
|
-
| `segments` | [`TSegmentCheckResult[]`](../api/interfaces/TSegmentCheckResult.md) | Array of segment check results |
|
|
802
|
+
| `avatar_id` | `string` | Avatar ID to set |
|
|
803
|
+
| `skip_change_event` | `boolean` | If true, skips the avatar changed event (optional) |
|
|
412
804
|
|
|
413
|
-
|
|
805
|
+
**Example:**
|
|
414
806
|
|
|
415
|
-
|
|
807
|
+
```json
|
|
808
|
+
{
|
|
809
|
+
"cid": 157,
|
|
810
|
+
"uuid": "abc-123",
|
|
811
|
+
"ts": 1699999999999,
|
|
812
|
+
"avatar_id": "av_001"
|
|
813
|
+
}
|
|
814
|
+
```
|
|
416
815
|
|
|
417
|
-
|
|
816
|
+
#### Response
|
|
418
817
|
|
|
419
|
-
|
|
818
|
+
**ClassId:** `158`
|
|
420
819
|
|
|
421
|
-
|
|
820
|
+
| Field | Type | Description |
|
|
821
|
+
|-------|------|-------------|
|
|
822
|
+
| `avatar_id` | `string` | Updated avatar ID |
|
|
422
823
|
|
|
423
824
|
**Example:**
|
|
424
825
|
|
|
425
826
|
```json
|
|
426
827
|
{
|
|
427
|
-
"cid":
|
|
428
|
-
"uuid": "
|
|
429
|
-
"
|
|
430
|
-
"
|
|
828
|
+
"cid": 158,
|
|
829
|
+
"uuid": "abc-123",
|
|
830
|
+
"errCode": 0,
|
|
831
|
+
"avatar_id": "av_001"
|
|
431
832
|
}
|
|
432
833
|
```
|
|
433
834
|
|
|
434
|
-
|
|
835
|
+
---
|
|
435
836
|
|
|
436
|
-
|
|
437
|
-
|-------|------|----------|-------------|
|
|
438
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
439
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
440
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
441
|
-
| `segment_id` | `number[]` | ✓ | Array of segment IDs to check |
|
|
837
|
+
### setCustomUsername
|
|
442
838
|
|
|
443
|
-
|
|
839
|
+
Set user's custom display name.
|
|
444
840
|
|
|
445
|
-
####
|
|
841
|
+
#### Request
|
|
446
842
|
|
|
447
|
-
**ClassId:** `
|
|
843
|
+
**ClassId:** `159`
|
|
844
|
+
|
|
845
|
+
| Field | Type | Description |
|
|
846
|
+
|-------|------|-------------|
|
|
847
|
+
| `public_username_custom` | `string` | Custom username to set |
|
|
448
848
|
|
|
449
849
|
**Example:**
|
|
450
850
|
|
|
451
851
|
```json
|
|
452
852
|
{
|
|
453
|
-
"cid":
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
{ "segment_id": 1, "is_matching": true },
|
|
458
|
-
{ "segment_id": 2, "is_matching": false },
|
|
459
|
-
{ "segment_id": 3, "is_matching": true }
|
|
460
|
-
]
|
|
853
|
+
"cid": 159,
|
|
854
|
+
"uuid": "abc-123",
|
|
855
|
+
"ts": 1699999999999,
|
|
856
|
+
"public_username_custom": "SuperPlayer"
|
|
461
857
|
}
|
|
462
858
|
```
|
|
463
859
|
|
|
464
|
-
|
|
860
|
+
#### Response
|
|
861
|
+
|
|
862
|
+
**ClassId:** `160`
|
|
465
863
|
|
|
466
864
|
| Field | Type | Description |
|
|
467
865
|
|-------|------|-------------|
|
|
468
|
-
| `
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
866
|
+
| `public_username_custom` | `string` | Updated custom username |
|
|
867
|
+
|
|
868
|
+
**Example:**
|
|
869
|
+
|
|
870
|
+
```json
|
|
871
|
+
{
|
|
872
|
+
"cid": 160,
|
|
873
|
+
"uuid": "abc-123",
|
|
874
|
+
"errCode": 0,
|
|
875
|
+
"public_username_custom": "SuperPlayer"
|
|
876
|
+
}
|
|
877
|
+
```
|
|
472
878
|
|
|
473
879
|
---
|
|
474
880
|
|
|
@@ -494,11 +900,7 @@ Get list of all levels defined in the system.
|
|
|
494
900
|
|
|
495
901
|
**Fields:**
|
|
496
902
|
|
|
497
|
-
|
|
498
|
-
|-------|------|----------|-------------|
|
|
499
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
500
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
501
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
903
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
502
904
|
|
|
503
905
|
---
|
|
504
906
|
|
|
@@ -548,9 +950,6 @@ Get list of all levels defined in the system.
|
|
|
548
950
|
|
|
549
951
|
| Field | Type | Description |
|
|
550
952
|
|-------|------|-------------|
|
|
551
|
-
| `cid` | `number` | Message type identifier |
|
|
552
|
-
| `errCode` | `number` | Error code. `0` = success |
|
|
553
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
554
953
|
| `levels` | [`Level[]`](../api/interfaces/Level.md) | Array of level objects |
|
|
555
954
|
|
|
556
955
|
---
|
|
@@ -567,11 +966,7 @@ Get all missions and badges for the current user.
|
|
|
567
966
|
|
|
568
967
|
**ClassId:** `502` (GET_ACHIEVEMENT_MAP_REQUEST)
|
|
569
968
|
|
|
570
|
-
|
|
571
|
-
|-------|------|-------------|
|
|
572
|
-
| `cid` | `number` | `502` |
|
|
573
|
-
| `uuid` | `string` | Unique request identifier |
|
|
574
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
969
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
575
970
|
|
|
576
971
|
**Example:**
|
|
577
972
|
|
|
@@ -589,10 +984,6 @@ Get all missions and badges for the current user.
|
|
|
589
984
|
|
|
590
985
|
| Field | Type | Description |
|
|
591
986
|
|-------|------|-------------|
|
|
592
|
-
| `cid` | `number` | `503` |
|
|
593
|
-
| `uuid` | `string` | Request identifier (matches request) |
|
|
594
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
595
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
596
987
|
| `achievements` | [`UserAchievement[]`](../api/interfaces/UserAchievement.md) | Array of achievements (missions + badges) |
|
|
597
988
|
|
|
598
989
|
**Example:**
|
|
@@ -632,6 +1023,7 @@ Get all missions and badges for the current user.
|
|
|
632
1023
|
}
|
|
633
1024
|
]
|
|
634
1025
|
}
|
|
1026
|
+
```
|
|
635
1027
|
|
|
636
1028
|
---
|
|
637
1029
|
|
|
@@ -645,21 +1037,13 @@ Opt-in to a mission that requires opt-in.
|
|
|
645
1037
|
|
|
646
1038
|
| Field | Type | Description |
|
|
647
1039
|
|-------|------|-------------|
|
|
648
|
-
| `
|
|
649
|
-
| `uuid` | `string` | Unique request identifier |
|
|
650
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
651
|
-
| `ach_id` | `number` | Mission ID |
|
|
1040
|
+
| `achievementId` | `number` | Mission ID |
|
|
652
1041
|
|
|
653
1042
|
#### Response
|
|
654
1043
|
|
|
655
1044
|
**ClassId:** `526` (MISSION_OPTIN_RESPONSE)
|
|
656
1045
|
|
|
657
|
-
|
|
658
|
-
|-------|------|-------------|
|
|
659
|
-
| `cid` | `number` | `526` |
|
|
660
|
-
| `uuid` | `string` | Request identifier |
|
|
661
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
662
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1046
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
663
1047
|
|
|
664
1048
|
---
|
|
665
1049
|
|
|
@@ -673,9 +1057,6 @@ Claim reward for a completed mission.
|
|
|
673
1057
|
|
|
674
1058
|
| Field | Type | Description |
|
|
675
1059
|
|-------|------|-------------|
|
|
676
|
-
| `cid` | `number` | `539` |
|
|
677
|
-
| `uuid` | `string` | Unique request identifier |
|
|
678
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
679
1060
|
| `ach_id` | `number` | Mission ID |
|
|
680
1061
|
| `ach_completed_id` | `number` | Completion record ID |
|
|
681
1062
|
|
|
@@ -683,12 +1064,7 @@ Claim reward for a completed mission.
|
|
|
683
1064
|
|
|
684
1065
|
**ClassId:** `540` (ACHIEVEMENT_CLAIM_PRIZE_RESPONSE)
|
|
685
1066
|
|
|
686
|
-
|
|
687
|
-
|-------|------|-------------|
|
|
688
|
-
| `cid` | `number` | `540` |
|
|
689
|
-
| `uuid` | `string` | Request identifier |
|
|
690
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
691
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1067
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
692
1068
|
|
|
693
1069
|
---
|
|
694
1070
|
|
|
@@ -700,11 +1076,7 @@ Get mission and badge categories.
|
|
|
700
1076
|
|
|
701
1077
|
**ClassId:** `537` (GET_ACH_CATEGORIES_REQUEST)
|
|
702
1078
|
|
|
703
|
-
|
|
704
|
-
|-------|------|-------------|
|
|
705
|
-
| `cid` | `number` | `537` |
|
|
706
|
-
| `uuid` | `string` | Unique request identifier |
|
|
707
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1079
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
708
1080
|
|
|
709
1081
|
#### Response
|
|
710
1082
|
|
|
@@ -712,9 +1084,6 @@ Get mission and badge categories.
|
|
|
712
1084
|
|
|
713
1085
|
| Field | Type | Description |
|
|
714
1086
|
|-------|------|-------------|
|
|
715
|
-
| `cid` | `number` | `538` |
|
|
716
|
-
| `uuid` | `string` | Request identifier |
|
|
717
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
718
1087
|
| `categories` | [`AchCategory[]`](../api/interfaces/AchCategory.md) | Array of categories |
|
|
719
1088
|
|
|
720
1089
|
---
|
|
@@ -729,11 +1098,7 @@ Get custom UI sections.
|
|
|
729
1098
|
|
|
730
1099
|
**ClassId:** `523` (GET_CUSTOM_SECTIONS_REQUEST)
|
|
731
1100
|
|
|
732
|
-
|
|
733
|
-
|-------|------|-------------|
|
|
734
|
-
| `cid` | `number` | `523` |
|
|
735
|
-
| `uuid` | `string` | Unique request identifier |
|
|
736
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1101
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
737
1102
|
|
|
738
1103
|
#### Response
|
|
739
1104
|
|
|
@@ -741,9 +1106,6 @@ Get custom UI sections.
|
|
|
741
1106
|
|
|
742
1107
|
| Field | Type | Description |
|
|
743
1108
|
|-------|------|-------------|
|
|
744
|
-
| `cid` | `number` | `524` |
|
|
745
|
-
| `uuid` | `string` | Request identifier |
|
|
746
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
747
1109
|
| `customSections` | `object` | Map of section ID to [`UICustomSection`](../api/interfaces/UICustomSection.md) |
|
|
748
1110
|
|
|
749
1111
|
---
|
|
@@ -758,11 +1120,7 @@ Get all bonuses for the current user.
|
|
|
758
1120
|
|
|
759
1121
|
**ClassId:** `600` (GET_BONUSES_REQUEST)
|
|
760
1122
|
|
|
761
|
-
|
|
762
|
-
|-------|------|-------------|
|
|
763
|
-
| `cid` | `number` | `600` |
|
|
764
|
-
| `uuid` | `string` | Unique request identifier |
|
|
765
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1123
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
766
1124
|
|
|
767
1125
|
**Example:**
|
|
768
1126
|
|
|
@@ -780,10 +1138,6 @@ Get all bonuses for the current user.
|
|
|
780
1138
|
|
|
781
1139
|
| Field | Type | Description |
|
|
782
1140
|
|-------|------|-------------|
|
|
783
|
-
| `cid` | `number` | `601` |
|
|
784
|
-
| `uuid` | `string` | Request identifier (matches request) |
|
|
785
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
786
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
787
1141
|
| `bonuses` | [`Bonus[]`](../api/interfaces/Bonus.md) | Array of bonus objects |
|
|
788
1142
|
|
|
789
1143
|
**Example:**
|
|
@@ -824,9 +1178,6 @@ Claim a bonus by its ID.
|
|
|
824
1178
|
|
|
825
1179
|
| Field | Type | Description |
|
|
826
1180
|
|-------|------|-------------|
|
|
827
|
-
| `cid` | `number` | `602` |
|
|
828
|
-
| `uuid` | `string` | Unique request identifier |
|
|
829
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
830
1181
|
| `bonusId` | `number` | ID of the bonus to claim |
|
|
831
1182
|
|
|
832
1183
|
**Example:**
|
|
@@ -846,10 +1197,6 @@ Claim a bonus by its ID.
|
|
|
846
1197
|
|
|
847
1198
|
| Field | Type | Description |
|
|
848
1199
|
|-------|------|-------------|
|
|
849
|
-
| `cid` | `number` | `603` |
|
|
850
|
-
| `uuid` | `string` | Request identifier (matches request) |
|
|
851
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
852
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
853
1200
|
| `success` | `boolean` | Whether the claim was successful |
|
|
854
1201
|
|
|
855
1202
|
**Example:**
|
|
@@ -875,11 +1222,7 @@ Get all available store items.
|
|
|
875
1222
|
|
|
876
1223
|
**ClassId:** `509` (GET_SHOP_ITEMS_REQUEST)
|
|
877
1224
|
|
|
878
|
-
|
|
879
|
-
|-------|------|-------------|
|
|
880
|
-
| `cid` | `number` | `509` |
|
|
881
|
-
| `uuid` | `string` | Unique request identifier |
|
|
882
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1225
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
883
1226
|
|
|
884
1227
|
#### Response
|
|
885
1228
|
|
|
@@ -887,9 +1230,6 @@ Get all available store items.
|
|
|
887
1230
|
|
|
888
1231
|
| Field | Type | Description |
|
|
889
1232
|
|-------|------|-------------|
|
|
890
|
-
| `cid` | `number` | `510` |
|
|
891
|
-
| `uuid` | `string` | Request identifier |
|
|
892
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
893
1233
|
| `items` | [`StoreItem[]`](../api/interfaces/StoreItem.md) | Array of store items |
|
|
894
1234
|
|
|
895
1235
|
---
|
|
@@ -904,21 +1244,13 @@ Purchase a store item.
|
|
|
904
1244
|
|
|
905
1245
|
| Field | Type | Description |
|
|
906
1246
|
|-------|------|-------------|
|
|
907
|
-
| `cid` | `number` | `511` |
|
|
908
|
-
| `uuid` | `string` | Unique request identifier |
|
|
909
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
910
1247
|
| `itemId` | `number` | ID of the item to buy |
|
|
911
1248
|
|
|
912
1249
|
#### Response
|
|
913
1250
|
|
|
914
1251
|
**ClassId:** `512` (BUY_SHOP_ITEM_RESPONSE)
|
|
915
1252
|
|
|
916
|
-
|
|
917
|
-
|-------|------|-------------|
|
|
918
|
-
| `cid` | `number` | `512` |
|
|
919
|
-
| `uuid` | `string` | Request identifier |
|
|
920
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
921
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1253
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
922
1254
|
|
|
923
1255
|
---
|
|
924
1256
|
|
|
@@ -930,11 +1262,7 @@ Get store categories.
|
|
|
930
1262
|
|
|
931
1263
|
**ClassId:** `515` (GET_SHOP_CATEGORIES_REQUEST)
|
|
932
1264
|
|
|
933
|
-
|
|
934
|
-
|-------|------|-------------|
|
|
935
|
-
| `cid` | `number` | `515` |
|
|
936
|
-
| `uuid` | `string` | Unique request identifier |
|
|
937
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1265
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
938
1266
|
|
|
939
1267
|
#### Response
|
|
940
1268
|
|
|
@@ -942,9 +1270,6 @@ Get store categories.
|
|
|
942
1270
|
|
|
943
1271
|
| Field | Type | Description |
|
|
944
1272
|
|-------|------|-------------|
|
|
945
|
-
| `cid` | `number` | `516` |
|
|
946
|
-
| `uuid` | `string` | Request identifier |
|
|
947
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
948
1273
|
| `categories` | [`StoreCategory[]`](../api/interfaces/StoreCategory.md) | Array of categories |
|
|
949
1274
|
|
|
950
1275
|
---
|
|
@@ -959,9 +1284,6 @@ Get user's purchase history.
|
|
|
959
1284
|
|
|
960
1285
|
| Field | Type | Description |
|
|
961
1286
|
|-------|------|-------------|
|
|
962
|
-
| `cid` | `number` | `541` |
|
|
963
|
-
| `uuid` | `string` | Unique request identifier |
|
|
964
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
965
1287
|
| `limit` | `number` | Max items to return (default 20) |
|
|
966
1288
|
| `offset` | `number` | Offset for pagination |
|
|
967
1289
|
|
|
@@ -971,9 +1293,6 @@ Get user's purchase history.
|
|
|
971
1293
|
|
|
972
1294
|
| Field | Type | Description |
|
|
973
1295
|
|-------|------|-------------|
|
|
974
|
-
| `cid` | `number` | `542` |
|
|
975
|
-
| `uuid` | `string` | Request identifier |
|
|
976
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
977
1296
|
| `items` | [`StoreItem[]`](../api/interfaces/StoreItem.md) | Array of purchased items |
|
|
978
1297
|
|
|
979
1298
|
---
|
|
@@ -988,11 +1307,7 @@ Get all available mini-games (spin wheels, scratch cards, etc.).
|
|
|
988
1307
|
|
|
989
1308
|
**ClassId:** `700` (SAW_GET_SPINS_REQUEST)
|
|
990
1309
|
|
|
991
|
-
|
|
992
|
-
|-------|------|-------------|
|
|
993
|
-
| `cid` | `number` | `700` |
|
|
994
|
-
| `uuid` | `string` | Unique request identifier |
|
|
995
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1310
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
996
1311
|
|
|
997
1312
|
#### Response
|
|
998
1313
|
|
|
@@ -1000,9 +1315,6 @@ Get all available mini-games (spin wheels, scratch cards, etc.).
|
|
|
1000
1315
|
|
|
1001
1316
|
| Field | Type | Description |
|
|
1002
1317
|
|-------|------|-------------|
|
|
1003
|
-
| `cid` | `number` | `701` |
|
|
1004
|
-
| `uuid` | `string` | Request identifier |
|
|
1005
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1006
1318
|
| `templates` | [`SAWTemplate[]`](../api/interfaces/SAWTemplate.md) | Array of mini-game templates |
|
|
1007
1319
|
|
|
1008
1320
|
---
|
|
@@ -1017,20 +1329,27 @@ Play a mini-game and get prize.
|
|
|
1017
1329
|
|
|
1018
1330
|
| Field | Type | Description |
|
|
1019
1331
|
|-------|------|-------------|
|
|
1020
|
-
| `
|
|
1021
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1022
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1332
|
+
| `request_id` | `string` | Client-generated unique request ID (GUID) |
|
|
1023
1333
|
| `saw_template_id` | `number` | Mini-game template ID |
|
|
1024
1334
|
|
|
1335
|
+
**Example:**
|
|
1336
|
+
|
|
1337
|
+
```json
|
|
1338
|
+
{
|
|
1339
|
+
"cid": 702,
|
|
1340
|
+
"uuid": "abc-123",
|
|
1341
|
+
"ts": 1699999999999,
|
|
1342
|
+
"request_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
1343
|
+
"saw_template_id": 123
|
|
1344
|
+
}
|
|
1345
|
+
```
|
|
1346
|
+
|
|
1025
1347
|
#### Response
|
|
1026
1348
|
|
|
1027
1349
|
**ClassId:** `703` (SAW_DO_SPIN_RESPONSE)
|
|
1028
1350
|
|
|
1029
1351
|
| Field | Type | Description |
|
|
1030
1352
|
|-------|------|-------------|
|
|
1031
|
-
| `cid` | `number` | `703` |
|
|
1032
|
-
| `uuid` | `string` | Request identifier |
|
|
1033
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1034
1353
|
| `saw_prize_id` | `number` | Won prize ID |
|
|
1035
1354
|
| `request_id` | `string` | Request ID for acknowledgement |
|
|
1036
1355
|
|
|
@@ -1046,9 +1365,6 @@ Play a mini-game multiple times in a single request.
|
|
|
1046
1365
|
|
|
1047
1366
|
| Field | Type | Description |
|
|
1048
1367
|
|-------|------|-------------|
|
|
1049
|
-
| `cid` | `number` | `712` |
|
|
1050
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1051
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1052
1368
|
| `spins` | `array` | Array of spin objects with `request_id` (string) and `saw_template_id` (number) |
|
|
1053
1369
|
|
|
1054
1370
|
#### Response
|
|
@@ -1057,10 +1373,18 @@ Play a mini-game multiple times in a single request.
|
|
|
1057
1373
|
|
|
1058
1374
|
| Field | Type | Description |
|
|
1059
1375
|
|-------|------|-------------|
|
|
1060
|
-
| `
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1376
|
+
| `results` | `SAWDoSpinResponse[]` | Array of spin results |
|
|
1377
|
+
|
|
1378
|
+
Each item in `results`:
|
|
1379
|
+
|
|
1380
|
+
| Field | Type | Description |
|
|
1381
|
+
|-------|------|-------------|
|
|
1382
|
+
| `request_id` | `string` | Request ID matching the request |
|
|
1383
|
+
| `saw_prize_id` | `number` | Won prize ID |
|
|
1384
|
+
| `errCode` | `number` | Error code for this spin (`0` = success) |
|
|
1385
|
+
| `errMsg` | `string` | Error message (if any) |
|
|
1386
|
+
| `jackpot_amount` | `number` | Jackpot amount if won jackpot prize (optional) |
|
|
1387
|
+
| `first_spin_in_period` | `number` | Whether this is the first spin in the period |
|
|
1064
1388
|
|
|
1065
1389
|
#### Example
|
|
1066
1390
|
|
|
@@ -1078,76 +1402,182 @@ Play a mini-game multiple times in a single request.
|
|
|
1078
1402
|
}
|
|
1079
1403
|
```
|
|
1080
1404
|
|
|
1081
|
-
**Response:**
|
|
1405
|
+
**Response:**
|
|
1406
|
+
```json
|
|
1407
|
+
{
|
|
1408
|
+
"cid": 713,
|
|
1409
|
+
"uuid": "batch-123",
|
|
1410
|
+
"errCode": 0,
|
|
1411
|
+
"results": [
|
|
1412
|
+
{ "request_id": "spin-1", "saw_prize_id": 10, "errCode": 0, "first_spin_in_period": 1 },
|
|
1413
|
+
{ "request_id": "spin-2", "saw_prize_id": 5, "errCode": 0, "first_spin_in_period": 0 },
|
|
1414
|
+
{ "request_id": "spin-3", "saw_prize_id": 10, "errCode": 0, "first_spin_in_period": 0 }
|
|
1415
|
+
]
|
|
1416
|
+
}
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
---
|
|
1420
|
+
|
|
1421
|
+
### miniGameWinAcknowledge
|
|
1422
|
+
|
|
1423
|
+
Acknowledge a mini-game win. Should be called after displaying the win result to the user.
|
|
1424
|
+
|
|
1425
|
+
#### Request
|
|
1426
|
+
|
|
1427
|
+
**ClassId:** `704` (SAW_AKNOWLEDGE_REQUEST)
|
|
1428
|
+
|
|
1429
|
+
| Field | Type | Description |
|
|
1430
|
+
|-------|------|-------------|
|
|
1431
|
+
| `request_id` | `string` | Request ID from the spin response |
|
|
1432
|
+
|
|
1433
|
+
#### Response
|
|
1434
|
+
|
|
1435
|
+
**ClassId:** `705` (SAW_AKNOWLEDGE_RESPONSE)
|
|
1436
|
+
|
|
1437
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1438
|
+
|
|
1439
|
+
---
|
|
1440
|
+
|
|
1441
|
+
### getMiniGamesHistory
|
|
1442
|
+
|
|
1443
|
+
Get mini-game play history.
|
|
1444
|
+
|
|
1445
|
+
#### Request
|
|
1446
|
+
|
|
1447
|
+
**ClassId:** `716` (GET_SAW_HISTORY_REQUEST)
|
|
1448
|
+
|
|
1449
|
+
| Field | Type | Description |
|
|
1450
|
+
|-------|------|-------------|
|
|
1451
|
+
| `limit` | `number` | Max items to return |
|
|
1452
|
+
| `offset` | `number` | Offset for pagination |
|
|
1453
|
+
| `saw_template_id` | `number` | Filter by template ID (optional) |
|
|
1454
|
+
|
|
1455
|
+
#### Response
|
|
1456
|
+
|
|
1457
|
+
**ClassId:** `717` (GET_SAW_HISTORY_RESPONSE)
|
|
1458
|
+
|
|
1459
|
+
| Field | Type | Description |
|
|
1460
|
+
|-------|------|-------------|
|
|
1461
|
+
| `prizes` | [`SAWPrizesHistory[]`](../api/interfaces/SAWPrizesHistory.md) | Array of history items |
|
|
1462
|
+
| `hasMore` | `boolean` | Whether more items are available for pagination |
|
|
1463
|
+
|
|
1464
|
+
---
|
|
1465
|
+
|
|
1466
|
+
### acknowledgeMiniGameSpinPush
|
|
1467
|
+
|
|
1468
|
+
Acknowledge a mini-game spin push. Sent after handling `SAW_SHOW_SPIN_PUSH` (707) to confirm the spin push was processed. Fire-and-forget, no response expected.
|
|
1469
|
+
|
|
1470
|
+
#### Request
|
|
1471
|
+
|
|
1472
|
+
**ClassId:** `711`
|
|
1473
|
+
|
|
1474
|
+
| Field | Type | Description |
|
|
1475
|
+
|-------|------|-------------|
|
|
1476
|
+
| `saw_template_id` | `number` | Mini-game template ID |
|
|
1477
|
+
| `pending_message_id` | `number` | Pending message ID from the push |
|
|
1478
|
+
|
|
1479
|
+
**Example:**
|
|
1480
|
+
|
|
1082
1481
|
```json
|
|
1083
1482
|
{
|
|
1084
|
-
"cid":
|
|
1085
|
-
"uuid": "
|
|
1086
|
-
"
|
|
1087
|
-
"
|
|
1088
|
-
|
|
1089
|
-
{ "request_id": "spin-2", "prize_type": 2, "prize_value": 50 },
|
|
1090
|
-
{ "request_id": "spin-3", "prize_type": 1, "prize_value": 200 }
|
|
1091
|
-
]
|
|
1483
|
+
"cid": 711,
|
|
1484
|
+
"uuid": "abc-123",
|
|
1485
|
+
"ts": 1699999999999,
|
|
1486
|
+
"saw_template_id": 123,
|
|
1487
|
+
"pending_message_id": 456
|
|
1092
1488
|
}
|
|
1093
1489
|
```
|
|
1094
1490
|
|
|
1095
1491
|
---
|
|
1096
1492
|
|
|
1097
|
-
###
|
|
1493
|
+
### miniGameWinAcknowledgeBatch
|
|
1098
1494
|
|
|
1099
|
-
Acknowledge
|
|
1495
|
+
Acknowledge multiple mini-game wins at once. Used after `playMiniGameBatch`.
|
|
1100
1496
|
|
|
1101
1497
|
#### Request
|
|
1102
1498
|
|
|
1103
|
-
**ClassId:** `
|
|
1499
|
+
**ClassId:** `714`
|
|
1104
1500
|
|
|
1105
1501
|
| Field | Type | Description |
|
|
1106
1502
|
|-------|------|-------------|
|
|
1107
|
-
| `
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1503
|
+
| `request_ids` | `string[]` | Array of request IDs to acknowledge |
|
|
1504
|
+
|
|
1505
|
+
**Example:**
|
|
1506
|
+
|
|
1507
|
+
```json
|
|
1508
|
+
{
|
|
1509
|
+
"cid": 714,
|
|
1510
|
+
"uuid": "ack-batch-123",
|
|
1511
|
+
"ts": 1699999999999,
|
|
1512
|
+
"request_ids": ["spin-1", "spin-2", "spin-3"]
|
|
1513
|
+
}
|
|
1514
|
+
```
|
|
1111
1515
|
|
|
1112
1516
|
#### Response
|
|
1113
1517
|
|
|
1114
|
-
**ClassId:** `
|
|
1518
|
+
**ClassId:** `715`
|
|
1115
1519
|
|
|
1116
1520
|
| Field | Type | Description |
|
|
1117
1521
|
|-------|------|-------------|
|
|
1118
|
-
| `
|
|
1119
|
-
|
|
1120
|
-
|
|
1522
|
+
| `results` | `array` | Array of acknowledgement results |
|
|
1523
|
+
|
|
1524
|
+
Each item in `results`:
|
|
1525
|
+
|
|
1526
|
+
| Field | Type | Description |
|
|
1527
|
+
|-------|------|-------------|
|
|
1528
|
+
| `request_id` | `string` | Request ID |
|
|
1529
|
+
| `errCode` | `number` | Error code for this acknowledgement |
|
|
1530
|
+
| `errMessage` | `string` | Error message (optional) |
|
|
1531
|
+
|
|
1532
|
+
**Example:**
|
|
1533
|
+
|
|
1534
|
+
```json
|
|
1535
|
+
{
|
|
1536
|
+
"cid": 715,
|
|
1537
|
+
"uuid": "ack-batch-123",
|
|
1538
|
+
"errCode": 0,
|
|
1539
|
+
"results": [
|
|
1540
|
+
{ "request_id": "spin-1", "errCode": 0 },
|
|
1541
|
+
{ "request_id": "spin-2", "errCode": 0 },
|
|
1542
|
+
{ "request_id": "spin-3", "errCode": 0 }
|
|
1543
|
+
]
|
|
1544
|
+
}
|
|
1545
|
+
```
|
|
1121
1546
|
|
|
1122
1547
|
---
|
|
1123
1548
|
|
|
1124
|
-
###
|
|
1549
|
+
### prizeDropWinAcknowledge
|
|
1125
1550
|
|
|
1126
|
-
|
|
1551
|
+
Acknowledge a prize drop win. Should be called after receiving `SAW_PRIZE_DROP_WIN_PUSH` (708).
|
|
1127
1552
|
|
|
1128
1553
|
#### Request
|
|
1129
1554
|
|
|
1130
|
-
**ClassId:** `
|
|
1555
|
+
**ClassId:** `709`
|
|
1131
1556
|
|
|
1132
1557
|
| Field | Type | Description |
|
|
1133
1558
|
|-------|------|-------------|
|
|
1134
|
-
| `
|
|
1135
|
-
| `
|
|
1136
|
-
| `
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1559
|
+
| `request_id` | `string` | Request ID from the prize drop push (GUID) |
|
|
1560
|
+
| `pending_message_id` | `number` | Pending message ID from the push |
|
|
1561
|
+
| `claim_required` | `boolean` | Whether claim is required |
|
|
1562
|
+
|
|
1563
|
+
**Example:**
|
|
1564
|
+
|
|
1565
|
+
```json
|
|
1566
|
+
{
|
|
1567
|
+
"cid": 709,
|
|
1568
|
+
"uuid": "abc-123",
|
|
1569
|
+
"ts": 1699999999999,
|
|
1570
|
+
"request_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
1571
|
+
"pending_message_id": 456,
|
|
1572
|
+
"claim_required": false
|
|
1573
|
+
}
|
|
1574
|
+
```
|
|
1140
1575
|
|
|
1141
1576
|
#### Response
|
|
1142
1577
|
|
|
1143
|
-
**ClassId:** `
|
|
1578
|
+
**ClassId:** `710`
|
|
1144
1579
|
|
|
1145
|
-
|
|
1146
|
-
|-------|------|-------------|
|
|
1147
|
-
| `cid` | `number` | `717` |
|
|
1148
|
-
| `uuid` | `string` | Request identifier |
|
|
1149
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1150
|
-
| `history` | [`SAWPrizesHistory[]`](../api/interfaces/SAWPrizesHistory.md) | Array of history items |
|
|
1580
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1151
1581
|
|
|
1152
1582
|
---
|
|
1153
1583
|
|
|
@@ -1161,11 +1591,7 @@ Get all active tournament instances.
|
|
|
1161
1591
|
|
|
1162
1592
|
**ClassId:** `517` (GET_TOURNAMENT_LOBBY_REQUEST)
|
|
1163
1593
|
|
|
1164
|
-
|
|
1165
|
-
|-------|------|-------------|
|
|
1166
|
-
| `cid` | `number` | `517` |
|
|
1167
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1168
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1594
|
+
No method-specific fields. Send only the common fields (see [Common Message Fields](#common-message-fields)).
|
|
1169
1595
|
|
|
1170
1596
|
#### Response
|
|
1171
1597
|
|
|
@@ -1173,9 +1599,6 @@ Get all active tournament instances.
|
|
|
1173
1599
|
|
|
1174
1600
|
| Field | Type | Description |
|
|
1175
1601
|
|-------|------|-------------|
|
|
1176
|
-
| `cid` | `number` | `518` |
|
|
1177
|
-
| `uuid` | `string` | Request identifier |
|
|
1178
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1179
1602
|
| `tournaments` | [`Tournament[]`](../api/interfaces/Tournament.md) | Array of tournaments |
|
|
1180
1603
|
|
|
1181
1604
|
---
|
|
@@ -1190,10 +1613,7 @@ Get detailed information about a tournament instance including leaderboard.
|
|
|
1190
1613
|
|
|
1191
1614
|
| Field | Type | Description |
|
|
1192
1615
|
|-------|------|-------------|
|
|
1193
|
-
| `
|
|
1194
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1195
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1196
|
-
| `tournament_instance_id` | `number` | Tournament instance ID |
|
|
1616
|
+
| `tournamentInstanceId` | `number` | Tournament instance ID |
|
|
1197
1617
|
|
|
1198
1618
|
#### Response
|
|
1199
1619
|
|
|
@@ -1201,9 +1621,6 @@ Get detailed information about a tournament instance including leaderboard.
|
|
|
1201
1621
|
|
|
1202
1622
|
| Field | Type | Description |
|
|
1203
1623
|
|-------|------|-------------|
|
|
1204
|
-
| `cid` | `number` | `520` |
|
|
1205
|
-
| `uuid` | `string` | Request identifier |
|
|
1206
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1207
1624
|
| `tournamentInfo` | [`GetTournamentInfoResponse.tournamentInfo`](../api/interfaces/GetTournamentInfoResponse.md) | Tournament info with players |
|
|
1208
1625
|
| `userPosition` | [`TournamentPlayer`](../api/interfaces/TournamentPlayer.md) | Current user's position |
|
|
1209
1626
|
| `prizeStructure` | `object` | Prize structure with `prizes` array |
|
|
@@ -1220,21 +1637,13 @@ Register user in a tournament.
|
|
|
1220
1637
|
|
|
1221
1638
|
| Field | Type | Description |
|
|
1222
1639
|
|-------|------|-------------|
|
|
1223
|
-
| `
|
|
1224
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1225
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1226
|
-
| `tournament_instance_id` | `number` | Tournament instance ID |
|
|
1640
|
+
| `tournamentInstanceId` | `number` | Tournament instance ID |
|
|
1227
1641
|
|
|
1228
1642
|
#### Response
|
|
1229
1643
|
|
|
1230
1644
|
**ClassId:** `522` (TOURNAMENT_REGISTER_RESPONSE)
|
|
1231
1645
|
|
|
1232
|
-
|
|
1233
|
-
|-------|------|-------------|
|
|
1234
|
-
| `cid` | `number` | `522` |
|
|
1235
|
-
| `uuid` | `string` | Request identifier |
|
|
1236
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1237
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1646
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1238
1647
|
|
|
1239
1648
|
---
|
|
1240
1649
|
|
|
@@ -1250,11 +1659,9 @@ Get leaderboard for a specific period type.
|
|
|
1250
1659
|
|
|
1251
1660
|
| Field | Type | Description |
|
|
1252
1661
|
|-------|------|-------------|
|
|
1253
|
-
| `
|
|
1254
|
-
| `
|
|
1255
|
-
| `
|
|
1256
|
-
| `period_type` | `number` | Period type: `1` = Daily, `2` = Weekly, `3` = Monthly |
|
|
1257
|
-
| `get_previous_period` | `boolean` | Get previous period instead of current |
|
|
1662
|
+
| `period_type_id` | `number` | Period type: `1` = Daily, `2` = Weekly, `3` = Monthly (optional, if not set returns all boards) |
|
|
1663
|
+
| `snapshot_offset` | `number` | `0` = current period, `1` = previous period, `2` = period before previous, etc. |
|
|
1664
|
+
| `include_users` | `boolean` | Whether to include user details (optional) |
|
|
1258
1665
|
|
|
1259
1666
|
#### Response
|
|
1260
1667
|
|
|
@@ -1262,9 +1669,6 @@ Get leaderboard for a specific period type.
|
|
|
1262
1669
|
|
|
1263
1670
|
| Field | Type | Description |
|
|
1264
1671
|
|-------|------|-------------|
|
|
1265
|
-
| `cid` | `number` | `506` |
|
|
1266
|
-
| `uuid` | `string` | Request identifier |
|
|
1267
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1268
1672
|
| `leaders` | [`LeaderBoardUserT[]`](../api/interfaces/LeaderBoardUserT.md) | Array of leaderboard entries |
|
|
1269
1673
|
| `user_position` | `number` | Current user's position |
|
|
1270
1674
|
| `user_points` | `number` | Current user's points |
|
|
@@ -1283,12 +1687,9 @@ Get user's inbox messages.
|
|
|
1283
1687
|
|
|
1284
1688
|
| Field | Type | Description |
|
|
1285
1689
|
|-------|------|-------------|
|
|
1286
|
-
| `
|
|
1287
|
-
| `
|
|
1288
|
-
| `
|
|
1289
|
-
| `from` | `number` | Start index (default 0) |
|
|
1290
|
-
| `to` | `number` | End index (default 20) |
|
|
1291
|
-
| `only_favorite` | `boolean` | Filter favorites only |
|
|
1690
|
+
| `limit` | `number` | Max messages to return (default 20) |
|
|
1691
|
+
| `offset` | `number` | Offset for pagination (default 0) |
|
|
1692
|
+
| `starred_only` | `boolean` | Filter favorites only |
|
|
1292
1693
|
| `category_id` | `number` | Filter by category |
|
|
1293
1694
|
| `read_status` | `number` | Filter by read status |
|
|
1294
1695
|
|
|
@@ -1298,10 +1699,7 @@ Get user's inbox messages.
|
|
|
1298
1699
|
|
|
1299
1700
|
| Field | Type | Description |
|
|
1300
1701
|
|-------|------|-------------|
|
|
1301
|
-
| `
|
|
1302
|
-
| `uuid` | `string` | Request identifier |
|
|
1303
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1304
|
-
| `messages` | [`InboxMessage[]`](../api/interfaces/InboxMessage.md) | Array of messages |
|
|
1702
|
+
| `log` | [`InboxMessage[]`](../api/interfaces/InboxMessage.md) | Array of messages |
|
|
1305
1703
|
| `unread_count` | `number` | Total unread count |
|
|
1306
1704
|
|
|
1307
1705
|
---
|
|
@@ -1316,20 +1714,13 @@ Mark an inbox message as read.
|
|
|
1316
1714
|
|
|
1317
1715
|
| Field | Type | Description |
|
|
1318
1716
|
|-------|------|-------------|
|
|
1319
|
-
| `
|
|
1320
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1321
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1322
|
-
| `message_guid` | `string` | Message GUID |
|
|
1717
|
+
| `engagement_uid` | `string` | Message engagement UID |
|
|
1323
1718
|
|
|
1324
1719
|
#### Response
|
|
1325
1720
|
|
|
1326
1721
|
**ClassId:** `530` (MARK_INBOX_READ_RESPONSE)
|
|
1327
1722
|
|
|
1328
|
-
|
|
1329
|
-
|-------|------|-------------|
|
|
1330
|
-
| `cid` | `number` | `530` |
|
|
1331
|
-
| `uuid` | `string` | Request identifier |
|
|
1332
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1723
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1333
1724
|
|
|
1334
1725
|
---
|
|
1335
1726
|
|
|
@@ -1343,21 +1734,14 @@ Mark/unmark an inbox message as favorite.
|
|
|
1343
1734
|
|
|
1344
1735
|
| Field | Type | Description |
|
|
1345
1736
|
|-------|------|-------------|
|
|
1346
|
-
| `
|
|
1347
|
-
| `
|
|
1348
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1349
|
-
| `message_guid` | `string` | Message GUID |
|
|
1350
|
-
| `mark` | `boolean` | `true` to add, `false` to remove |
|
|
1737
|
+
| `engagement_uid` | `string` | Message engagement UID |
|
|
1738
|
+
| `is_starred` | `boolean` | `true` to add, `false` to remove |
|
|
1351
1739
|
|
|
1352
1740
|
#### Response
|
|
1353
1741
|
|
|
1354
1742
|
**ClassId:** `532` (MARK_INBOX_STARRED_RESPONSE)
|
|
1355
1743
|
|
|
1356
|
-
|
|
1357
|
-
|-------|------|-------------|
|
|
1358
|
-
| `cid` | `number` | `532` |
|
|
1359
|
-
| `uuid` | `string` | Request identifier |
|
|
1360
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1744
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1361
1745
|
|
|
1362
1746
|
---
|
|
1363
1747
|
|
|
@@ -1371,20 +1755,13 @@ Delete an inbox message.
|
|
|
1371
1755
|
|
|
1372
1756
|
| Field | Type | Description |
|
|
1373
1757
|
|-------|------|-------------|
|
|
1374
|
-
| `
|
|
1375
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1376
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1377
|
-
| `message_guid` | `string` | Message GUID |
|
|
1758
|
+
| `engagement_uid` | `string` | Message engagement UID |
|
|
1378
1759
|
|
|
1379
1760
|
#### Response
|
|
1380
1761
|
|
|
1381
1762
|
**ClassId:** `536` (MARK_INBOX_DELETED_RESPONSE)
|
|
1382
1763
|
|
|
1383
|
-
|
|
1384
|
-
|-------|------|-------------|
|
|
1385
|
-
| `cid` | `number` | `536` |
|
|
1386
|
-
| `uuid` | `string` | Request identifier |
|
|
1387
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1764
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1388
1765
|
|
|
1389
1766
|
---
|
|
1390
1767
|
|
|
@@ -1392,7 +1769,7 @@ Delete an inbox message.
|
|
|
1392
1769
|
|
|
1393
1770
|
Get unread inbox message count.
|
|
1394
1771
|
|
|
1395
|
-
> **Note:** This uses the same ClassId as `getInboxMessages`. The unread count is returned in the `unread_count` field of the response.
|
|
1772
|
+
> **Note:** This uses the same ClassId as `getInboxMessages`. The unread count is returned in the `unread_count` field of the response. Send a minimal request with `limit: 1` to get the count without fetching all messages.
|
|
1396
1773
|
|
|
1397
1774
|
#### Request
|
|
1398
1775
|
|
|
@@ -1400,9 +1777,6 @@ Get unread inbox message count.
|
|
|
1400
1777
|
|
|
1401
1778
|
| Field | Type | Description |
|
|
1402
1779
|
|-------|------|-------------|
|
|
1403
|
-
| `cid` | `number` | `513` |
|
|
1404
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1405
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1406
1780
|
| `limit` | `number` | Set to `1` (minimal fetch) |
|
|
1407
1781
|
| `offset` | `number` | Set to `0` |
|
|
1408
1782
|
|
|
@@ -1412,9 +1786,6 @@ Get unread inbox message count.
|
|
|
1412
1786
|
|
|
1413
1787
|
| Field | Type | Description |
|
|
1414
1788
|
|-------|------|-------------|
|
|
1415
|
-
| `cid` | `number` | `514` |
|
|
1416
|
-
| `uuid` | `string` | Request identifier |
|
|
1417
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1418
1789
|
| `unread_count` | `number` | Number of unread messages |
|
|
1419
1790
|
|
|
1420
1791
|
---
|
|
@@ -1447,20 +1818,13 @@ Mark all inbox messages as read.
|
|
|
1447
1818
|
|
|
1448
1819
|
| Field | Type | Description |
|
|
1449
1820
|
|-------|------|-------------|
|
|
1450
|
-
| `cid` | `number` | `529` |
|
|
1451
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1452
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1453
1821
|
| `all_read` | `boolean` | Set to `true` |
|
|
1454
1822
|
|
|
1455
1823
|
#### Response
|
|
1456
1824
|
|
|
1457
1825
|
**ClassId:** `530` (MARK_INBOX_READ_RESPONSE)
|
|
1458
1826
|
|
|
1459
|
-
|
|
1460
|
-
|-------|------|-------------|
|
|
1461
|
-
| `cid` | `number` | `530` |
|
|
1462
|
-
| `uuid` | `string` | Request identifier |
|
|
1463
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1827
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1464
1828
|
|
|
1465
1829
|
---
|
|
1466
1830
|
|
|
@@ -1474,20 +1838,13 @@ Delete all inbox messages.
|
|
|
1474
1838
|
|
|
1475
1839
|
| Field | Type | Description |
|
|
1476
1840
|
|-------|------|-------------|
|
|
1477
|
-
| `cid` | `number` | `535` |
|
|
1478
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1479
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1480
1841
|
| `all_deleted` | `boolean` | Set to `true` |
|
|
1481
1842
|
|
|
1482
1843
|
#### Response
|
|
1483
1844
|
|
|
1484
1845
|
**ClassId:** `536` (MARK_INBOX_DELETED_RESPONSE)
|
|
1485
1846
|
|
|
1486
|
-
|
|
1487
|
-
|-------|------|-------------|
|
|
1488
|
-
| `cid` | `number` | `536` |
|
|
1489
|
-
| `uuid` | `string` | Request identifier |
|
|
1490
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1847
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1491
1848
|
|
|
1492
1849
|
---
|
|
1493
1850
|
|
|
@@ -1503,9 +1860,6 @@ Get all available jackpots.
|
|
|
1503
1860
|
|
|
1504
1861
|
| Field | Type | Description |
|
|
1505
1862
|
|-------|------|-------------|
|
|
1506
|
-
| `cid` | `number` | `800` |
|
|
1507
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1508
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1509
1863
|
| `jp_template_id` | `number` | Filter by template ID (optional) |
|
|
1510
1864
|
|
|
1511
1865
|
#### Response
|
|
@@ -1514,9 +1868,6 @@ Get all available jackpots.
|
|
|
1514
1868
|
|
|
1515
1869
|
| Field | Type | Description |
|
|
1516
1870
|
|-------|------|-------------|
|
|
1517
|
-
| `cid` | `number` | `801` |
|
|
1518
|
-
| `uuid` | `string` | Request identifier |
|
|
1519
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1520
1871
|
| `items` | [`JackpotDetails[]`](../api/interfaces/JackpotDetails.md) | Array of jackpots |
|
|
1521
1872
|
|
|
1522
1873
|
---
|
|
@@ -1531,20 +1882,13 @@ Opt-in to a jackpot.
|
|
|
1531
1882
|
|
|
1532
1883
|
| Field | Type | Description |
|
|
1533
1884
|
|-------|------|-------------|
|
|
1534
|
-
| `cid` | `number` | `804` |
|
|
1535
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1536
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1537
1885
|
| `jp_template_id` | `number` | Jackpot template ID |
|
|
1538
1886
|
|
|
1539
1887
|
#### Response
|
|
1540
1888
|
|
|
1541
1889
|
**ClassId:** `805` (JP_OPTIN_RESPONSE)
|
|
1542
1890
|
|
|
1543
|
-
|
|
1544
|
-
|-------|------|-------------|
|
|
1545
|
-
| `cid` | `number` | `805` |
|
|
1546
|
-
| `uuid` | `string` | Request identifier |
|
|
1547
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1891
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1548
1892
|
|
|
1549
1893
|
---
|
|
1550
1894
|
|
|
@@ -1558,20 +1902,13 @@ Opt-out from a jackpot.
|
|
|
1558
1902
|
|
|
1559
1903
|
| Field | Type | Description |
|
|
1560
1904
|
|-------|------|-------------|
|
|
1561
|
-
| `cid` | `number` | `806` |
|
|
1562
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1563
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1564
1905
|
| `jp_template_id` | `number` | Jackpot template ID |
|
|
1565
1906
|
|
|
1566
1907
|
#### Response
|
|
1567
1908
|
|
|
1568
1909
|
**ClassId:** `807` (JP_OPTOUT_RESPONSE)
|
|
1569
1910
|
|
|
1570
|
-
|
|
1571
|
-
|-------|------|-------------|
|
|
1572
|
-
| `cid` | `number` | `807` |
|
|
1573
|
-
| `uuid` | `string` | Request identifier |
|
|
1574
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1911
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
1575
1912
|
|
|
1576
1913
|
---
|
|
1577
1914
|
|
|
@@ -1585,9 +1922,6 @@ Get jackpot winners history.
|
|
|
1585
1922
|
|
|
1586
1923
|
| Field | Type | Description |
|
|
1587
1924
|
|-------|------|-------------|
|
|
1588
|
-
| `cid` | `number` | `809` |
|
|
1589
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1590
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1591
1925
|
| `jp_template_id` | `number` | Jackpot template ID |
|
|
1592
1926
|
| `limit` | `number` | Max items to return |
|
|
1593
1927
|
| `offset` | `number` | Offset for pagination |
|
|
@@ -1598,9 +1932,6 @@ Get jackpot winners history.
|
|
|
1598
1932
|
|
|
1599
1933
|
| Field | Type | Description |
|
|
1600
1934
|
|-------|------|-------------|
|
|
1601
|
-
| `cid` | `number` | `810` |
|
|
1602
|
-
| `uuid` | `string` | Request identifier |
|
|
1603
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
1604
1935
|
| `winners` | [`JackpotWinnerHistory[]`](../api/interfaces/JackpotWinnerHistory.md) | Array of winners |
|
|
1605
1936
|
|
|
1606
1937
|
---
|
|
@@ -1615,9 +1946,6 @@ Get games eligible for a specific jackpot.
|
|
|
1615
1946
|
|
|
1616
1947
|
| Field | Type | Description |
|
|
1617
1948
|
|-------|------|-------------|
|
|
1618
|
-
| `cid` | `number` | `811` |
|
|
1619
|
-
| `uuid` | `string` | Unique request identifier |
|
|
1620
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
1621
1949
|
| `jp_template_id` | `number` | Jackpot template ID |
|
|
1622
1950
|
|
|
1623
1951
|
#### Response
|
|
@@ -1626,10 +1954,71 @@ Get games eligible for a specific jackpot.
|
|
|
1626
1954
|
|
|
1627
1955
|
| Field | Type | Description |
|
|
1628
1956
|
|-------|------|-------------|
|
|
1629
|
-
| `
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1957
|
+
| `eligible_games` | [`AchRelatedGame[]`](../api/interfaces/AchRelatedGame.md) | Array of eligible games |
|
|
1958
|
+
|
|
1959
|
+
---
|
|
1960
|
+
|
|
1961
|
+
### getJackpotLatestPots
|
|
1962
|
+
|
|
1963
|
+
Get latest jackpot pot values for specified templates.
|
|
1964
|
+
|
|
1965
|
+
#### Request
|
|
1966
|
+
|
|
1967
|
+
**ClassId:** `802`
|
|
1968
|
+
|
|
1969
|
+
| Field | Type | Description |
|
|
1970
|
+
|-------|------|-------------|
|
|
1971
|
+
| `jp_template_ids` | `number[]` | Array of jackpot template IDs |
|
|
1972
|
+
|
|
1973
|
+
**Example:**
|
|
1974
|
+
|
|
1975
|
+
```json
|
|
1976
|
+
{
|
|
1977
|
+
"cid": 802,
|
|
1978
|
+
"uuid": "pot-123",
|
|
1979
|
+
"ts": 1699999999999,
|
|
1980
|
+
"jp_template_ids": [1, 2, 3]
|
|
1981
|
+
}
|
|
1982
|
+
```
|
|
1983
|
+
|
|
1984
|
+
#### Response
|
|
1985
|
+
|
|
1986
|
+
**ClassId:** `803`
|
|
1987
|
+
|
|
1988
|
+
| Field | Type | Description |
|
|
1989
|
+
|-------|------|-------------|
|
|
1990
|
+
| `items` | `JackpotPot[]` | Array of jackpot pot objects |
|
|
1991
|
+
|
|
1992
|
+
Each `JackpotPot`:
|
|
1993
|
+
|
|
1994
|
+
| Field | Type | Description |
|
|
1995
|
+
|-------|------|-------------|
|
|
1996
|
+
| `jp_template_id` | `number` | Jackpot template ID |
|
|
1997
|
+
| `jp_pot_id` | `number` | Jackpot pot ID |
|
|
1998
|
+
| `current_pot_amount` | `number` | Current pot amount in base currency |
|
|
1999
|
+
| `current_pot_amount_user_currency` | `number` | Current pot amount in user's currency |
|
|
2000
|
+
| `explode_date_ts` | `number` | Timestamp when pot exploded (0 if not yet) |
|
|
2001
|
+
| `current_pot_temperature` | `number` | Temperature: 0=Cold, 1=Warm, 2=Hot, 3=Burning |
|
|
2002
|
+
|
|
2003
|
+
**Example:**
|
|
2004
|
+
|
|
2005
|
+
```json
|
|
2006
|
+
{
|
|
2007
|
+
"cid": 803,
|
|
2008
|
+
"uuid": "pot-123",
|
|
2009
|
+
"errCode": 0,
|
|
2010
|
+
"items": [
|
|
2011
|
+
{
|
|
2012
|
+
"jp_template_id": 1,
|
|
2013
|
+
"jp_pot_id": 100,
|
|
2014
|
+
"current_pot_amount": 50000,
|
|
2015
|
+
"current_pot_amount_user_currency": 50000,
|
|
2016
|
+
"explode_date_ts": 0,
|
|
2017
|
+
"current_pot_temperature": 2
|
|
2018
|
+
}
|
|
2019
|
+
]
|
|
2020
|
+
}
|
|
2021
|
+
```
|
|
1633
2022
|
|
|
1634
2023
|
---
|
|
1635
2024
|
|
|
@@ -1658,9 +2047,6 @@ Get list of Raffles available for user.
|
|
|
1658
2047
|
|
|
1659
2048
|
| Field | Type | Required | Description |
|
|
1660
2049
|
|-------|------|----------|-------------|
|
|
1661
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
1662
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
1663
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
1664
2050
|
| `skip_public_meta` | `boolean` | - | If `true`, response will not include `public_meta` objects (reduces payload size) |
|
|
1665
2051
|
|
|
1666
2052
|
---
|
|
@@ -1745,9 +2131,6 @@ Get list of Raffles available for user.
|
|
|
1745
2131
|
|
|
1746
2132
|
| Field | Type | Description |
|
|
1747
2133
|
|-------|------|-------------|
|
|
1748
|
-
| `cid` | `number` | Message type identifier |
|
|
1749
|
-
| `errCode` | `number` | Error code. `0` = success |
|
|
1750
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1751
2134
|
| `items` | [`Raffle[]`](../api/interfaces/Raffle.md) | Array of raffles |
|
|
1752
2135
|
|
|
1753
2136
|
---
|
|
@@ -1786,9 +2169,6 @@ Get detailed information about a specific draw run, including winners.
|
|
|
1786
2169
|
|
|
1787
2170
|
| Field | Type | Required | Description |
|
|
1788
2171
|
|-------|------|----------|-------------|
|
|
1789
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
1790
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
1791
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
1792
2172
|
| `raffle_id` | `number` | ✓ | ID of the raffle |
|
|
1793
2173
|
| `run_id` | `number` | ✓ | ID of the specific draw run |
|
|
1794
2174
|
| `winners_limit` | `number` | - | Maximum number of winners to return |
|
|
@@ -1866,9 +2246,6 @@ Get detailed information about a specific draw run, including winners.
|
|
|
1866
2246
|
|
|
1867
2247
|
| Field | Type | Description |
|
|
1868
2248
|
|-------|------|-------------|
|
|
1869
|
-
| `cid` | `number` | Message type identifier |
|
|
1870
|
-
| `errCode` | `number` | Error code. `0` = success |
|
|
1871
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1872
2249
|
| `draw` | [`RaffleDraw`](../api/interfaces/RaffleDraw.md) | Draw run details with winners |
|
|
1873
2250
|
|
|
1874
2251
|
---
|
|
@@ -1905,9 +2282,6 @@ Get history of completed draw runs for a specific raffle. Useful for displaying
|
|
|
1905
2282
|
|
|
1906
2283
|
| Field | Type | Required | Description |
|
|
1907
2284
|
|-------|------|----------|-------------|
|
|
1908
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
1909
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
1910
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
1911
2285
|
| `raffle_id` | `number` | ✓ | ID of the raffle |
|
|
1912
2286
|
| `draw_id` | `number` | - | ID of specific draw. If not passed, all draw runs for the raffle will be returned |
|
|
1913
2287
|
|
|
@@ -1963,9 +2337,6 @@ Get history of completed draw runs for a specific raffle. Useful for displaying
|
|
|
1963
2337
|
|
|
1964
2338
|
| Field | Type | Description |
|
|
1965
2339
|
|-------|------|-------------|
|
|
1966
|
-
| `cid` | `number` | Message type identifier |
|
|
1967
|
-
| `errCode` | `number` | Error code. `0` = success |
|
|
1968
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
1969
2340
|
| `draw_runs` | [`RaffleDrawRun[]`](../api/interfaces/RaffleDrawRun.md) | Array of historical draw runs |
|
|
1970
2341
|
|
|
1971
2342
|
---
|
|
@@ -2001,9 +2372,6 @@ Claim a prize won in a raffle draw.
|
|
|
2001
2372
|
|
|
2002
2373
|
| Field | Type | Required | Description |
|
|
2003
2374
|
|-------|------|----------|-------------|
|
|
2004
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
2005
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
2006
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
2007
2375
|
| `won_id` | `number` | ✓ | ID of the won prize (from `raf_won_id` in RafflePrizeWinner) |
|
|
2008
2376
|
|
|
2009
2377
|
---
|
|
@@ -2024,11 +2392,7 @@ Claim a prize won in a raffle draw.
|
|
|
2024
2392
|
|
|
2025
2393
|
**Fields:**
|
|
2026
2394
|
|
|
2027
|
-
|
|
2028
|
-
|-------|------|-------------|
|
|
2029
|
-
| `cid` | `number` | Message type identifier |
|
|
2030
|
-
| `errCode` | `number` | Error code. `0` = success |
|
|
2031
|
-
| `errMsg` | `string` | Error message (if any) |
|
|
2395
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
2032
2396
|
|
|
2033
2397
|
---
|
|
2034
2398
|
|
|
@@ -2065,9 +2429,6 @@ Request opt-in for a specific raffle draw run. Used when a raffle requires expli
|
|
|
2065
2429
|
|
|
2066
2430
|
| Field | Type | Required | Description |
|
|
2067
2431
|
|-------|------|----------|-------------|
|
|
2068
|
-
| `cid` | `number` | ✓ | Message type identifier |
|
|
2069
|
-
| `uuid` | `string` | ✓ | Unique request identifier |
|
|
2070
|
-
| `ts` | `number` | ✓ | Timestamp in milliseconds |
|
|
2071
2432
|
| `raffle_id` | `number` | ✓ | ID of the raffle |
|
|
2072
2433
|
| `draw_id` | `number` | ✓ | ID of the draw |
|
|
2073
2434
|
| `raffle_run_id` | `number` | ✓ | ID of the specific draw run |
|
|
@@ -2090,11 +2451,161 @@ Request opt-in for a specific raffle draw run. Used when a raffle requires expli
|
|
|
2090
2451
|
|
|
2091
2452
|
**Fields:**
|
|
2092
2453
|
|
|
2454
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
2455
|
+
|
|
2456
|
+
---
|
|
2457
|
+
|
|
2458
|
+
## Engagement Tracking
|
|
2459
|
+
|
|
2460
|
+
### reportEngagementImpression
|
|
2461
|
+
|
|
2462
|
+
Report that an engagement message was displayed to the user (impression event). Fire-and-forget, no response expected.
|
|
2463
|
+
|
|
2464
|
+
#### Request
|
|
2465
|
+
|
|
2466
|
+
**ClassId:** `103`
|
|
2467
|
+
|
|
2093
2468
|
| Field | Type | Description |
|
|
2094
2469
|
|-------|------|-------------|
|
|
2095
|
-
| `
|
|
2096
|
-
| `
|
|
2097
|
-
|
|
2470
|
+
| `engagement_uid` | `string` | Engagement unique ID |
|
|
2471
|
+
| `activityType` | `number` | Activity type from CJMActivityType enum: `20`=Banner, `30`=Popup, `31`=Inbox, `40`=Push |
|
|
2472
|
+
|
|
2473
|
+
**Example:**
|
|
2474
|
+
|
|
2475
|
+
```json
|
|
2476
|
+
{
|
|
2477
|
+
"cid": 103,
|
|
2478
|
+
"uuid": "abc-123",
|
|
2479
|
+
"ts": 1699999999999,
|
|
2480
|
+
"engagement_uid": "eng-001",
|
|
2481
|
+
"activityType": 30
|
|
2482
|
+
}
|
|
2483
|
+
```
|
|
2484
|
+
|
|
2485
|
+
---
|
|
2486
|
+
|
|
2487
|
+
### reportEngagementAction
|
|
2488
|
+
|
|
2489
|
+
Report that a user interacted with an engagement message (click/action event). Fire-and-forget, no response expected.
|
|
2490
|
+
|
|
2491
|
+
#### Request
|
|
2492
|
+
|
|
2493
|
+
**ClassId:** `104`
|
|
2494
|
+
|
|
2495
|
+
| Field | Type | Description |
|
|
2496
|
+
|-------|------|-------------|
|
|
2497
|
+
| `engagement_uid` | `string` | Engagement unique ID |
|
|
2498
|
+
| `activityType` | `number` | Activity type from CJMActivityType enum |
|
|
2499
|
+
| `action` | `string` | Action identifier (optional) |
|
|
2500
|
+
|
|
2501
|
+
**Example:**
|
|
2502
|
+
|
|
2503
|
+
```json
|
|
2504
|
+
{
|
|
2505
|
+
"cid": 104,
|
|
2506
|
+
"uuid": "abc-123",
|
|
2507
|
+
"ts": 1699999999999,
|
|
2508
|
+
"engagement_uid": "eng-001",
|
|
2509
|
+
"activityType": 30,
|
|
2510
|
+
"action": "cta_click"
|
|
2511
|
+
}
|
|
2512
|
+
```
|
|
2513
|
+
|
|
2514
|
+
---
|
|
2515
|
+
|
|
2516
|
+
### reportEngagementFailed
|
|
2517
|
+
|
|
2518
|
+
Report that an engagement message failed to display. Fire-and-forget, no response expected.
|
|
2519
|
+
|
|
2520
|
+
#### Request
|
|
2521
|
+
|
|
2522
|
+
**ClassId:** `106`
|
|
2523
|
+
|
|
2524
|
+
| Field | Type | Description |
|
|
2525
|
+
|-------|------|-------------|
|
|
2526
|
+
| `engagement_uid` | `string` | Engagement unique ID |
|
|
2527
|
+
| `activityType` | `number` | Activity type from CJMActivityType enum |
|
|
2528
|
+
| `action` | `string` | Action that failed (optional) |
|
|
2529
|
+
| `reason` | `string` | Failure reason (optional) |
|
|
2530
|
+
|
|
2531
|
+
**Example:**
|
|
2532
|
+
|
|
2533
|
+
```json
|
|
2534
|
+
{
|
|
2535
|
+
"cid": 106,
|
|
2536
|
+
"uuid": "abc-123",
|
|
2537
|
+
"ts": 1699999999999,
|
|
2538
|
+
"engagement_uid": "eng-001",
|
|
2539
|
+
"activityType": 30,
|
|
2540
|
+
"reason": "render_error"
|
|
2541
|
+
}
|
|
2542
|
+
```
|
|
2543
|
+
|
|
2544
|
+
---
|
|
2545
|
+
|
|
2546
|
+
### trackActivity
|
|
2547
|
+
|
|
2548
|
+
Track a client-side analytics activity. Fire-and-forget, no response expected.
|
|
2549
|
+
|
|
2550
|
+
#### Request
|
|
2551
|
+
|
|
2552
|
+
**ClassId:** `155`
|
|
2553
|
+
|
|
2554
|
+
| Field | Type | Description |
|
|
2555
|
+
|-------|------|-------------|
|
|
2556
|
+
| `activity_id` | `number` | Activity identifier |
|
|
2557
|
+
| `view_time_sec` | `number` | View time in seconds (optional) |
|
|
2558
|
+
|
|
2559
|
+
**Example:**
|
|
2560
|
+
|
|
2561
|
+
```json
|
|
2562
|
+
{
|
|
2563
|
+
"cid": 155,
|
|
2564
|
+
"uuid": "abc-123",
|
|
2565
|
+
"ts": 1699999999999,
|
|
2566
|
+
"activity_id": 1,
|
|
2567
|
+
"view_time_sec": 30
|
|
2568
|
+
}
|
|
2569
|
+
```
|
|
2570
|
+
|
|
2571
|
+
---
|
|
2572
|
+
|
|
2573
|
+
## Push Notifications
|
|
2574
|
+
|
|
2575
|
+
### registerPushNotificationsToken
|
|
2576
|
+
|
|
2577
|
+
Register a push notifications token for the current user. Required for receiving push notifications on native platforms.
|
|
2578
|
+
|
|
2579
|
+
#### Request
|
|
2580
|
+
|
|
2581
|
+
**ClassId:** `1003`
|
|
2582
|
+
|
|
2583
|
+
| Field | Type | Description |
|
|
2584
|
+
|-------|------|-------------|
|
|
2585
|
+
| `token` | `string` | Push notification token (FCM token for Android, APNs token for iOS). Set to `null` to unregister. |
|
|
2586
|
+
| `platform` | `number` | Platform: `6`=NATIVE_IOS, `7`=NATIVE_ANDROID |
|
|
2587
|
+
| `pushNotificationUserStatus` | `number` | Status: `0`=ALLOWED, `1`=ASK, `2`=BLOCKED, `3`=SUSPENDED |
|
|
2588
|
+
| `app_package_id` | `string` | Application package ID (e.g. "com.example.app") |
|
|
2589
|
+
|
|
2590
|
+
**Example:**
|
|
2591
|
+
|
|
2592
|
+
```json
|
|
2593
|
+
{
|
|
2594
|
+
"cid": 1003,
|
|
2595
|
+
"uuid": "push-123",
|
|
2596
|
+
"ts": 1699999999999,
|
|
2597
|
+
"token": "fMI-qkT3...",
|
|
2598
|
+
"platform": 7,
|
|
2599
|
+
"pushNotificationUserStatus": 0,
|
|
2600
|
+
"app_package_id": "com.example.app"
|
|
2601
|
+
}
|
|
2602
|
+
```
|
|
2603
|
+
|
|
2604
|
+
#### Response
|
|
2605
|
+
|
|
2606
|
+
**ClassId:** `2003`
|
|
2607
|
+
|
|
2608
|
+
No method-specific fields. Returns only the common response fields (see [Common Message Fields](#common-message-fields)).
|
|
2098
2609
|
|
|
2099
2610
|
---
|
|
2100
2611
|
|
|
@@ -2110,9 +2621,8 @@ Get UI translations for a specific language.
|
|
|
2110
2621
|
|
|
2111
2622
|
| Field | Type | Description |
|
|
2112
2623
|
|-------|------|-------------|
|
|
2113
|
-
| `
|
|
2114
|
-
| `
|
|
2115
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
2624
|
+
| `hash_code` | `number` | Hash code for caching (send `0` on first request) |
|
|
2625
|
+
| `areas` | `number[]` | Translation areas to fetch (send `[]` for all) |
|
|
2116
2626
|
| `lang_code` | `string` | Language code (e.g., "en", "de", "fr") |
|
|
2117
2627
|
|
|
2118
2628
|
#### Response
|
|
@@ -2121,9 +2631,7 @@ Get UI translations for a specific language.
|
|
|
2121
2631
|
|
|
2122
2632
|
| Field | Type | Description |
|
|
2123
2633
|
|-------|------|-------------|
|
|
2124
|
-
| `
|
|
2125
|
-
| `uuid` | `string` | Request identifier |
|
|
2126
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
2634
|
+
| `hash_code` | `number` | Hash code (use for subsequent requests to enable caching) |
|
|
2127
2635
|
| `translations` | `object` | Key-value map of translation strings |
|
|
2128
2636
|
|
|
2129
2637
|
#### Example
|
|
@@ -2134,6 +2642,8 @@ Get UI translations for a specific language.
|
|
|
2134
2642
|
"cid": 13,
|
|
2135
2643
|
"uuid": "trans-123",
|
|
2136
2644
|
"ts": 1699999999999,
|
|
2645
|
+
"hash_code": 0,
|
|
2646
|
+
"areas": [],
|
|
2137
2647
|
"lang_code": "en"
|
|
2138
2648
|
}
|
|
2139
2649
|
```
|
|
@@ -2144,6 +2654,7 @@ Get UI translations for a specific language.
|
|
|
2144
2654
|
"cid": 14,
|
|
2145
2655
|
"uuid": "trans-123",
|
|
2146
2656
|
"errCode": 0,
|
|
2657
|
+
"hash_code": 12345,
|
|
2147
2658
|
"translations": {
|
|
2148
2659
|
"button.spin": "Spin Now",
|
|
2149
2660
|
"label.points": "Points",
|
|
@@ -2164,11 +2675,10 @@ Get user's points history.
|
|
|
2164
2675
|
|
|
2165
2676
|
| Field | Type | Description |
|
|
2166
2677
|
|-------|------|-------------|
|
|
2167
|
-
| `cid` | `number` | `545` |
|
|
2168
|
-
| `uuid` | `string` | Unique request identifier |
|
|
2169
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
2170
2678
|
| `startTimeSeconds` | `number` | Start time (Unix timestamp in seconds) |
|
|
2171
2679
|
| `endTimeSeconds` | `number` | End time (Unix timestamp in seconds) |
|
|
2680
|
+
| `limit` | `number` | Max items to return |
|
|
2681
|
+
| `offset` | `number` | Offset for pagination |
|
|
2172
2682
|
|
|
2173
2683
|
#### Response
|
|
2174
2684
|
|
|
@@ -2176,9 +2686,6 @@ Get user's points history.
|
|
|
2176
2686
|
|
|
2177
2687
|
| Field | Type | Description |
|
|
2178
2688
|
|-------|------|-------------|
|
|
2179
|
-
| `cid` | `number` | `546` |
|
|
2180
|
-
| `uuid` | `string` | Request identifier |
|
|
2181
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
2182
2689
|
| `logHistory` | [`PointsLog[]`](../api/interfaces/PointsLog.md) \| [`GemsDiamondsLog[]`](../api/interfaces/GemsDiamondsLog.md) | Array of points history entries |
|
|
2183
2690
|
|
|
2184
2691
|
#### Example
|
|
@@ -2226,9 +2733,6 @@ Get missions and tournaments related to a specific game.
|
|
|
2226
2733
|
|
|
2227
2734
|
| Field | Type | Description |
|
|
2228
2735
|
|-------|------|-------------|
|
|
2229
|
-
| `cid` | `number` | `543` |
|
|
2230
|
-
| `uuid` | `string` | Unique request identifier |
|
|
2231
|
-
| `ts` | `number` | Timestamp (ms) |
|
|
2232
2736
|
| `related_game_id` | `string` | Game ID to find related items for |
|
|
2233
2737
|
|
|
2234
2738
|
#### Response
|
|
@@ -2237,9 +2741,6 @@ Get missions and tournaments related to a specific game.
|
|
|
2237
2741
|
|
|
2238
2742
|
| Field | Type | Description |
|
|
2239
2743
|
|-------|------|-------------|
|
|
2240
|
-
| `cid` | `number` | `544` |
|
|
2241
|
-
| `uuid` | `string` | Request identifier |
|
|
2242
|
-
| `errCode` | `number` | Error code (`0` = success) |
|
|
2243
2744
|
| `achievements` | `array` | Related missions/achievements |
|
|
2244
2745
|
| `tournaments` | `array` | Related tournaments |
|
|
2245
2746
|
|