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:
![Fork Collection Form](/_next/image?url=%2Fimages%2Fpostman%2Ffork_collection.png&w=1080&q=75)
Enter a name for your fork and select the workspace where it will be created:
![Fork Collection](/_next/image?url=%2Fimages%2Fpostman%2Ffork_form.png&w=750&q=75)
You can also fork the environment template from the TravelTime Developers Workspace:
![Environment variable template](/_next/image?url=%2Fimages%2Fpostman%2Ffork_environment_template.png&w=828&q=75)
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:
![Create environment](/_next/image?url=%2Fimages%2Fpostman%2Fcreate_environment.png&w=750&q=75)
Add your authentication details as app_id and app_key to the environment and save:
![Edit environment](/_next/image?url=%2Fimages%2Fpostman%2Fset_authorization_details.png&w=2048&q=75)
Set the environment to active:
![Set environment active](/_next/image?url=%2Fimages%2Fpostman%2Fset_environment_active.png&w=828&q=75)
Now within the collection set it to use the environment created:
![Set environment active](/_next/image?url=%2Fimages%2Fpostman%2Fset_environment.png&w=1920&q=75)
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:
![Api key](/_next/image?url=%2Fimages%2Fpostman%2Fapi_key.png&w=1920&q=75)
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.
![Api key](/_next/image?url=%2Fimages%2Fpostman%2Fsend_request.png&w=1920&q=75)
In the requests you will see variables departure_time
and 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`
![Api key](/_next/image?url=%2Fimages%2Fpostman%2Fedit_script.png&w=1920&q=75)