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
- name
- UCRN
- value- UCRN of matched Citizen Details provided in Request
- ucrnType - Type of UCRN assigned.
Response Codes
Response Code | Result | Response Message |
---|---|---|
5022 | True | Unique UCRN match found |
5023 | False | Multiple UCRN matched. Please provide addtitional details |
5013 | False | Date of birth cannot be a future date |
5015 | False | Please provide UCRNType P:Permanent |
1001 | False | No record found |
10003 | False | A technical error has been faced. Kindly try again later. |