Singpass Developer Docs
Legacy Myinfo v3/v4
Legacy Myinfo v3/v4
  • Legacy Myinfo v3/v4
  • Data Catalog
  • Key Principles
  • Technical Specifications
    • Myinfo v4
      • Difference between v3 and v4
      • Technical Guidelines
      • Technical Concepts
        • OAuth 2.1 Concepts
        • Proof of Key Code Exchange (PKCE)
        • JSON Web Token (JWT)
        • Client Assertions
        • JSON Web Key Store (JWKS)
        • Demonstration of Proof-of-Possession (DPoP)
      • API Specifications
      • Tutorials
        • Tutorial 1: Myinfo Person sample Data
        • Tutorial 2: End-to-end Integration with Myinfo v4 APIs
      • Resources
        • Myinfo Connectors
        • Error Codes
      • FAQ
    • Myinfo v3
      • Technical Guidelines
      • API Specifications
      • Latest X.509 Public Key Certificate
      • Tutorials
        • Tutorial 1: Basic Person API
        • Tutorial 2: Using OAuth2
        • Tutorial 3: Implementing PKI Digital Signature
      • Resources
        • Myinfo Connectors
        • Error Codes
      • FAQ
Powered by GitBook
On this page
  • 1. Invoke the Sandbox Person API
  • 2. Verify the JSON response
  • 3. Using the JSON Object
  • Summary

Was this helpful?

  1. Technical Specifications
  2. Myinfo v3
  3. Tutorials

Tutorial 1: Basic Person API

In this tutorial we will try to call a basic API to get a sample Person JSON response. You can then use this JSON object in your application to pre-fill your online application form.


1. Invoke the Sandbox Person API

Open another browser window and type in the following URL:

https://sandbox.api.myinfo.gov.sg/com/v3/person-sample/S9812381D

This 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:

  • S9812381D

  • S9812382B

  • S9812385G

  • S9812387C

  • S9912363Z

  • S9912366D

  • S9912369I

  • S9912370B

  • S9912372I

  • S9912374E

  • S6005053H

  • S6005055D

  • S9812379B

  • F1612347K

  • G1612348Q

  • G1612349N

  • G1612350T

  • G1612352N

  • G1612353L


2. Verify the JSON response

You should get a response JSON file which looks like this:

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"
  },
  ...
}

3. Using the JSON Object

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.

Before trying out Tutorial 2, you will need to understand the OAuth Process.

PreviousTutorialsNextTutorial 2: Using OAuth2

Last updated 1 month ago

Was this helpful?

Please refer to our for this tutorial.

API specifications