Quoting and rate calculation
You can use the quote API to get real-time quotes from carriers, or set up flat rates within your own system.
The /quotes
endpoint
Use the /quotes
endpoint to fetch live shipping rates from Shippit’s integrated carriers. Start by sending a POST request, which needs to include:
dropoff_location
: The delivery address including suburb, postcode, state, and country.parcel_attributes
: An array describing each parcel. Quantity and weight are required, while dimensions are optional but recommended.- Optional fields, such as
order_date
for priority orders, orreturn_all_quotes
to get quotes from all available couriers.
The response that the API returns quotes from the different carriers, in JSON format. The response includes:
courier_type
: The name of the carrier.service_level
: The carrier service level, such as standard, express, priority, or on demand.quotes
: An array of quote objects, each with price and estimated delivery details.
Quotes and flat rates
Quotes provide accurate, real-time shipping costs based on a specific order. Use quotes to help you avoid undercharging for shipping. Flat rates can be simpler to implement, and provide predictable shipping costs for your customers. However, flat rates might not reflect the actual shipping costs to your business, especially if you ship products with varying weight and dimensions.
Which approach you choose depends on your business model, product types, and target customers. You can also combine both methods, using quotes for certain products or destinations and flat rates for others.
Handling multiple priority carrier responses
If there are multiple priority carrier options available, the /quotes
endpoint returns all of them. The response includes a courier_type
field for each quote, which gives the specific carrier offering that quote. You should parse this response and decide how to present the options to your customers. Common options are to always display the cheapest option, or to allow the customer to choose.