Project

General

Profile

Onboarding Foreign API Spc » History » Version 5

Ryan Supawarapong, 03/05/2026 02:14 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
## 5. Submit CRS
142
143
| Type | Value |
144
|---|---|
145
| API Path | `/api/v1/foreign/individual/ico/crs` |
146
| Request Type | `POST` |
147
| Content-Type | `application/json` |
148
149
### Request Body
150
151
| Key | Type | Example | Required |
152
|---|---|---|---|
153
| registerId | string | `"registerId"` | yes |
154
| crs | array\<object\> | `[{"member_id":"...","is_tax_not_usa":true,...}]` | yes |
155
| crs[].member_id | string | `"member-001"` | no |
156
| crs[].is_tax_not_usa | boolean | `true` | no |
157
| crs[].country_tax_residence | string | `"US"` | no |
158
| crs[].is_tin | boolean | `true` | no |
159
| crs[].tin | string | `"123456789"` | no |
160
161
### Success Response (200)
162
163
| JSON Path | Type | Example | Required |
164
|---|---|---|---|
165
| xid | string | `"xRequestId"` | yes |
166
167
### Error Response
168
169
#### Bad Request (400)
170
| JSON Path | Type | Example | Required |
171
|---|---|---|---|
172
| message | string | `"error message"` | yes |
173
| xid | string | `"xRequestId"` | yes |
174
175
---
176
177
## 6. Post-Create (Basic Info — Create)
178
179
| Type | Value |
180
|---|---|
181
| API Path | `/api/v1/foreign/individual/ico/postcreate` |
182
| Request Type | `POST` |
183
| Content-Type | `application/json` |
184
185
### Request Body
186
187
| Key | Type | Example | Required |
188
|---|---|---|---|
189
| registerId | string | `"registerId"` | yes |
190
| addresses | array\<object\> | see below | no |
191
| addresses[].homeNumber | string | `"homeNumber"` | yes |
192
| addresses[].villageNumber | string | `"homeAddress"` | no |
193
| addresses[].villageName | string | `"villageName"` | no |
194
| addresses[].subStreetName | string | `"subStreetName"` | no |
195
| addresses[].streetName | string | `"homeAddress"` | no |
196
| addresses[].subDistrictName | string | `"ตลาดยอด"` | yes |
197
| addresses[].districtName | string | `"เขตมีนบุรี"` | yes |
198
| addresses[].provinceName | string | `"ตราด"` | yes |
199
| addresses[].zipCode | string | `"10400"` | yes |
200
| addresses[].countryName | string | `"หมู่เกาะอะแลนด์"` | yes |
201
| addresses[].types | number | `1` | yes |
202
| occupation | object | see below | no |
203
| occupation.education | string | `"2"` | no |
204
| occupation.sourceOfIncome | string | `"3"` | no |
205
| occupation.currentOccupation | string | `"4"` | no |
206
| occupation.officeName | string | `"tisco"` | no |
207
| occupation.typeOfBusiness | string | `"6"` | no |
208
| occupation.positionName | string | `"tisco"` | no |
209
| occupation.salaryRange | string | `"3"` | no |
210
| banks | array\<object\> | see below | no |
211
| banks[].bankName | string | `"ธนาคารไทยพาณิชย์"` | no |
212
| banks[].bankBranchName | string | `"ธนาคารไทยพาณิชย์"` | no |
213
| banks[].bankAccountNumber | string | `"12345"` | no |
214
| banks[].types | number | `1` | no |
215
| banks[].isDefault | boolean | `true` | no |
216
| investment | object | see below | no |
217
| investment.shortTermInvestment | boolean | `true` | no |
218
| investment.longTermInvestment | boolean | `false` | no |
219
| investment.taxesInvestment | boolean | `true` | no |
220
| investment.retireInvestment | boolean | `true` | no |
221
| pageID | number | `100` | yes |
222
223
### Success Response (200)
224
225
| JSON Path | Type | Example | Required |
226
|---|---|---|---|
227
| registerId | string | `"registerId"` | yes |
228
| xid | string | `"xRequestId"` | yes |
229
230
### Error Response
231
232
#### Bad Request (400)
233
| JSON Path | Type | Example | Required |
234
|---|---|---|---|
235
| message | string | `"error message"` | yes |
236
| xid | string | `"xRequestId"` | yes |
237
238
---
239
240
## 7. Update Post (Basic Info — Edit)
241
242
| Type | Value |
243
|---|---|
244
| API Path | `/api/v1/foreign/individual/ico/update/post` |
245
| Request Type | `POST` |
246
| Content-Type | `application/json` |
247
248
### Request Body
249
250
_Same as [6. Post-Create](#6-post-create-basic-info--create)._
251
252
### Success Response (200)
253
254
| JSON Path | Type | Example | Required |
255
|---|---|---|---|
256
| registerId | string | `"registerId"` | yes |
257
| xid | string | `"xRequestId"` | yes |
258
259
### Error Response
260
261
#### Bad Request (400)
262
| JSON Path | Type | Example | Required |
263
|---|---|---|---|
264
| message | string | `"error message"` | yes |
265
| xid | string | `"xRequestId"` | yes |
266
267
---
268
269
## 8. Suite Test — Save
270
271
| Type | Value |
272
|---|---|
273
| API Path | `/api/v1/foreign/suitetest/ico/result/individual/save` |
274
| Request Type | `POST` |
275
| Content-Type | `application/json` |
276
277
### Request Body
278
279
| Key | Type | Example | Required |
280
|---|---|---|---|
281
| registerId | string | `"registerId"` | yes |
282
| suiteTestResult | object | see below | no |
283
| suiteTestResult.registerId | string | `"registerId"` | yes |
284
| suiteTestResult.investorTypeRisk | string | `"เสี่ยงปานกลางค่อนสูง"` | no |
285
| suiteTestResult.level | number | `3` | no |
286
| suiteTestResult.totalScore | number | `24` | no |
287
| suiteTestResult.suiteTestResult | object | `{"answer":{"0":{"ans":[0,1,0,0]},...}}` | no |
288
| isFatca | boolean | `true` | no |
289
| fatcaInfo | array\<number\> | `[1,0,1,0,1,0,1,0]` | no |
290
| isKnowLedgeDone | boolean | `true` | no |
291
| knowLedgeTestResult | number | `15` | no |
292
| pageId | number | `600` | no |
293
294
### Success Response (200)
295
296
| JSON Path | Type | Example | Required |
297
|---|---|---|---|
298
| xid | string | `"xRequestId"` | yes |
299
300
### Error Response
301
302
#### Bad Request (400)
303
| JSON Path | Type | Example | Required |
304
|---|---|---|---|
305
| message | string | `"error message"` | yes |
306
| xid | string | `"xRequestId"` | yes |
307
308
---
309
310
## 9. Suite Test — Edit
311
312
| Type | Value |
313
|---|---|
314
| API Path | `/api/v1/foreign/suitetest/ico/result/individual/edit` |
315
| Request Type | `POST` |
316
| Content-Type | `application/json` |
317
318
### Request Body
319
320
_Same as [8. Suite Test — Save](#8-suite-test--save)._
321
322
### Success Response (200)
323
324
| JSON Path | Type | Example | Required |
325
|---|---|---|---|
326
| xid | string | `"xRequestId"` | yes |
327
328
### Error Response
329
330
#### Bad Request (400)
331
| JSON Path | Type | Example | Required |
332
|---|---|---|---|
333
| message | string | `"error message"` | yes |
334
| xid | string | `"xRequestId"` | yes |
335
336
---
337
338
## 10. Upload Onboarding Document
339
340
| Type | Value |
341
|---|---|
342
| API Path | `/api/v1/foreign/upload/onboarding` |
343
| Request Type | `POST` |
344
| Content-Type | `multipart/form-data` |
345
346
### Request Body (form fields)
347
348
| Key | Type | Example | Required |
349
|---|---|---|---|
350
| register_id | string | `"register-id-123"` | yes |
351
| type | integer (enum) | `3` | yes |
352
| doc_types | string (comma-separated) | `"country_origin_govt,proof_resident_thai"` | yes |
353
| files | file(s) | binary | yes |
354
355
**`type` enum values:**
356
357
| Value | Meaning | Allowed `doc_types` |
358
|---|---|---|
359
| `1` | Work Permit | `work_permit` |
360
| `2` | Visa | `visa_or_smart_visa` |
361
| `3` | Document by Origin Govt | `country_origin_govt`, `proof_resident_thai` |
362
| `4` | Document by Thai Govt | `proof_resident_thai` |
363
364
**Constraints:**
365
- Max 4 files per `doc_type` (types 1, 2, 4)
366
- Type 3 allows max 8 files total (up to 4 `country_origin_govt` + up to 4 `proof_resident_thai`)
367
- Max 10 MB per file, 80 MB total
368
- Number of `doc_types` values must match number of uploaded files
369
370
### Success Response (200)
371
372
| JSON Path | Type | Example | Required |
373
|---|---|---|---|
374
| status | string | `"success"` | yes |
375
| message | string | `"success"` | yes |
376
| xid | string | `"xRequestID"` | yes |
377
378
### Error Response
379
380
#### Bad Request (400) — validation error
381
| JSON Path | Type | Example | Required |
382
|---|---|---|---|
383
| status | string | `"failed"` or `"error"` | yes |
384
| message | string | `"files field is required"` | no |
385
| data | object | `{"error":"..."}` | no |
386
| xid | string | `"xRequestId"` | yes |
387
388
---
389
390
## 11. Verify Email (Send)
391
392
| Type | Value |
393
|---|---|
394
| API Path | `/api/v1/foreign/user/verify/email` |
395
| Request Type | `POST` |
396
| Content-Type | `application/json` |
397
398
### Request Body
399
400
| Key | Type | Example | Required |
401
|---|---|---|---|
402
| registerId | string | `"register-id-123"` | no |
403
| tokenId | string | `"token-id-123"` | yes |
404
405
### Success Response (200)
406
407
| JSON Path | Type | Example | Required |
408
|---|---|---|---|
409
| xid | string | `"xRequestID"` | yes |
410
411
### Error Response
412
413
#### Bad Request (400)
414
| JSON Path | Type | Example | Required |
415
|---|---|---|---|
416
| message | string | `"verify email failed"` | yes |
417
| xid | string | `"xRequestId"` | yes |
418
419
---
420
421
## 12. Confirm Email (Check)
422
423
| Type | Value |
424
|---|---|
425
| API Path | `/api/v1/foreign/user/verify/email/check` |
426
| Request Type | `GET` |
427
| Content-Type | `application/json` |
428
429
### Query Parameters
430
431
| Key | Type | Example | Required |
432
|---|---|---|---|
433
| token | string | `"token-id-123"` | yes |
434
| code | string | `"register-id-123"` | yes |
435
436
### Request Body
437
438
| Key | Type | Example | Required |
439
|---|---|---|---|
440
| - | - | - | no body |
441
442
### Success Response (200)
443
444
| JSON Path | Type | Example | Required |
445
|---|---|---|---|
446
| data | string | `"confirmed"` | yes |
447
| xid | string | `"xRequestId"` | yes |
448
449
### Error Response
450
451
#### Bad Request (400)
452
| JSON Path | Type | Example | Required |
453
|---|---|---|---|
454
| message | string | `"error message"` | yes |
455
| xid | string | `"xRequestId"` | yes |
456
457
---
458
459
## 13. Mobile Verify (Send OTP)
460
461
| Type | Value |
462
|---|---|
463
| API Path | `/api/v1/foreign/user/verify/mobile` |
464
| Request Type | `POST` |
465
| Content-Type | `application/json` |
466
467
### Request Body
468
469
| Key | Type | Example | Required |
470
|---|---|---|---|
471
| registerId | string | `"registerId"` | yes |
472
| referenceCode | string | `"REF123"` | no |
473
| otp | string | `"123456"` | no |
474
| mobile | string | `"0987654321"` | no |
475
| isUpdate | boolean | `false` | no |
476
| pageId | number | `1600` | no |
477
478
### Success Response (200)
479
480
| JSON Path | Type | Example | Required |
481
|---|---|---|---|
482
| reference | string | `"AB1234"` | yes |
483
| xid | string | `"xRequestID"` | yes |
484
485
### Error Response
486
487
#### Bad Request (400)
488
| JSON Path | Type | Example | Required |
489
|---|---|---|---|
490
| message | string | `"error message"` | yes |
491
| xid | string | `"xRequestId"` | yes |
492
493
---
494
495
## 14. Confirm Mobile (Verify OTP)
496
497
| Type | Value |
498
|---|---|
499
| API Path | `/api/v1/foreign/user/verify/mobile/check` |
500
| Request Type | `POST` |
501
| Content-Type | `application/json` |
502
503
### Request Body
504
505
| Key | Type | Example | Required |
506
|---|---|---|---|
507
| registerId | string | `"registerId"` | yes |
508
| referenceCode | string | `"AB1234"` | no |
509
| otp | string | `"123456"` | no |
510
| mobile | string | `"0987654321"` | no |
511
| isUpdate | boolean | `false` | no |
512
| pageId | number | `1600` | no |
513
514
### Success Response (200)
515
516
| JSON Path | Type | Example | Required |
517
|---|---|---|---|
518
| xid | string | `"xRequestId"` | yes |
519
520
### Error Response
521
522
#### Bad Request (400)
523
| JSON Path | Type | Example | Required |
524
|---|---|---|---|
525
| message | string | `"error message"` | yes |
526
| xid | string | `"xRequestId"` | yes |