Skip to main content

Get Shipping Quote

Calculate the full cost breakdown for a route before creating a shipment. Use this to display pricing to your users without booking anything or touching the wallet.


Endpoint

POST/v1/shipments/calculate-rates

Required permission: shipments:quote:get


How the Pricing Works

Rates are computed from three components stacked on top of a base fare:

ComponentRule
Base fareFlat charge applied to every shipment
Distance feePer-kilometer charge multiplied by route distance
Weight surchargeTiered charge based on the selected packageCategory
Value surchargeApplied when enableInsurance is true. a percentage of itemValue

The exact rates (base fare, per-km rate, surcharge amounts) are configured per-workspace in your settings. The quote endpoint uses your workspace's active pricing config.


Request Body

FieldTypeRequiredDescription
originPlaceIdStringGoogle Maps Place ID of the pickup location.
destPlaceIdStringGoogle Maps Place ID of the delivery location.
packageCategoryStringSize tier. One of SMALL, MEDIUM, LARGE, or EXTRA_LARGE.
itemValueIntegerDeclared item value in ₦. Used to calculate insurance surcharge.
enableInsuranceBooleanPass true to include the value surcharge in the quote.

Response

FieldTypeDescription
baseFareNumberFlat base rate in ₦.
distanceFeeNumberDistance charge in ₦.
weightSurchargeNumberPackage category surcharge in ₦.
valueSurchargeNumberInsurance surcharge in ₦ (zero if not requested).
totalCostNumberSum of all components in ₦.

{
"originPlaceId": "ChIJi4eLcz4OdkgRlgpAD5e4OCg",
"destPlaceId": "ChIJv1SCIS2TOxARgv6-Zj4i_yw",
"packageCategory": "MEDIUM",
"itemValue": 450000,
"enableInsurance": true
}