Toggle menu

Query UCRN

The following details are taken from the documentation available on https://spportal.mycas.org.uk

UCRN is a unique number associated with every Citizen of Scotland. This Web Service helps in identify the UCRN for a Citizen, if UCRN is provided the basic details of Citizen can be retrieved. Only exact matches for the provided fields in request will be searched and corresponding details will be returned.

Guidance

  • If multiple UCRN found code is returned in the response, MothersBirthSurname and PlaceOfBirth can be used additionally to find the unique matching records
  • Either of Citizen details or UCRN can be passed for this web service. If both are passed the UCRN takes the precedence
  • UCRNType will be ignored even if the permissible values are provided and will only work for the genuine UCRN

Request

requires a UCRN and UCRN type or citizen details consisting of a Name (firstname, lastname and optional middlename), gender, dateofbirth and optionally placeofbirth and mothersbirthsurname.

Example

Using Citizen Details

{
  "method":"queryUCRN",
  "params":{
    "callertoken":"YourCallerToken",
    "firstname":"CUATC",
    "lastname":"Mcleran",
    "gender":"F",
    "dateofbirth":"1975-12-19T05:36:46+00:00"
    },
  "id":"12",
  "jsonrpc": "2.0"
}

Using UCRN

{
  "method":"queryUCRN",
  "params":{
    "callertoken":"YourCallerToken",
    "ucrn":"2100000000000000193",
    "ucrntype":"P"
    },
  "id":"12",
  "jsonrpc": "2.0"
}

Response

  • basicCitizenDetails
    • name
      • firstname
      • middlename
      • lastname
    • gender
    • dateOfBirth
    • dateOfDeath
    • placeOfBirth
    • mothersBirthSurname
  • UCRN
    • value- UCRN of matched Citizen Details provided in Request
    • ucrnType - Type of UCRN assigned.

Response Codes

Response  CodeResultResponse Message
5022TrueUnique UCRN match found
5023FalseMultiple UCRN matched. Please provide addtitional details
5013FalseDate of birth cannot be a future date
5015FalsePlease provide UCRNType P:Permanent
1001FalseNo record found
10003FalseA technical error has been faced. Kindly try again later.
Last modified on June 27, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon