Tutorial 1: Myinfo Person sample Data
This tutorial will call a basic API to get sample Person data in JSON response. You can then use this JSON object to pre-fill your online form in your application.
1. Request
Open another browser window and type in the following URL:
https://sandbox.api.myinfo.gov.sg/com/v4/person-sample/S9812381DThis will call our sandbox API using HTTPS GET.
S9812381D is the UINFIN (NRIC or FIN) parameter which refers to the ID of the person you wish to get the data of. For this sample API, the following UINFIN are supported:
S9812381DS9812382BS9812385GS9812387CS9912363ZS9912366DS9912369IS9912370BS9912372IS9912374ES6005053HS6005055DS9812379BF1612347KG1612348QG1612349NG1612350TG1612352NG1612353L
Please refer to our API specifications for this tutorial.
2. Response
You should see a JSON object which looks like this after you access the Person Sample API.
Sample JSON for Person data
{
"uinfin": {
"lastupdated": "2019-03-26",
"source": "1",
"classification": "C",
"value": "S9812381D"
},
"name": {
"value": "TAN XIAO HUI",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"hanyupinyinname": {
"value": "CHEN XIAO HUI",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"aliasname": {
"value": "TRICIA TAN XIAO HUI",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"hanyupinyinaliasname": {
"value": "TRICIA CHEN XIAO HUI",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"marriedname": {
"value": "",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"sex": {
"code": "F",
"desc": "Female",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"race": {
"code": "CN",
"desc": "CHINESE",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"secondaryrace": {
"code": "EU",
"desc": "EURASIAN",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"dialect": {
"code": "SG",
"desc": "SWISS GERMAN",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"nationality": {
"code": "SG",
"desc": "SINGAPORE CITIZEN",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"dob": {
"value": "1958-05-17",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"birthcountry": {
"code": "SG",
"desc": "SINGAPORE",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"residentialstatus": {
"code": "C",
"desc": "Citizen",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"passportnumber": {
"value": "E35463874W",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"passportexpirydate": {
"value": "2020-01-01",
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
"regadd": {
"type": "SG",
"block": {
"value": "548"
},
"building": {
"value": ""
},
"floor": {
"value": "09"
},
"unit": {
"value": "128"
},
"street": {
"value": "BEDOK NORTH AVENUE 1"
},
"postal": {
"value": "460548"
},
"country": {
"code": "SG",
"desc": "SINGAPORE"
},
"classification": "C",
"source": "1",
"lastupdated": "2019-03-26"
},
...
}Try using the JSON object in your own application to prefill your forms!
Summary
You've successfully called a basic Person API and gotten a sample JSON response from Myinfo.
Last updated
Was this helpful?