Project

General

Profile

Onboarding Foreign API Spc » History » Version 6

Ryan Supawarapong, 03/05/2026 02:20 AM

1 1 Ryan Supawarapong
# Onboarding Foreign API Spc
2
3 4 Ryan Supawarapong
## 1. Pre-Create (Fullname)
4 2 Ryan Supawarapong
5
| Type | Value |
6 1 Ryan Supawarapong
|---|---|
7 2 Ryan Supawarapong
| API Path | `/api/v1/foreign/individual/ico/precreate` |
8
| Request Type | `POST` |
9
| Content-Type | `application/json` |
10 1 Ryan Supawarapong
11
### Request Body
12
13 2 Ryan Supawarapong
| Key | Type | Example | Required |
14
|---|---|---|---|
15
| title | string | `"Mr."` | yes |
16
| name | string | `"John"` | yes |
17 1 Ryan Supawarapong
| surname | string | `"Doe"` | yes |
18 2 Ryan Supawarapong
| email | string | `"john@doe.com"` | yes |
19
| mobile | string | `"0987654321"` | yes |
20 4 Ryan Supawarapong
| birthDate | string (ISO 8601) | `"1990-01-01T00:00:00Z"` | yes |
21 2 Ryan Supawarapong
| marriageStatus | string | `"Single"` | yes |
22
| nationality | string | `"USA"` | yes |
23
| passportNumber | string | `"AC123435"` | yes |
24 4 Ryan Supawarapong
| expirationDate | string (ISO 8601) | `"2030-01-01T00:00:00Z"` | yes |
25 2 Ryan Supawarapong
| agreement | boolean | `true` | yes |
26 1 Ryan Supawarapong
27
### Success Response (200)
28
29 2 Ryan Supawarapong
| JSON Path | Type | Example | Required |
30
|---|---|---|---|
31
| status | string | `"success"` | yes |
32 4 Ryan Supawarapong
| data | object | `{"registerId":"..."}` | yes |
33
| data.registerId | string | `"registerId"` | no (`omitempty`) |
34 1 Ryan Supawarapong
| data.alreadyExist | boolean | `true` | no (`omitempty`) |
35
| xid | string | `"xRequestId"` | yes |
36
37
### Error Response
38
39 4 Ryan Supawarapong
#### Bad Request (400) — bind/validate/usecase error
40
| JSON Path | Type | Example | Required |
41
|---|---|---|---|
42
| status | string | `"failed"` or `"error"` | yes |
43
| message | string | `"error message"` | no |
44
| data | object | `{"errors":[...]}` | no (validation) |
45
| xid | string | `"xRequestId"` | yes |
46
47
---
48
49
## 2. Back to Register
50
51
| Type | Value |
52
|---|---|
53
| API Path | `/api/v1/foreign/individual/ico/backregister` |
54
| Request Type | `POST` |
55
| Content-Type | `application/json` |
56
57
### Request Body
58
59
| Key | Type | Example | Required |
60
|---|---|---|---|
61
| registerId | string | `"registerId"` | no |
62
| citizenId | string | `"1234567890123"` | no |
63
| name | string | `"John"` | no |
64
| taxId | string | `"TAX123"` | no |
65
| dateFrom | string (ISO 8601) | `"2024-01-01T00:00:00Z"` | no |
66
| dateTo | string (ISO 8601) | `"2025-01-01T00:00:00Z"` | no |
67
| page | number | `1` | no |
68
| pageSize | number | `10` | no |
69
| sessionId | string | `"session-id"` | no |
70
| icoCode | string | `"ICO001"` | no |
71
| staus | number | `1` | no |
72
73
### Success Response (200)
74
75
| JSON Path | Type | Example | Required |
76
|---|---|---|---|
77
| response | object | existing customer info object | yes |
78
| xid | string | `"xRequestId"` | yes |
79
80
### Error Response
81
82 1 Ryan Supawarapong
#### Bad Request (400)
83
| JSON Path | Type | Example | Required |
84
|---|---|---|---|
85 4 Ryan Supawarapong
| message | string | `"error message"` | yes |
86
| xid | string | `"xRequestId"` | yes |
87 1 Ryan Supawarapong
88 4 Ryan Supawarapong
---
89
90
## 3. Init Appman
91
92
| Type | Value |
93
|---|---|
94
| API Path | `/api/v1/foreign/appman/init/:registerId` |
95
| Request Type | `GET` |
96
| Content-Type | `application/json` |
97
98
### Query Parameters
99
100
| Key | Type | Example | Required |
101
|---|---|---|---|
102
| registerId | string | `"registerId-12345"` | yes |
103
104
### Request Body
105
106
| Key | Type | Example | Required |
107
|---|---|---|---|
108
| - | - | - | no body |
109
110
### Success Response (200)
111
112 1 Ryan Supawarapong
| JSON Path | Type | Example | Required |
113
|---|---|---|---|
114 4 Ryan Supawarapong
| redirect_url | string | `"https://appman.test"` | yes |
115
| xid | string | `"xRequestID"` | yes |
116
117
### Error Response
118
119
#### Bad Request (400)
120
| JSON Path | Type | Example | Required |
121
|---|---|---|---|
122
| message | string | `"registerId is required"` | yes |
123
| xid | string | `"xRequestId"` | yes |
124
125
---
126
127
## 4. Get Result Appman
128
129
| Type | Value |
130
|---|---|
131
| API Path | `/api/v1/foreign/appman/result` |
132
| Request Type | `POST` |
133
| Content-Type | `application/json` |
134
135
### Request Body
136
137
_Not yet implemented._
138
139 5 Ryan Supawarapong
### Response
140 4 Ryan Supawarapong
141 6 Ryan Supawarapong
***
142
143 4 Ryan Supawarapong
## 5. Submit CRS
144
145
| Type | Value |
146
|---|---|
147
| API Path | `/api/v1/foreign/individual/ico/crs` |
148
| Request Type | `POST` |
149
| Content-Type | `application/json` |
150
151
### Request Body
152
153
| Key | Type | Example | Required |
154
|---|---|---|---|
155
| registerId | string | `"registerId"` | yes |
156
| crs | array\<object\> | `[{"member_id":"...","is_tax_not_usa":true,...}]` | yes |
157
| crs[].member_id | string | `"member-001"` | no |
158
| crs[].is_tax_not_usa | boolean | `true` | no |
159
| crs[].country_tax_residence | string | `"US"` | no |
160
| crs[].is_tin | boolean | `true` | no |
161
| crs[].tin | string | `"123456789"` | no |
162
163
### Success Response (200)
164
165
| JSON Path | Type | Example | Required |
166
|---|---|---|---|
167
| xid | string | `"xRequestId"` | yes |
168
169
### Error Response
170
171
#### Bad Request (400)
172
| JSON Path | Type | Example | Required |
173
|---|---|---|---|
174
| message | string | `"error message"` | yes |
175
| xid | string | `"xRequestId"` | yes |
176
177
---
178
179
## 6. Post-Create (Basic Info — Create)
180
181
| Type | Value |
182
|---|---|
183
| API Path | `/api/v1/foreign/individual/ico/postcreate` |
184
| Request Type | `POST` |
185
| Content-Type | `application/json` |
186
187
### Request Body
188
189
| Key | Type | Example | Required |
190
|---|---|---|---|
191
| registerId | string | `"registerId"` | yes |
192
| addresses | array\<object\> | see below | no |
193
| addresses[].homeNumber | string | `"homeNumber"` | yes |
194
| addresses[].villageNumber | string | `"homeAddress"` | no |
195
| addresses[].villageName | string | `"villageName"` | no |
196
| addresses[].subStreetName | string | `"subStreetName"` | no |
197
| addresses[].streetName | string | `"homeAddress"` | no |
198
| addresses[].subDistrictName | string | `"ตลาดยอด"` | yes |
199
| addresses[].districtName | string | `"เขตมีนบุรี"` | yes |
200
| addresses[].provinceName | string | `"ตราด"` | yes |
201
| addresses[].zipCode | string | `"10400"` | yes |
202
| addresses[].countryName | string | `"หมู่เกาะอะแลนด์"` | yes |
203
| addresses[].types | number | `1` | yes |
204
| occupation | object | see below | no |
205
| occupation.education | string | `"2"` | no |
206
| occupation.sourceOfIncome | string | `"3"` | no |
207
| occupation.currentOccupation | string | `"4"` | no |
208
| occupation.officeName | string | `"tisco"` | no |
209
| occupation.typeOfBusiness | string | `"6"` | no |
210
| occupation.positionName | string | `"tisco"` | no |
211
| occupation.salaryRange | string | `"3"` | no |
212
| banks | array\<object\> | see below | no |
213
| banks[].bankName | string | `"ธนาคารไทยพาณิชย์"` | no |
214
| banks[].bankBranchName | string | `"ธนาคารไทยพาณิชย์"` | no |
215
| banks[].bankAccountNumber | string | `"12345"` | no |
216
| banks[].types | number | `1` | no |
217
| banks[].isDefault | boolean | `true` | no |
218
| investment | object | see below | no |
219
| investment.shortTermInvestment | boolean | `true` | no |
220
| investment.longTermInvestment | boolean | `false` | no |
221
| investment.taxesInvestment | boolean | `true` | no |
222
| investment.retireInvestment | boolean | `true` | no |
223
| pageID | number | `100` | yes |
224
225
### Success Response (200)
226
227
| JSON Path | Type | Example | Required |
228
|---|---|---|---|
229
| registerId | string | `"registerId"` | yes |
230
| xid | string | `"xRequestId"` | yes |
231
232
### Error Response
233
234
#### Bad Request (400)
235
| JSON Path | Type | Example | Required |
236
|---|---|---|---|
237
| message | string | `"error message"` | yes |
238
| xid | string | `"xRequestId"` | yes |
239
240
---
241
242
## 7. Update Post (Basic Info — Edit)
243
244
| Type | Value |
245
|---|---|
246
| API Path | `/api/v1/foreign/individual/ico/update/post` |
247
| Request Type | `POST` |
248
| Content-Type | `application/json` |
249
250
### Request Body
251
252
_Same as [6. Post-Create](#6-post-create-basic-info--create)._
253
254
### Success Response (200)
255
256
| JSON Path | Type | Example | Required |
257
|---|---|---|---|
258
| registerId | string | `"registerId"` | yes |
259
| xid | string | `"xRequestId"` | yes |
260
261
### Error Response
262
263
#### Bad Request (400)
264
| JSON Path | Type | Example | Required |
265
|---|---|---|---|
266
| message | string | `"error message"` | yes |
267
| xid | string | `"xRequestId"` | yes |
268
269
---
270
271
## 8. Suite Test — Save
272
273
| Type | Value |
274
|---|---|
275
| API Path | `/api/v1/foreign/suitetest/ico/result/individual/save` |
276
| Request Type | `POST` |
277
| Content-Type | `application/json` |
278
279
### Request Body
280
281
| Key | Type | Example | Required |
282
|---|---|---|---|
283
| registerId | string | `"registerId"` | yes |
284
| suiteTestResult | object | see below | no |
285
| suiteTestResult.registerId | string | `"registerId"` | yes |
286
| suiteTestResult.investorTypeRisk | string | `"เสี่ยงปานกลางค่อนสูง"` | no |
287
| suiteTestResult.level | number | `3` | no |
288
| suiteTestResult.totalScore | number | `24` | no |
289
| suiteTestResult.suiteTestResult | object | `{"answer":{"0":{"ans":[0,1,0,0]},...}}` | no |
290
| isFatca | boolean | `true` | no |
291
| fatcaInfo | array\<number\> | `[1,0,1,0,1,0,1,0]` | no |
292
| isKnowLedgeDone | boolean | `true` | no |
293
| knowLedgeTestResult | number | `15` | no |
294
| pageId | number | `600` | no |
295
296
### Success Response (200)
297
298
| JSON Path | Type | Example | Required |
299
|---|---|---|---|
300
| xid | string | `"xRequestId"` | yes |
301
302
### Error Response
303
304
#### Bad Request (400)
305
| JSON Path | Type | Example | Required |
306
|---|---|---|---|
307
| message | string | `"error message"` | yes |
308
| xid | string | `"xRequestId"` | yes |
309
310
---
311
312
## 9. Suite Test — Edit
313
314
| Type | Value |
315
|---|---|
316
| API Path | `/api/v1/foreign/suitetest/ico/result/individual/edit` |
317
| Request Type | `POST` |
318
| Content-Type | `application/json` |
319
320
### Request Body
321
322
_Same as [8. Suite Test — Save](#8-suite-test--save)._
323
324
### Success Response (200)
325
326
| JSON Path | Type | Example | Required |
327
|---|---|---|---|
328
| xid | string | `"xRequestId"` | yes |
329
330
### Error Response
331
332
#### Bad Request (400)
333
| JSON Path | Type | Example | Required |
334
|---|---|---|---|
335
| message | string | `"error message"` | yes |
336
| xid | string | `"xRequestId"` | yes |
337
338
---
339
340
## 10. Upload Onboarding Document
341
342
| Type | Value |
343
|---|---|
344
| API Path | `/api/v1/foreign/upload/onboarding` |
345
| Request Type | `POST` |
346
| Content-Type | `multipart/form-data` |
347
348
### Request Body (form fields)
349
350
| Key | Type | Example | Required |
351
|---|---|---|---|
352
| register_id | string | `"register-id-123"` | yes |
353
| type | integer (enum) | `3` | yes |
354
| doc_types | string (comma-separated) | `"country_origin_govt,proof_resident_thai"` | yes |
355
| files | file(s) | binary | yes |
356
357
**`type` enum values:**
358
359
| Value | Meaning | Allowed `doc_types` |
360
|---|---|---|
361
| `1` | Work Permit | `work_permit` |
362
| `2` | Visa | `visa_or_smart_visa` |
363
| `3` | Document by Origin Govt | `country_origin_govt`, `proof_resident_thai` |
364
| `4` | Document by Thai Govt | `proof_resident_thai` |
365
366
**Constraints:**
367
- Max 4 files per `doc_type` (types 1, 2, 4)
368
- Type 3 allows max 8 files total (up to 4 `country_origin_govt` + up to 4 `proof_resident_thai`)
369
- Max 10 MB per file, 80 MB total
370
- Number of `doc_types` values must match number of uploaded files
371
372
### Success Response (200)
373
374
| JSON Path | Type | Example | Required |
375
|---|---|---|---|
376
| status | string | `"success"` | yes |
377
| message | string | `"success"` | yes |
378
| xid | string | `"xRequestID"` | yes |
379
380
### Error Response
381
382
#### Bad Request (400) — validation error
383
| JSON Path | Type | Example | Required |
384
|---|---|---|---|
385
| status | string | `"failed"` or `"error"` | yes |
386
| message | string | `"files field is required"` | no |
387
| data | object | `{"error":"..."}` | no |
388
| xid | string | `"xRequestId"` | yes |
389
390
---
391
392
## 11. Verify Email (Send)
393
394
| Type | Value |
395
|---|---|
396
| API Path | `/api/v1/foreign/user/verify/email` |
397
| Request Type | `POST` |
398
| Content-Type | `application/json` |
399
400
### Request Body
401
402
| Key | Type | Example | Required |
403
|---|---|---|---|
404
| registerId | string | `"register-id-123"` | no |
405
| tokenId | string | `"token-id-123"` | yes |
406
407
### Success Response (200)
408
409
| JSON Path | Type | Example | Required |
410
|---|---|---|---|
411
| xid | string | `"xRequestID"` | yes |
412
413
### Error Response
414
415
#### Bad Request (400)
416
| JSON Path | Type | Example | Required |
417
|---|---|---|---|
418
| message | string | `"verify email failed"` | yes |
419
| xid | string | `"xRequestId"` | yes |
420
421
---
422
423
## 12. Confirm Email (Check)
424
425
| Type | Value |
426
|---|---|
427
| API Path | `/api/v1/foreign/user/verify/email/check` |
428
| Request Type | `GET` |
429
| Content-Type | `application/json` |
430
431
### Query Parameters
432
433
| Key | Type | Example | Required |
434
|---|---|---|---|
435
| token | string | `"token-id-123"` | yes |
436
| code | string | `"register-id-123"` | yes |
437
438
### Request Body
439
440
| Key | Type | Example | Required |
441
|---|---|---|---|
442
| - | - | - | no body |
443
444
### Success Response (200)
445
446
| JSON Path | Type | Example | Required |
447
|---|---|---|---|
448
| data | string | `"confirmed"` | yes |
449
| xid | string | `"xRequestId"` | yes |
450
451
### Error Response
452
453
#### Bad Request (400)
454
| JSON Path | Type | Example | Required |
455
|---|---|---|---|
456
| message | string | `"error message"` | yes |
457
| xid | string | `"xRequestId"` | yes |
458
459
---
460
461
## 13. Mobile Verify (Send OTP)
462
463
| Type | Value |
464
|---|---|
465
| API Path | `/api/v1/foreign/user/verify/mobile` |
466
| Request Type | `POST` |
467
| Content-Type | `application/json` |
468
469
### Request Body
470
471
| Key | Type | Example | Required |
472
|---|---|---|---|
473
| registerId | string | `"registerId"` | yes |
474
| referenceCode | string | `"REF123"` | no |
475
| otp | string | `"123456"` | no |
476
| mobile | string | `"0987654321"` | no |
477
| isUpdate | boolean | `false` | no |
478
| pageId | number | `1600` | no |
479
480
### Success Response (200)
481
482
| JSON Path | Type | Example | Required |
483
|---|---|---|---|
484
| reference | string | `"AB1234"` | yes |
485
| xid | string | `"xRequestID"` | yes |
486
487
### Error Response
488
489
#### Bad Request (400)
490
| JSON Path | Type | Example | Required |
491
|---|---|---|---|
492
| message | string | `"error message"` | yes |
493
| xid | string | `"xRequestId"` | yes |
494
495
---
496
497
## 14. Confirm Mobile (Verify OTP)
498
499
| Type | Value |
500
|---|---|
501
| API Path | `/api/v1/foreign/user/verify/mobile/check` |
502
| Request Type | `POST` |
503
| Content-Type | `application/json` |
504
505
### Request Body
506
507
| Key | Type | Example | Required |
508
|---|---|---|---|
509
| registerId | string | `"registerId"` | yes |
510
| referenceCode | string | `"AB1234"` | no |
511
| otp | string | `"123456"` | no |
512
| mobile | string | `"0987654321"` | no |
513
| isUpdate | boolean | `false` | no |
514
| pageId | number | `1600` | no |
515
516
### Success Response (200)
517
518
| JSON Path | Type | Example | Required |
519
|---|---|---|---|
520
| xid | string | `"xRequestId"` | yes |
521
522
### Error Response
523
524
#### Bad Request (400)
525
| JSON Path | Type | Example | Required |
526
|---|---|---|---|
527
| message | string | `"error message"` | yes |
528
| xid | string | `"xRequestId"` | yes |