Using an API Client
The easiest way to test the BoxTech API is to use a REST Client such as Postman see http://www.getpostman.com) which can be run in your browser or on your desktop. This client access will help you understand the API before starting to write code to automate the calls.
This guide will take around 10 minutes to complete
Signup for Boxtech API
- Signup for a new user account to access data. Accept Terms and Conditions.
- Confirm your account activation by clicking the link received by email.
You now have a <username> and <password> you can use in the API.
Get hold of Postman
Download Postman to your desktop or run it in your browser. Create a (free account) to save your tests for future reference.
Now you are in postman, create a ‘New Tab’ at the top of the screen
Configure the BoxTech API Authentication call :
- select the POST operation
https://app.bic-boxtech.org/oauth/tokenfor the URL
- add 2 headers in the Headers section
Note : the value of the Authorization key is called the <clientid>
Move to the Body section :
- select the x-www-url-encoded type of body
- add 3 values in the body
- save your work by clicking Save on the right, and store it in a collection you will call BIC BoxTech
Click Send : you should get a response which looks like this :
access_token value, in our case :
Call GET container API
In Postman, create a new tab at the top of the screen.
Configure the BoxTech API get container call :
- select the GET operation
- use the
https://app.bic-boxtech.org/api/v2.0/container/GLDU5334260URL : this will query for the GLDU5334260 container. Note the format of the container number which includes the check digit
- add 1 header in the Headers section
NOTE: Replace the
access_token with the one you retrieved previously, in our example
- save your work which should look like this :
Click Send : you should get a response like this :
tare_kg of the container is 2230 kg.