Postman is a platform for building and using APIs. Follow this guide to quickly test TravelTime API endpoints with all requests pre-defined in a Postman Collection. All you will need to setup is input your API keys into Postman environment variables. If you don’t already have a TravelTime API key, then you can get a free key by creating an account here.
To get started fork the Collection from TravelTime public Workspace within Postman:
Enter a name for your fork and select the workspace where it will be created:
You can also fork the environment template from the TravelTime Developers Workspace:
To run requests you’ll need to supply your TravelTime API id and key and set them as your environment variables within your workspace. If you forked the TravelTime Environment, you just need to edit what you already have.
To set any environment variable, create a new environment within Postman:
Add your authentication details as app_id and app_key to the environment and save:
Set the environment to active:
Now within the collection set it to use the environment created:
If your environment is set up correctly, you should be able to set your authentication Type as API Key and set variable
app_id as Key and
app_key as Value, set Add to Header:
Be sure to save every time you make changes to the Collection.
Request Headers and Body are already defined in the Collection, all you need to do to send a request is pick one of our GET or POST requests and click Send. You are free to edit the Body of the request based on your needs.
In the requests you will see variables
arrival_time, these are set so you do not need to set current time yourself and get started quicker.
These variables can be edited in the Collections Pre-request Scripts or can be replaced, please input time in extended ISO-8601 format with correct time zone, example: `YYYY-MM-DDTHH:MM:SSZ`