Client Documentation for using our APIs

To be able to access any of the APIs you have to gain access to the  www.cargo-fleet.com portal first. This requires a customer name, a username and a password. Furthermore you need to subscribe for all APIs you would like to use.

How to subscribe to a product?

If you want to subscribe to one of our products or even want a customer specific API to use in your company, feel free to contact us. After you have subscribed to a product, you will get login credentials for this developer portal and be able to read the documentation of the APIs in your product. In order to be able to access the API endpoints, you will get two subscription keys, a primary key and a secondary key. These keys are independent of each other and can be administrated separately. Both are handled equivalently in the API Gateway. One of the keys has to provided with every API-calls in the Ocp-Apim-Subscription-Key Header. If the subscription key is missing or malformed, you will yield the status 401 (Unauthorized).

You can access and administrate your subscription keys in this developer portal within the 'Products' page.

How to authorize myself?

For using any of the APIs you will need the login credentials of any www.cargo-fleet.com user account. It is advised to create a dedicated user account to use with your API client, but nevertheless any www.cargo-fleet.com user acount will work. The login credentials consist of your customer portal name, your user name and your password. For the authentication of API-calls basic authentication is used. The API-calls will be authorized like the given portal user, e.g. the number of accessible assets depends on the assign assets and asset groups.

The basic authentication user has to be set as combination of portal name and user name seperated by a ':'. For the basic authentication password your portal password has to be used. Example:

user:  'Demoportal:Demouser'

password: '12345678'

If the Authorization-Header is missing or malformed, you will receive the status 400 (Bad Request) as a result. If the provided credentials are invalid, you will receive the status 401 (Unauthorized).

Getting started

Consider you want to read the stored data of your asset with the id 293189. If you can set the Authorization and the Ocp-Apim-Subscription-Key Headers correctly as described above, you should get the desired informations with status 200 (OK).

GET /masterdata/REST/v1/assets/293189
Host: api.cargo-fleet.com
Authorization: Basic RGVtb3BvcnRhbEVudHdpY2tsdW5nOkRlbW9wb3J0YWxBZG1pbjoxMjM0NTY3OA==
Ocp-Apim-Subscription-Key: 65a28c5895ee4e568f3bc2e01d957767