Getting started

We have a PreProduction/Test environment where you can play around the API before releasing it to production.
If you wish to use our API you must contact our API support and we will create a demo account for you.
When you have received the email you must follow the link and create a password.


Activating an integration and collecting the refreshToken


  1. Log into DataLøn and select the "Integrationer"-button in the left menu.
  2. Click on the blue "Gå til siden med integrationer"-button.
  3. Find your companies integration tile in the list and click the "Tilmeld"-knap.
  4. Copy the accessToken.

Environment URLs


PreProduction (Test)

Bluegarden SSO: https://preprod-logon.bluegarden.dk/api/LoginRefreshToken

DataLøn API: https://preprod-dataloen-api.bluegarden.dk/api/input/salary

Production

Bluegarden SSO: https://logon.bluegarden.dk/api/LoginRefreshToken

DataLøn API: https://dataloen-api.bluegarden.dk/api/input/salary


Authentication


The refreshToken can be used to collect an accessToken, which is required when calling the DataLøn API. An accessToken is issued by Bluegardens SSO, which is our identity provider.

To request an accessToken you must:

POST https://[Bluegarden SSO]/api/LoginRefreshToken
HEADERS:
    Ocp-apim-subscription-key: "[subscription-key]"
    Content-Type: application/json
BODY: 
    { "refreshToken" : "[refreshToken]" }

The response will contain the accessToken, which is valid for an hour.

The obtained accessToken must be set in the header of every request to the DataLøn API: Authorization: Bearer [accessToken]


Glossary


Subscription-Key

A unique key granted to each integration partner. This key must be provided with every call to Bluegarden SSO and the subscription-key must be located in the ocp-apim-subscription-key header. The subscription-key will vary by environment.


RefreshToken

A unique key representing the connection between a DataLøn Employer and an integration partner.


AccessToken

A JWT issued by Bluegardens SSO. The JWT must be located in the Authorization-header of all API calls to the DataLøn API: Authorization: Bearer [accessToken]. The JWT expires after one hour.


Last updated February 27th, 2017