SIM Verification
Verify subscriber information
Checks identity details and account-activity signals for a phone number against what the telco holds, and returns a verdict for each field checked.
Request
| Name | Type | Required | Description |
|---|---|---|---|
phone_number | string | Required | Verify information of this number. |
fields | array | Required | List field name and value need to check. |
{
"phone_number": string,
"fields": [
{
"name": "field_name",
"value": "value of this field"
},
...
]
}
The fields parameter
Each entry in fields contains:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | name of field data need to verify. |
value | string | Required | value of field need to check same or not. |
The name parameter
name selects which piece of subscriber information the entry checks — one of the supported fields below.
| name | value | description |
|---|---|---|
is_id | eg. 079012123456 | id number of CCCD. |
is_name | eg. Nguyễn Văn A | name of CCCD. |
is_dob | eg. 01/01/1980 | date of birth of sim owner, format dd/MM/yyyy |
is_issue_date | eg. 01/01/2025 | issue date of CCCD, format dd/MM/yyyy |
is_port_out | no required value | is subscriber port out or not |
is_port_in | no required value | is subscriber port in or not |
is_active_last_90 | no required value | is subscriber active in 90 days or not |
is_subscriber_active | no required value | is subscriber active or not |
has_usage_last_90 | no required value | is subscriber has usage last 90 days or not |
has_changed_device_last_30 | no required value | is subscriber has change device last 30 days or not |
is_use_cf_service | no required value | is subscriber use cf service or not |
has_changed_id_last_30 | no required value | is subscriber change ID Number in last 30 days or not |
is_top_20_contact_last_30 | eg. 0909112233 | is phone_number in top 20 contact last 30 days |
Sample request
curl -X POST \
https://tv-staging.trustingsocial.com/api/v1/sim_verification_verify_info \
-H 'Authorization: TV <YOUR ACCESS KEY>:<CREATED SIGNATURE>' \
-H 'X-TV-Timestamp: 2019-04-21T18:00:15+07:00' \
-H 'Content-Type: application/json' \
-d \
'
{
"phone_number": "0909123456",
"fields": [
{
"name": "is_id",
"value": "079012123456",
},
{
"name": "is_name",
"value": "Nguyễn Văn A",
}
]
}
'
Response
Each entry in data.fields echoes the name and value you sent and adds its own verdict — matched, unmatched or no_data. When processing finishes the HTTP status code is 200 and data.status is either "success" or "failure" depending on whether the request was processed successfully, so a 200 says the check ran and the per-field verdicts say what it found. data.request_id is the id to quote when checking logs, and the errors array follows the shared error envelope.
{
"data": {
"status": string, // "success" or "failure"
"phone_number": string,
"request_id": string // return request id to the client and can use request-id to check logs.
"fields": [
{
"name": string, // field name to check
"value": string, // value of field name to check
"verdict": string, // "matched|unmatched|no_data" return verdict of value same with sim owner information in telco or not
}
...
]
},
"errors": [
{
"code": string,
"message": string,
"detail": {
"field": string, // optional, which parameter is invalid.
... // any other information that can be useful for client
},
},
... // other errors
]
}
Two fields checked, one matched and one unmatched:
{
"data": {
"status": "success",
"phone_number": "0909123456",
"request_id": "48ff3909-6402-4cde-a9d4-972b0f72969c",
"fields": [
{
"name": "is_id",
"value": "079012123456",
"verdict": "matched"
},
{
"name": "is_name",
"value": "Nguyễn Văn A",
"verdict": "unmatched"
}
]
}
}
Failure codes
If the data.status is "failure", the "errors" field will tell you why it failed.
| error code | description |
|---|---|
invalid_phone_number | The provided phone number is invalid. |
verification_session_expired | The verification session has expired. |
failed_to_verify_info | Failed to verify the information. |
In case of any other errors, the data field will be empty, and the server sends an HTTP status code with an error code. Those are the same on every call — see Common objects & errors.