Save your pricing rules
PUT/v2/delivery/pricing
Paid API plans only. Saves the rulebook that POST /v2/delivery/quote
uses. It replaces any earlier version. Amounts are in currency's
major unit (cedis for GHS).
How a price is built, in order:
base_fee+per_km× road distance +per_min× travel time (traffic-adjusted for when the delivery leaves).mode_multipliersfor the vehicle, e.g.{"driving": 1.5}.zones: when the drop-off is inside one of your service areas, multiply and/or add.surcharges, in the order you list them:unpaved(share of the route on unpaved roads ≥min_share),flood_risk(route crosses a flood-prone area),rain(rain on the route now),toll,time_window(start–end, Ghana time; may cross midnight) andweight(parcel betweenmin_kgandmax_kg).minimum/maximum, thenround_to(round up, e.g. to 0.50).
Each zone and surcharge needs add, multiply or both; multiply
applies to the running total first, then add.
Request
Responses
- 200
- 400
- 403
Saved
Invalid rules (VALIDATION_ERROR)
Not on a paid API plan (PLAN_UPGRADE_REQUIRED)