When interacting with techTRACK via API there are tools, documentation and good practices that will help you do it in the easiest way possible.
These are the elements detailed in this article:
- Swagger documentation to access API methods
- Receive API keys from Techdinamics
- Postman to test API calls
Follow the guide and bookmark the documentation as you find it convenient.
SWAGGER DOCUMENTATION
The Swagger documentation details the methods, parameters and values you need to interact with techTRACK to pull Statuses.
Access and bookmark the following link: https://techtrack.cloud/api/docs/ui/index
As you become familiar with the techTRACK API, you will have to consult it frequently.
The documentation is divided in the following sections:
Auth: Details the Authentication methods
Events: Details how to interact with Events objects
Trackings: Details how to interact with Trackings objects
- Models: Details the available objects
For each method, you will find:
A) Method definition and description
B) Parameters mode
- Example value: Displays an example of how the parameters should be completed
- Model: Displays the object contents, parameters, data types, max/min length and values when applicable
C) Details of the selected mode
D) Parameters details: Clarifies values and codes of a parameter whenever applicable
E) Try it out: Enables the quick test mode, opening the fields to be completed and an Execute button to execute the method test with the parameters you provided:
RECEIVE API KEYS FROM TECHDINAMICS
To be able to interact with the API, you will need your techTRACK Portal API Key and Password (Secret).
Each portal has its own key set, so for each portal, you will need a different set of keys.
Reach your Techdinamics POC(s) requesting the keys and detailing for which portal(s) you need them, and these will be sent to you via a secure link (1Password).
The API information (API Key and API Secret/Password) will be used in the next section in the contest of this article to test your connection.
POSTMAN TO TEST API CALLS
Once you have familiarized yourself with the API, the next step is to test it.
This section details how to use Postman to test a few interactions.
To do so, try the following as indicated:
- Get the information of a tracking number
CREATE THE API CALL AND RECEIVE DATA
1) Create a key called trackingNumber in the Parameters Section
2) Create on the header section a Key named x-api-key with the provided information in the previous section
3) Create on the header section a Key named x-secret-key with the provided information in the previous section
4) In Method GET use: https://techtrack.cloud/api/v1/events/?trackingNumber=[Tracking number]
Example: Where [your techTRACK portal] is your techTRACK portal name as provided by the Techdinamics Implementation team:
https://[your techTRACK portal]/api/v1/events/?trackingNumber=[Tracking number]
If your techTRACK portal would be techtrack.cloud, and the tracking number STSH9999999992 the URL would look like this:
https://techtrack.cloud/api/v1/events/?trackingNumber=STSH9999999992
5) Press Send to execute the generated Get request
If the execution is successful, the response will be shown with the requested information, as displayed below
ADDITIONAL NOTES
Take the following definitions into account.
When working the techTRACK statuses note that the:
1) Type is an additional information field, and is not mandatory
2) Category classifies the events, for example "Category": "Returning to sender", and "Name": "Failed delivery attempt"
3) Name is used to see the description of your system statuses. For example, "Package will be delivered before 9:00pm", "Arrived at Facility" or "Package Received with Origin Scan"