Skip to main content

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:

  1. base_fee + per_km × road distance + per_min × travel time (traffic-adjusted for when the delivery leaves).
  2. mode_multipliers for the vehicle, e.g. {"driving": 1.5}.
  3. zones: when the drop-off is inside one of your service areas, multiply and/or add.
  4. 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) and weight (parcel between min_kg and max_kg).
  5. minimum / maximum, then round_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​

Saved