API Documentation
Introduction
Application Programming Interface (API) is a set of functions and procedures that allow the creation of applications in order to access the features or data of an operating system, application, or other service.
TruckQuote exposes its data via an Application Programming Interface.
All API requests should be against the domain https://api.truckquote.com .
All valid response in json format have HTTP status code 200.
Other HTTP Response Status Code Indicate error in the API request (API), so developers can interact in a programmatic way with the TruckQuote application.
If a customer needs to increase the count of quote, they can contact the admin. The Default API quote a customer can get is 100.
If a customer faces any issues with the application, then they can contact the support team by messaging them or dropping an email @support@truckquote.com
Type of users
Unauthorized Users | Authorized users |
---|---|
User can calculate only 2 quotes per day | User can calculate maximum 100 Quotes by giving Token |
How to get API key from the site
Step 1
Sign into the website to get an API key. Existing users can sign into their account using login credentials whereas new users need to create a new account by signing up from the website
Step 2
After sign in, go to 'Profile' Menu as shown below
Step 3
Click on 'Access Token' tab. You need to provide a 'Name' to identify token, set an 'Expiry Date' and click on 'Generate Token' button. A token will be generated with an expiry date. Multiple tokens can be created in the same way.
How to get API Quotes
Parameters
Name | Description | Sample Data |
---|---|---|
Equipment Type | Whether it's a dry van, flatbed or reefer | Flatbeds, Vans, Reefers |
Feet | Feet of the load to be shipped | Upto 53 Feet |
Date | It represent the pick up date | 12/28/2018 |
Weight | Weight of the load to be shipped | Upto 45000 LBS |
Weight Unit | Should specify the weight of the load which is to be shipped | LBS |
Stops | Stop represents the points of shipment, Like origin and destination. It contains array values. | Address of the points like Las Vegas,NV,USA |
Additional Services | It represents the additional services | All the additional services are optional, User can choose any services |
Note: If we set the equipment type as reefer, feet and weight values will be set to maximum(53 Feet and 45000 LBS) irrespective of the values provided by the user.
How to get Additional services
API URL
https://api.truckquote.com/api/v1/service-rates/Vans
Set the params
User can set the truckType with Vans/Reefers/Flatbeds
Get Response
If the request is completed successfully, then a success message will be displayed in the response body
Create Quote - Sample Request Body
In the request body, we are supplying the parameters
Note: If the user selected any additional services then pass the id of the services with the request body.
{
"equipment_type":"Flatbeds",
"feet":"25",
"date":"08/25/2021",
"weight":"26000",
"weight_unit":"LBS",
"stops": [
{"address":"Las Vegas, NV, USA","city":"Las Vegas","state":"NV"},
{"address":"Madison, WI, USA","city":"Madison","state":"WI"}],
"selectedServices":[1,3]
}
For reefers, weight and feet values are set to maximum, by default. So, the customers don't have to specify values for 'weight', 'feet' and 'weight_unit' fields. The sample request body will be like this;
{
"equipment_type":"Reefers",
"date":"08/25/2021",
"stops": [
{"address":"Las Vegas, NV, USA","city":"Las Vegas","state":"NV"},
{"address":"Madison, WI, USA","city":"Madison","state":"WI"}],
"selectedServices":[1,3]
}
Post Data
Set the header
In the 'Header' tab, add the content type header as application/json and set the authorisation value as token value that you get from profile
Set the body
Select the body type as raw and give all data in the body section. Click 'Send' button.
It will produce json data .User can change the request data and get multiple quotes
Create Quote - Get Response
If the request is completed successfully, then a success message will be displayed in the response body