Addresses can be mapped to a Citizen Account as a Primary or Secondary Address. If the Address provided is already mapped with the Citizen account it will be be made primary or secondary depending on the operationcode. An address can also be deleted from a Citizen Account only one address can be mapped as Primary for a Citizen Account. When a Secondary Address is made Primary it will automatically convert the existing Primary Address to a Secondary. A Primary Address cannot be deleted or made secondary directly.
Guidance
- Either of Address or UPRN can be passed for this web service. If both are passed the UPRN takes the precedence
- UPRNType will be ignored even if the permissible values are provided and will only work for the genuine UPRN
- At least one address needs to be associated with a Citizen Account. There can only be one primary address associated with a citizen account while multiple secondary addresses can be associated
- When an address fields needs to be updated, it is not possible to change the address lines for a UPRN. So existing unwanted address is deleted and a new address is added
- When a Primary Address needs to be updated, three actions will have to be taken as below:
- Add a new Address as Primary Address
- Update an existing Address as Secondary Address
- Delete the existing Secondary Address.
- When a Secondary Address needs to be updated, two actions will have to be taken as below:
- Add a new Address as Secondary Address
- Delete the existing Secondary Address
- When a Primary Address needs to be updated, three actions will have to be taken as below:
Request
requires a UPRN or an Address containing adressline1 (optionally addressline2 and addressline3) town, postcode and Local Authority Code, the UCRN of the citizen and an operation code
Valid Operation Codes
- P - To add provided address as Primary Address or make the address Primary Address if it exists as Secondary Address.
- S - To add provided address as a Secondary address
- D - To delete a Secondary Address if it exists in a Citizen Account
Example
Make the supplied address the Primary address
{
"method":"ChangeAddress",
"params":{
"callertoken":"YourCallerToken",
"ucrn": "2100000000000000193",
"ucrntype": "P",
"addressline1": "WEST LOTHIAN CIVIC CENTRE",
"addressline2": "HOWDEN SOUTH ROAD",
"addressline3": "HOWDEN",
"town": "LIVINGSTON",
"postcode": "EH54 6FF",
"lacode": "9079",
"operationcode": "P"
},
"id":"12",
"jsonrpc": "2.0"
}
Add the UPRN as a Secondary address
{
"method":"ChangeAddress",
"params":{
"callertoken":"YourCallerToken",
"ucrn": "2100000000000000193",
"ucrntype": "P",
"uprn": "135024740",
"uprntype": "P",
"operationcode": "S"
},
"id":"12",
"jsonrpc": "2.0"
}
Response
- uprn
- value
- uprnType
Response Codes
Response Code | Result | Response Message |
---|---|---|
0401 | False | Invalid request operation type. Please provide one of the following: P: Add an address as Primary S: Add an address as Secondary D: Delete an address |
0402 | False | In address delete and make primary UPRN and UPRN type is mandatory |
0403 | False | Please enter a valid request operation type |
0404 | False | UCRN is mandatory |
0402 | False | In address delete and make primary UPRN and UPRN type is mandatory |
0427 | False | Primary Address cannot be deleted |
0450 | True | Address added successfully |
0451 | True | Address deleted successfully |
0452 | True | Address has been added successfully and marked as secondary address |
0453 | True | Address already exist with the given details and marked as primary |
0454 | True | An address already exist with the given details |
0455 | False | UPRN and UPRN type is mandatory for the given operation code |
0457 | False | Address already exist as secondary address |
0458 | False | Address already exist as primary address |
10021 | False | Incorrect UPRN |
10021 | False | No organization exist with the given LA code |
0461 | False | No Address found with the given UPRN |
0426 | False | No record found with the given UCRN |
10006 | False | Incorrect UCRN |
10003 | False | A technical error has been faced. Kindly try again later. |