Retrieve User Data
Retrieve User Information
GET /userinfo
Return bank-verified identity data for the user identified by the Authorization OAuth token.
Authorization
You need to include a bearer token retrieved from the Retrieve Access Token.
Example request
curl --request GET
--url https://controller.myoneid.co.uk/userinfo
--header 'Authorization: Bearer <access_token>'
GET /userinfo HTTP/1.1
Host: controller.myoneid.co.uk
Authorization: Bearer <access_token>
curl --request GET
--url https://controller.myoneid.co.uk/userinfo
--header 'Authorization: Bearer <access_token>'
Example response
HTTP/1.1 200 OK
Content-Type: application/json
{
"sub":"6f35afb8-42ee-5b82-88be-29ee7dc0f762",
"name":"Janet Davidson",
"given_name":"Janet",
"family_name":"Davidson",
"email":"janet.davidson@example.com",
"birthdate":"1985-06-01",
"phone_number":"0480863009",
"address": {
"street_address":"3614 Poe Road",
"locality":"Heworth",
"region":"York",
"postal_code":"YO31 1EB",
"country":"UK"
},
"fraud": {
"searchPerformed": true,
"activityHistoryScore": 0,
"identityFraudScore": 0,
"nationalSIRAFraud": true,
"nationalSIRAVictim": false,
"disclosureOfDeathRegistrationInformationMatch": false,
"amberhillMatch": false,
"noMatch": false
},
"unverified_claims": {
"claims": {
"birthdate": "1990-02-01",
"name": "Mary Smith",
"given_name": "Mary",
"family_name": "Smith",
"address": {
"street_address":"80 Green Lane",
"locality":"Darlington",
"region":"North East",
"postal_code":"DL17 5OQ",
"country":"UK"
}
}
}
}
Status Codes
- 200 OK - Successfully accessed user identity data
Retrieve User Age verification
GET /ageverification
Authorization
You need to include a bearer token retrieved from the Retrieve Access Token.
Example request
curl --request GET
--url https://controller.myoneid.co.uk/ageverification
--header 'Authorization: Bearer <access_token>'
GET /ageverification HTTP/1.1
Host: controller.myoneid.co.uk
Authorization: Bearer <access_token>
Example response
HTTP/1.1 200 OK
Content-Type: application/json
{
"age_over_18": true
}
Status Codes
- 200 OK - Successfully accessed user identity data
Retrieve User Accounts
GET /accounts
The accounts endpoint returns all the enabled personal accounts for a user identified by the Authorization token. This endpoint requires the accounts scope to have been requested during the authorization process.
Each account can be identified in a number of ways. We refer to these as identifiers (or identification schemes). Below, is a list of all the schemes that we support and the fields that will be populated for each:
UK.OBIE.SortCodeAccountNumber
- sort_code - Sort Code (6 digits) e.g. 123456
- account_number - Account Number (8-10 digits) 12345678
UK.OBIE.IBAN
- iban - IBAN/ISO 13616 (up to 30 alphanumeric characters) e.g. GB98MIDL07009312345678
UK.OBIE.BICFI
- bic - BIC/Swift Code (11 alphanumeric characters) e.g. AAAABBCC123
If the accounts.balances scope is also given, then the balances of each account will also be returned. Balance amounts are returned as a major unit (e.g. Pounds instead of Pence) as a string. The currency is given as an ISO 4217 code.
Authorization
You need to include a bearer token retrieved from the Retrieve Access Token.
Example request
curl --request GET
--url https://controller.myoneid.co.uk/accounts
--header 'Authorization: Bearer <access_token>'
GET /accounts HTTP/1.1
Host: controller.myoneid.co.uk
Authorization: Bearer <access_token>
Success response
HTTP/1.1 200 OK
Content-Type: application/json
[{
"currency": "GBP",
"account_type": "Personal",
"account_sub_type": "CurrentAccount",
"nickname": "Personal",
"iban": "GB98MIDL07009312345678",
"bic": "AAAABBCC123",
"account_number": "01234567",
"sort_code": "012345"
}]
Success response with balances
HTTP/1.1 200 OK
Content-Type: application/json
[{
"currency": "GBP",
"account_type": "Personal",
"account_sub_type": "CurrentAccount",
"nickname": "Personal",
"iban": "GB98MIDL07009312345678",
"bic": "AAAABBCC123",
"account_number": "01234567",
"sort_code": "012345",
"balance": {
"amount": "123.45",
"currency": "GBP"
}
}]
Error response
HTTP/1.1 400 OK
Content-Type: application/json
Status Codes
- 200 OK - Returns the accounts of the user
- 400 Bad request
Retrieve Report
GET /userinfo/report
Get a PDF report generated for the user identified by the Authorization OAuth token.
Authorization
You need to include a bearer token retrieved from the Retrieve Access Token.
Example request
curl --request GET
--url https://controller.myoneid.co.uk/userinfo/report
--header 'Authorization: Bearer <access_token>'
GET /userinfo/report HTTP/1.1
Host: controller.myoneid.co.uk
Authorization: Bearer <access_token>