Project

General

Profile

DOPA » History » Version 3

prin methirattanasophon, 02/20/2026 06:01 AM

1 1 prin methirattanasophon
# DOPA
2
3
Objective: API for verify user's citizen ID card status with DOPA service
4
5
Mock logic:
6
```
7
check mock: first_name == mockFirstName && last_name == mockLastName
8
check status: national_id == mockPID && date_of_birth == mockDOB && laser_code == mockLaser
9
```
10
11
API:
12
13
 - Method: POST
14
 - Endpoint: https://dopa-api.acecoin.com/api/v1/check-by-laser
15
16
Paylod:
17
18
|key|type|value|
19
|:--|:--|:--|
20
|national_id|string|ID card number|
21
|first_name|string|firstname|
22
|last_name|string|lastname|
23
|date_of_birth|string|yyyyMMdd|
24
|laser_code|string|laser code|
25
26
27
Return:
28
29
|key|type|value|
30
|:--|:--|:--|
31
|success|bool||
32
|message|string|"success", "failed", "Invalid request body"|
33
|data|Object|DOPA Object \| Internal Error Object|
34
35
---
36
37
DOPA Object
38
39
|key|type|value|mandatory|
40
|:--|:--|:--|:--|
41
|code|string||Y|
42
|desc|string|card status message|Y|
43
|isNormal|bool|card stauts, true= normal, false= abnormal|Y|
44
|recomendation|string|recommend message|Y|
45
46
---
47
48
Internal Error Object
49
50
|key|type|value|mandatory|
51
|:--|:--|:--|:--|
52
|code|string||Y|
53
|message|string|invalid message by internal check|Y|
54
55
---
56
57
Exmaple Request and Response:
58
59
Expected Mock Payload:
60
```
61
{
62
  "national_id": "6400719122941",
63
  "first_name": "ทดสอบ",
64
  "last_name": "บัตร",
65
  "date_of_birth": "25430101",
66
  "laser_code": "AB0123456789"
67
}
68
```
69
70
Expected Return when Card Status is Normal:
71
72
```
73
{
74
    "success": true,
75
    "message": "success",
76
    "data": {
77
        "code": 0,
78
        "desc": "สถานะปกติ",
79
        "isNormal": true,
80
        "recommendation": "normal"
81
    }
82
}
83
```
84
85
Expected Return when Card Status is Abnormal:
86
87
```
88
{
89
    "success": true,
90
    "message": "failed",
91
    "data": {
92
        "code": 2,
93
        "desc": "บัตรสถานะไม่ปกติ",
94
        "isNormal": false,
95
        "recommendation": "contact_registry"
96
    }
97
}
98
99
```
100
101
102
Expected Return when national_id format is invalid by internal check:
103
104
```
105
{
106
    "success": false,
107
    "message": "Invalid request body",
108
    "error": {
109
        "code": "23100",
110
        "message": "field is invalid: PID with request_id: f408c4e2-4296-4f84-b05d-d7fe51961b01"
111
    }
112
}
113
114
```
115 2 prin methirattanasophon
116
attachment: [Internal] DESC-CheckCardBank(New) 11-10-65.pdf
117 3 prin methirattanasophon
attachment: [Internal] Final Checkcardststus.pdf
118
attachment: [Internal] Final Checkcardststus.pdf
119
attachment: Funtion GetCID.txt
120
attachment: POST.txt
121
attachment: กรุณาอ่านก่อนครับ.txt
122
attachment: Dopa-test.postman_collection.json