Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

Custodianship is a feature we facilitate for users who need to have a guardian oversee their online actions. Users under custodianship are not legally allowed to use our services.

Freja eID allows Relying parties (RP) to get custodianship information on users.

A typical use of this option would be to check whether or not a certain user is allowed to use their services before providing the service.

There is a possibility that the user has been given a custodian, but the custodianship has not been registered with Freja eID yet.

In order to be able to use this API, you must first get in touch with partnersupport@frejaeid.com

Get user custodianship status method

This method is used by a relying party to check the custodianship status for a specific user. The existing user information for that user in the Freja eID system must be passed as a parameter of this method.

The method is called using HTTP POST through the URLs below:

System

Method endpoints

Test

https://services.prod.frejaeid.com/custodianship/user/1.0/getCustodianshipStatus

Production

https://services.prod.frejaeid.com/custodianship/user/1.0/getCustodianshipStatus

The parameter of the method is a Base64 UTF8-encoded JSON payload, according to the following:

Parameter name

Value

setCustomIdentifierRequest

{
   "userCountryIdAndCrn":"SEYYYYMMDDXXXX"
}

userCountryIdAndCrn: string, mandatory. String value is the user's registered Country ID and SSN (end user's social security number).
Country ID: string, mandatory. Contains the ISO-3166 two-alphanumeric country code of the country where the SSN is issued. In the current version of Freja it must be "SE".
SSN: string, mandatory. Expected SSN of the end user as per pre-registration. If country is "SE", the value must be the 12-digit format of the Swedish "personnummer" without spaces or hyphens.

Example request:

If you wish to check the custodianship status for a user with an SSN YYYYMMDDXXXX, follow these steps:

  1. Create the JSON structure {"userCountryIdAndCrn":"SE199004101234"}

  2. Encode the JSON structure to Base64.

  3. Create the HTTP POST request with a POST parameter name getCustodianshipStatusRequest and the Base64 encoded JSON structure from the step 2 as its value.

The HTTP body should be the following:

getCustodianshipStatusRequest=eyJ1c2VyQ291bnRyeUlkQW5kQ3JuIjoiU0UyMDIzMDQxMDM5MzYifQ==

Possible errors returned by the method are the following:

Return code

Explanation

1002

Invalid or missing userInfo.

1008 

Unknown relying party.

1010

JSON request cannot be parsed.

1013

You are not allowed to request user custodianship information.

1014

Invalid user CRN, CRN missing or user country code is not SE. (The CRN is the equivalent of an SSN)

If HTTP 200 is returned from the method, the following return value will be present in the body of the response:

JSON Response Value in body

{   "custodianshipStatus":"Custodianship status value"}

custodianshipStatus: String, mandatory. User's current custodianship status.

Can be value of: 

  • "UNKNOWN" 

  • "USER_UNDER_CUSTODIANSHIP"

"UNKNOWN" value is returned if it is not known if there is a custodian registered for the user. As said before, there is still a possibility the user has been given a legal custodian that has not yet been registered with Freja at this time so we cannot guarantee the user's custodianship status.

"USER_UNDER_CUSTODIANSHIP" is returned if we have a registered custodian for the user registered in Freja.

  • No labels