Connecting and authorization
  • 22 Jan 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Connecting and authorization

  • Dark
    Light
  • PDF

Article summary

Connections

We recommend that you use generated client library based on our updated OpenAPI compatible yaml-definition. You can find resources here:

https://swagger.io/tools/swagger-codegen/

You can find updated reference documentation from this site and also raw yaml description from address:

https://4straction.io/api-v1/4straction.json

Please use this address for updated yaml description to generate client library. OpenAPI codegen supports almost 30 different environments so we recommend that you use it.

Authorization

Authorization works by providing a normal user and password in headers and also partner spesific partner key:

4S-API-User-ID

Normal username as in email format.

4S-API-User-Password

Password for the user

4S-API-Partner-Key

Partner key is 32 character string that you can get from 4straction support.

Selecting a company to work with

4Straction is a multi company service and users can have different level of accesses to several companies. If you don't pass any company details, all API access will be targeted for users default login company. You can override this information with 2 headers passed in the call:

4S-API-Organization-Identifier-Override

Organization identifier override is human readable organization identifier for the company. This is the same information that is provided in general settings for the company. For finnish companies it would be in 9 character format such as:

2700787-8

4S-API-CompanyID-Override

This override value is internal integer value for the company. You can get this override value from 4straction support.

Possible errors in authorization

Could not login integration user
User was not found based on email and password combination.
Could not login integration partner
Partner key was not found
Could not find target company or no access
User and partner was found, but there is no company to access to. Check access from 4straction main application.
No access to the target company
User has no access to provided company. Either default login company does not have access or overriden company values are incorrect.

Was this article helpful?