Create Session
Create a new enrolment session
The API currently supports Api Key. All endpoints require an Authentication header in the following form:
x-api-key: apiKey
Send a HTTP POST request to:
/api/v1/id-verifications/enrolment/initialize
The following parameters are used for requests and responses:
Parameter | Direction | Description |
---|---|---|
sessionId | request | unique, short-lived GUID to be generated by the client to track specific sessions |
returnUrl | request | custom page to be displayed by the client solution after completion of the onboarding process, usually the progress bar should be displayed waiting for one of the available verification results: HIGH , MEDIUM , LOW (meaning and expected workflow described in Trust Factors section) |
externalId | request | optional text field (up to 512 characters) that can be used for filtering purposes later on. For example, it could be used to pass an external solution session ID or an external user ID. |
WebEnrolmentTheme | request | optional, enables the selection of a specific color and logo theme for web enrollment purposes |
sessionId | response | the same unique code sent in request, returned for the traceability |
webEnrolmentUrl | response | redirection URL, i.e. next step of the onboarding, contains full URL including a reference token (not an access token!) |
Request:
{
"sessionId": "ad90c821-e5ea-4385-be5b-4fc9f9ea24ee",
"returnUrl": "{A url where end user will be redirected after enrolment}",
"externalId": "53421526A"
}
Response:
{
"sessionId": "ad90c821-e5ea-4385-be5b-4fc9f9ea24ee",
"webEnrolmentUrl": "https://<domain name>/web-enrolment/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiJhZDkwYzgyMS1lNWVhLTQzODUtYmU1Yi00ZmM5ZjllYTI0ZWU"
}
Example:
curl -X POST "/api/v1/enrolment/initialize" -H "accept: text/plain" -H "Authorization: Basic aW5ub3ZhdHJpY3M6aW5ub3ZhdHJpY3M=" -H "Content-Type: application/json" -d "{\"sessionId\":\"ad90c821-e5ea-4385-be5b-4fc9f9ea24ee\",\"returnUrl\":\"your url\"}"