Get NFC
Retrieves the stored NFC data for a document — both the raw data groups as read from the chip and the parsed identity fields. The transaction token reads only the document_id submitted in that same transaction.
Endpoint
http
POST /v1/get_nfc
Content-Type: application/jsonjson
{
"document_id": "001xxxxxxxxx"
}Parameters:
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
document_id | string | Yes | — | NID number of the person whose NFC data is being retrieved. |
Returns: GetNfcResponse
Authenticate this call with the JWT token from Create Transaction, as Authorization: Bearer {token}.
Sample Request
bash
curl --location '<BASE_URL>/v1/get_nfc' \
--header 'Authorization: Bearer <JWT_TOKEN>' \
--header 'X-TV-Timestamp: <TIMESTAMP>' \
--header 'Content-Type: application/json' \
--data '{
"document_id": "001xxxxxxxxx"
}'Response
json
{
"success": true,
"code": 0,
"message": "success",
"request_id": "request_id",
"data": {
"ref_id": "ref_00000001",
"nfc_raw": {
"sod": "d4IG/TCCBvkGCSqGSIb3DQEHAqCC…",
"dg1": "YV1fH1pJRFZOTTAwMXh4eHh4eHh4eA…",
"dg2": "dYIx1n9hgjHRAgEBf2CCMcmhDoEB…",
"dg13": "bYIBmzCCAZcCAQEGBijTFgEACDGC…",
"dg14": "boIBfjGCAXowDQYIBAB/AAcCAgIC…",
"dg15": "b4IBJjCCASIwDQYJKoZIhvcNAQEB…",
"com": "",
"issue_date": "01/01/2021",
"document_id": "001xxxxxxxxx"
},
"nfc_data": {
"citizen_identify": "001xxxxxxxxx",
"old_citizen_identify": "xxxxxxxxx",
"full_name": "Nguyễn Văn A",
"date_of_birth": "12/12/1990",
"date_of_expiry": "12/12/2030",
"gender": "Nam",
"nationality": "Việt Nam",
"ethnic": "Kinh",
"religion": "Không",
"place_of_origin": "Xã An Khánh, Huyện Châu Thành, Tỉnh Bến Tre",
"place_of_residence": "Tổ 1, Phường Bến Nghé, Quận 1, TP. Hồ Chí Minh",
"personal_identification": "Sẹo chấm cách 1cm trên đuôi mày trái",
"date_provide": "01/01/2021",
"father_name": "Nguyễn Văn B",
"mother_name": "Trần Thị C",
"partner_name": "",
"face_image": "/9j/4AAQSkZJRgABAQA…",
"is_verified": true,
"verified_at": 1672531200,
"created_at": 1672531200
}
}
}| Field | Type | Description |
|---|---|---|
data.ref_id | string | The transaction reference ID the data was recorded under. |
data.nfc_raw | NFCRaw | The raw data groups as read from the chip. |
data.nfc_data | NFCData | The parsed cardholder identity fields. |
NFCRaw
| Field | Type | Description |
|---|---|---|
sod | string | Document Security Object. Base64. |
dg1 | string | Data group 1 — the MRZ. Base64. |
dg2 | string | Data group 2 — the facial image. Base64. |
dg13 | string | Data group 13 — additional personal details. Base64. |
dg14 | string | Data group 14 — security options for chip authentication. Base64. |
dg15 | string | Data group 15 — the active authentication public key. Base64. |
com | string | The Common data element, listing the data groups present on the chip. |
issue_date | string | Card issue date, DD/MM/YYYY. |
document_id | string | The Document ID the record belongs to. |
NFCData
Same shape as the Read NFC response, with two additional timestamps and without verification_key:
| Field | Type | Description |
|---|---|---|
is_verified | bool | Whether the record was verified against C06. |
verified_at | int | Unix timestamp of verification. |
created_at | int | Unix timestamp of when the record was created. |
WARNING
This endpoint returns only the record for the document_id submitted in the same transaction — the token cannot read any other document. The response still holds full identity data and a chip portrait: never log or cache it on the device.
Errors
| Code | Description |
|---|---|
2001002 | internal_bad_gateway |
2001027 | Token invalid. |
2001029 | NFC info not found. |
2001030 | Invalid document id. |
4001000 | Input parameter violates a constraint. |
4291000 | The number of requests exceeded throughput limit. |
5001000 | internal_server_error |
| Code | Description |
|---|---|
401 | You are not authorized to perform the action. |
500 | Some unexpected error occurs while processing the request. |
Next Steps
- NID Field Definitions — normalization and storage rules for the fields returned here
- Overview — the full transaction lifecycle