API v3 Migration Guide
The following guide will help you migrate from API v2 to API v3.
Summary of changes
- Endpoints are split up by eID provider.
- All endpoints now require basic auth.
- BankID QR is always enabled.
- Triggering an BankID authentication using a SSN is only allowed when the user is on the phone with the partner. This functionality must be enabled before use.
- Callback URLs must be whitelisted, either by domain or full path.
- Some payload properties have been added, renamed or removed.
List of changes
Start BankID authentication
Before (V2)
POST /v2/{{accountId}}/auth
Request body
{
"provider": "BankID",
"secretKey": "",
"pno": "",
"ipAddress": "",
"callbackUrl": "",
"allowFingerprint": true,
"enableQR": true,
"avsikt": "",
"intent": "",
"orgNumber": "",
"refID": ""
}
Response body
{
"orderRef": "",
"autoStartToken": "",
"qrStartToken": "",
"qrStartSecret": ""
}
After (V3)
In accordance with the latest changes to the BankID API, an authentication may no longer be triggered using a SSN.
Instead, the BankID app must be triggered either on the same device using the "autoStartToken", or on a different device using a QR code. The "enableQR" property has therefore been removed and is now always enabled.
POST /v3/bankid-se/auth
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"ssn": "",
"ipAddress": "",
"callbackUrl": "",
"pinRequired": true,
"intent": "",
"orgNumber": "",
"refId": ""
}
Response body
{
"id": "",
"autoStartToken": "",
"qrStartToken": "",
"qrStartSecret": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.pnohas been renamed tossnand will no longer trigger BankID to start an authentication. Instead, the authentication will fail if the SSN of the authenticated user does not match the given SSN.callbackUrlmust now be whitelisted by contacting us at support@idkollen.se.allowFingerprinthas been replaced withpinRequired.enableQRhas been removed. It is now always enabled.avsikthas been removed, useintentinstead.refIDhas been renamed torefId. Note the lowercase 'd'.orderRefhas been removed from the response. Useidinstead.
Cancel BankID authentication
Before (V2)
POST /v2/{{accountId}}/cancel
{
"orderRef": ""
}
After (V3)
DELETE /v3/bankid-se/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Summary of changes
- The path and method of the endpoint has changed and now includes the id.
- The endpoint is now authenticated using Basic Auth.
- The endpoint accepts no payload.
Get BankID authentication status
Before (V2)
GET /v2/{{accountId}}/collect/{{orderRef}}
{
"orderRef": "",
"status": "",
"pno": "",
"name": "",
"givenName": "",
"surname": "",
"hintCode": "",
"refID": ""
}
After (V3)
GET /v3/bankid-se/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"hintCode": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
orderRefhas been removed from the response. Useidinstead.- The possible values of
statushas changed, see Fetch result. hintCodeis only available whenstatusisPENDING, on failure refer to theerrorparameter.refIDhas been renamed torefId. Note the lowercase 'd'.
Start BankID signing
Before (V2)
POST /v2/{{accountId}}/sign
Request body
{
"provider": "BankID",
"secretKey": "",
"pno": "",
"message": "",
"digest": "",
"ipAddress": "",
"callbackUrl": "",
"allowFingerprint": true,
"enableQR": true,
"orgNumber": "",
"refID": ""
}
Response body
{
"orderRef": "",
"autoStartToken": "",
"qrStartToken": "",
"qrStartSecret": ""
}
After (V3)
POST /v3/bankid-se/sign
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"ssn": "",
"text": "",
"digest": "",
"ipAddress": "",
"callbackUrl": "",
"pinRequired": true,
"orgNumber": "",
"refId": ""
}
Response body
{
"id": "",
"autoStartToken": "",
"qrStartToken": "",
"qrStartSecret": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.pnohas been renamed tossnand will no longer trigger BankID to start an authentication. Instead, the authentication will fail if the SSN of the authenticated user does not match the given SSN.callbackUrlmust now be whitelisted by contacting us at support@idkollen.se.allowFingerprinthas been replaced withpinRequired.enableQRhas been removed. It is now always enabled.refIDhas been renamed torefId. Note the lowercase 'd'.orderRefhas been removed from the response. Useidinstead.
Cancel BankID signing
Before (V2)
POST /v2/{{accountId}}/cancel
{
"orderRef": ""
}
After (V3)
DELETE /v3/bankid-se/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Summary of changes
- Cancelling a sign request now uses a separate endpoint.
- The endpoint is now authenticated using Basic Auth.
- The endpoint accepts no payload.
Get BankID signing status
Before (V2)
GET /v2/{{accountId}}/collect/{{orderRef}}
{
"orderRef": "",
"status": "",
"pno": "",
"name": "",
"givenName": "",
"surname": "",
"hintCode": "",
"refID": ""
}
After (V3)
GET /v3/bankid-se/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"hintCode": "",
"refId": ""
}
Summary of changes
- Cancelling a sign request now uses a separate endpoint.
- The endpoint is now authenticated using Basic Auth.
orderRefhas been removed from the response. Useidinstead.- The possible values of
statushas changed, see Fetch result. hintCodeis only available whenstatusisPENDING, on failure refer to theerrorparameter.refIDhas been renamed torefId. Note the lowercase 'd'.
Start Freja eID authentication
Before (V2)
POST /v2/{{accountId}}/auth
Request body
{
"provider": "freja",
"secretKey": "",
"pno": "",
"callbackUrl": "",
"minRegistrationLevel": "",
"orgNumber": "",
"refID": ""
}
Response body
{
"orderRef": ""
}
After (V3)
POST /v3/freja/auth
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"ssn": "",
"callbackUrl": "",
"minRegistrationLevel": "",
"orgNumber": "",
"refId": ""
}
Response body
{
"id": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.pnohas been renamed tossn.callbackUrlmust now be whitelisted by contacting us at support@idkollen.se.refIDhas been renamed torefId. Note the lowercase 'd'.orderRefhas been removed from the response. Useidinstead.
Cancel Freja eID authentication
Before (V2)
POST /v2/{{accountId}}/cancel
{
"orderRef": ""
}
After (V3)
DELETE /v3/freja/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Summary of changes
- The path and method of the endpoint has changed and now includes the id.
- The endpoint is now authenticated using Basic Auth.
- The endpoint accepts no payload.
Get Freja eID authentication status
Before (V2)
GET /v2/{{accountId}}/collect/{{orderRef}}
{
"orderRef": "",
"status": "",
"pno": "",
"name": "",
"hintCode": ""
}
After (V3)
GET /v3/freja/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"hintCode": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
orderRefhas been removed from the response. Useidinstead.- The possible values of
statushas changed, see Fetch result. hintCodeis only available whenstatusisPENDING, on failure refer to theerrorparameter.pnohas been renamed tossn.givenNameandsurnamehas been added.refIdhas been added.
Start Freja eID signing
Before (V2)
POST /v2/{{accountId}}/sign
Request body
{
"provider": "freja",
"secretKey": "",
"pno": "",
"message": "",
"digest": "",
"callbackUrl": "",
"minRegistrationLevel": "",
"orgNumber": "",
"refID": ""
}
Response body
{
"orderRef": ""
}
After (V3)
POST /v3/freja/sign
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"ssn": "",
"text": "",
"digest": "",
"callbackUrl": "",
"minRegistrationLevel": "",
"orgNumber": "",
"refId": ""
}
Response body
{
"id": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.pnohas been renamed tossn.callbackUrlmust now be whitelisted by contacting us at support@idkollen.se.refIDhas been renamed torefId. Note the lowercase 'd'.orderRefhas been removed from the response. Useidinstead.
Cancel Freja eID signing
Before (V2)
POST /v2/{{accountId}}/cancel
{
"orderRef": ""
}
After (V3)
DELETE /v3/freja/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Summary of changes
- Cancelling a sign request now uses a separate endpoint.
- The endpoint is now authenticated using Basic Auth.
- The endpoint accepts no payload.
Get Freja eID signing status
Before (V2)
GET /v2/{{accountId}}/collect/{{orderRef}}
{
"orderRef": "",
"status": "",
"pno": "",
"name": "",
"hintCode": ""
}
After (V3)
GET /v3/freja/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"hintCode": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
orderRefhas been removed from the response. Useidinstead.- The possible values of
statushas changed, see Fetch result. hintCodeis only available whenstatusisPENDING, on failure refer to theerrorparameter.pnohas been renamed tossn.givenNameandsurnamehas been added.refIdhas been added.
Start BankID (NO) authentication
Before (V2)
POST /v2/{{accountId}}/no/login
Request body
{
"requestSSN": true,
"refID": "",
"secretKey": ""
}
Response body
{
"loginLink": ""
}
After (V3)
POST /v3/bankid-no/auth
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"requestSsn": true,
"refId": ""
}
Response body
{
"id": "",
"refId": "",
"url": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.loginLinkhas been renamed tourl.requestSSNhas been renamed torequestSsn. Note the different casing.refIDhas been renamed torefId. Note the lowercase 'd'.
Get BankID (NO) authentication status
Before (V2)
GET /v2/{{accountId}}/no/verify/{{code}}
{
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refID": ""
}
After (V3)
GET /v3/bankid-no/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
- The redirect request parameter
codeis renamed toid. - The possible values of
statushas changed, see Fetch result. refIDhas been renamed torefId. Note the lowercase 'd'.
Start BankID (NO) signing
Before (V2)
POST /v2/{{accountId}}/no/sign
Request body
{
"secretKey": "",
"signText": "",
"refID": ""
}
Response body
{
"signLink": ""
}
After (V3)
POST /v3/bankid-no/sign
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"text": "",
"refId": ""
}
Response body
{
"id": "",
"refId": "",
"url": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.signLinkhas been renamed tourl.signTexthas been renamed totext.refIDhas been renamed torefId. Note the lowercase 'd'.
Get BankID (NO) signing status
Before (V2)
GET /v2/{{accountId}}/no/verify/{{code}}
{
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refID": "",
"signResult": {
"endUser": "",
"merchant": "",
"hash": ""
}
}
After (V3)
GET /v3/bankid-no/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refId": "",
"signResult": {
"endUser": "",
"merchant": "",
"hash": ""
}
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
- The redirect request parameter
codeis renamed toid. - The possible values of
statushas changed, see Fetch result. refIDhas been renamed torefId. Note the lowercase 'd'.
Start MitID authentication
Before (V2)
POST /v2/{{accountId}}/dk/login
Request body
{
"refID": "",
"referenceText": "",
"secretKey": ""
}
Response body
{
"loginLink": ""
}
After (V3)
POST /v3/mitid/auth
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"referenceText": "",
"refId": ""
}
Response body
{
"id": "",
"refId": "",
"url": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.loginLinkhas been renamed tourl.refIDhas been renamed torefId. Note the lowercase 'd'.
Get MitID authentication status
Before (V2)
GET /v2/{{accountId}}/dk/verify/{{code}}
{
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refID": ""
}
After (V3)
GET /v3/mitid/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
- The possible values of
statushas changed, see Fetch result. - The
birthDateformat has changed fromdd.MM.yyyytoyyyy-MM-dd. refIDhas been renamed torefId. Note the lowercase 'd'.
Start MitID signing
Before (V2)
POST /v2/{{accountId}}/dk/sign
Request body
{
"secretKey": "",
"signText": "",
"refID": ""
}
Response body
{
"signLink": ""
}
After (V3)
POST /v3/mitid/sign
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"text": "",
"refId": ""
}
Response body
{
"id": "",
"refId": "",
"url": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.signLinkhas been renamed tourl.signTexthas been renamed totext.refIDhas been renamed torefId. Note the lowercase 'd'.
Get MitID signing status
Before (V2)
GET /v2/{{accountId}}/dk/verify/{{code}}
{
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refID": "",
"checksum": ""
}
After (V3)
GET /v3/mitid/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refId": "",
"signResult": {
"checksum": ""
}
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
- The redirect request parameter
codeis renamed toid. - The possible values of
statushas changed, see Fetch result. - The
birthDateformat has changed fromdd.MM.yyyytoyyyy-MM-dd. checksumhas been wrapped in asignResultobject.refIDhas been renamed torefId. Note the lowercase 'd'.
Start FTN authentication
Before (V2)
POST /v2/{{accountId}}/fi/login
Request body
{
"refID": "",
"secretKey": ""
}
Response body
{
"loginLink": ""
}
After (V3)
POST /v3/ftn/auth
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
Request body
{
"refId": ""
}
Response body
{
"id": "",
"refId": "",
"url": ""
}
Summary of changes
- The path to the endpoint has changed
secretKeyhas been removed in favor of Basic Auth.loginLinkhas been renamed tourl.refIDhas been renamed torefId. Note the lowercase 'd'.
Get FTN authentication status
Before (V2)
GET /v2/{{accountId}}/fi/verify/{{code}}
{
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refID": ""
}
After (V3)
GET /v3/ftn/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"id": "",
"status": "",
"error": "",
"ssn": "",
"name": "",
"givenName": "",
"surname": "",
"birthDate": "",
"refId": ""
}
Summary of changes
- The path to the endpoint has changed
- The endpoint is now authenticated using Basic Auth.
- The possible values of
statushas changed, see Fetch result. - The
birthDateformat has changed fromdd.MM.yyyytoyyyy-MM-dd. refIDhas been renamed torefId. Note the lowercase 'd'.