This document will help you understand how the ticket API and the content REST API’s works
Before you can made any REST API requests, you need to obtain an access token. You will get a valid access token (it's called a ticket) by using a ticket API. This a valid access token must be sent in the API request custom header element (named x-api-key or ticket, we prefer x-api-key).
In order to use the API you must have a valid environment specific username and password. All API requests must be made over HTTPS.
curl 'https://api-test.bisnode.fi/permission/v1/ticket' -u ABCDEFGH:12345abc
If you have a valid username and password the request will be successful.
{
"username": "123456",
"endusername": "ABCDEFGH",
"fullName": "Test User",
"ipAddress": ";172.25.172.45;213.214.146.129:32935",
"ticket": "1234567890ABCDEFGHIJ",
"languageCode": "en",
"exception": null,
"passwordExpires": null,
"passwordExpired": false,
"loginWithEmail": false
}
This is the valid access token.
"ticket": "1234567890ABCDEFGHIJ"
Failed request - Status code 401
If you don't have a valid username and password, or the user credentials are misspelled.
Login failed
The ticket parameter must be sent in the request custom header element. If the ticket value is valid then API request will be successful (http status code 200), otherwise it will fail (http status code 401).
A ticket is valid for 20 minutes, after that it will automatically expire.
Ticket API returns a new valid ticket.