Appearance
Getting started
The cling API is a REST API which you can use to integrate the Cling product in your system.
For requests in production environment, use the baseUrl: https://api.cling.se
.
For requests in test/development environment, use the baseUrl: https://api.dev.cling.se
.
Requirements
To use the API you need to either authenticate with a JWT or a API-key. Please see "How to authenticate" for more information.
How to authenticate
Routes that have the header Authorization can be used with a JWT and routes with the header apiKey can be used with the apiKey. You only have to provide one of the two headers with the authentication you prefer.
How to generate a CompanyUserToken (JWT)
Signup with a normal account in the browser for the service: https://app.cling.se. With the email and password you signed up with, make a POST request to /auth/companyUser
endpoint to authenticate as an CompanyUser. In the response you will find the JWT.
How to generate an Cling API-key
Create a CompanyApiKey by making a POST request to /companyApiKey
and provide the header Authentication with provided JWT. In the response you will find the API-key.