Skip to main content

DeliveryQuoteRequest

idstring

Bulk only. Your reference, echoed back.

pickup objectrequired

One end of a route — supply exactly one of hex, plus_code, gps_code, point, or profile_slug.

gps_codestring

A GhanaPostGPS digital address, with or without dashes. It is looked up in the GhanaPostGPS registry and the route uses the centre of its cell. An unknown or malformed code returns 400 VALIDATION_ERROR.

Example: GA-183-8164
plus_codestring

A full Plus Code (Open Location Code), case-insensitive. The route uses the centre of its cell (about 14 m across for a 10-digit code). Short codes are rejected as ambiguous; expand them first with GET /v2/pluscode/{code}?ref=lat,lng.

Example: 6CQXJR37+F6
location_idstring

Physical location selector, mutually exclusive with hex/point/profile_slug. Private locations require a profile grant.

entrance_idstring

Canonical gate ID; requires profile_slug or location_id and excludes entrance_type.

entrance_revisioninteger

Reject if the approved revision changed.

Possible values: >= 1

profile_slugstring

Address-profile handle; access is checked before resolving coordinates/entrances

entrance_typestring

Optional explicit entrance for profile_slug. Otherwise defaults to truck/main gate selection, then profile point.

Possible values: [main, truck_gate, loading_dock, visitor, staff, pedestrian, compound]

hexstring

AfriHex code at resolution 7

Example: AF-GH-7-0GXTJJB0ZZZZZ
point object

Raw coordinate

lngnumber<double>
Example: -0.1867
latnumber<double>
Example: 5.604
headinginteger

Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.

Possible values: >= 0 and <= 359

Example: 270
dropoff objectrequired

One end of a route — supply exactly one of hex, plus_code, gps_code, point, or profile_slug.

gps_codestring

A GhanaPostGPS digital address, with or without dashes. It is looked up in the GhanaPostGPS registry and the route uses the centre of its cell. An unknown or malformed code returns 400 VALIDATION_ERROR.

Example: GA-183-8164
plus_codestring

A full Plus Code (Open Location Code), case-insensitive. The route uses the centre of its cell (about 14 m across for a 10-digit code). Short codes are rejected as ambiguous; expand them first with GET /v2/pluscode/{code}?ref=lat,lng.

Example: 6CQXJR37+F6
location_idstring

Physical location selector, mutually exclusive with hex/point/profile_slug. Private locations require a profile grant.

entrance_idstring

Canonical gate ID; requires profile_slug or location_id and excludes entrance_type.

entrance_revisioninteger

Reject if the approved revision changed.

Possible values: >= 1

profile_slugstring

Address-profile handle; access is checked before resolving coordinates/entrances

entrance_typestring

Optional explicit entrance for profile_slug. Otherwise defaults to truck/main gate selection, then profile point.

Possible values: [main, truck_gate, loading_dock, visitor, staff, pedestrian, compound]

hexstring

AfriHex code at resolution 7

Example: AF-GH-7-0GXTJJB0ZZZZZ
point object

Raw coordinate

lngnumber<double>
Example: -0.1867
latnumber<double>
Example: 5.604
headinginteger

Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.

Possible values: >= 0 and <= 359

Example: 270
modestring

Possible values: [motor_scooter, driving, bicycle, foot, truck]

Default value: motor_scooter
depart_atstring<date-time>

When the delivery leaves (default now, up to 7 days ahead). Sets traffic and time_window surcharges.

parcel object
weight_kgnumber
rules object

Your delivery fee rulebook. Set at least one of base_fee, per_km or per_min.

currencystring
Default value: GHS
base_feenumber
per_kmnumber
per_minnumber

Per minute of traffic-adjusted travel time.

minimumnumber
maximumnumber

0 or absent = no cap.

round_tonumber

Round the final price up to a multiple of this, e.g. 0.5.

mode_multipliers object
property name*number
zones object[]

Possible values: <= 20

  • Array [
  • service_area_idstringrequired
    labelstring
    addnumber
    multiplynumber
  • ]
  • surcharges object[]

    Possible values: <= 20

  • Array [
  • typestringrequired

    Possible values: [unpaved, flood_risk, rain, toll, time_window, weight]

    labelstring
    addnumber
    multiplynumber
    min_sharenumber

    unpaved only, 0-1.

    startstring

    time_window only, HH:MM Ghana time.

    Example: 20:00
    endstring
    Example: 06:00
    min_kgnumber

    weight only.

    max_kgnumber
  • ]
  • DeliveryQuoteRequest
    {
    "id": "string",
    "pickup": {
    "gps_code": "GA-183-8164",
    "plus_code": "6CQXJR37+F6",
    "location_id": "string",
    "entrance_id": "string",
    "entrance_revision": 0,
    "profile_slug": "string",
    "entrance_type": "main",
    "hex": "AF-GH-7-0GXTJJB0ZZZZZ",
    "point": {
    "lng": -0.1867,
    "lat": 5.604
    },
    "heading": 270
    },
    "dropoff": {
    "gps_code": "GA-183-8164",
    "plus_code": "6CQXJR37+F6",
    "location_id": "string",
    "entrance_id": "string",
    "entrance_revision": 0,
    "profile_slug": "string",
    "entrance_type": "main",
    "hex": "AF-GH-7-0GXTJJB0ZZZZZ",
    "point": {
    "lng": -0.1867,
    "lat": 5.604
    },
    "heading": 270
    },
    "mode": "motor_scooter",
    "depart_at": "2024-07-29T15:51:28.071Z",
    "parcel": {
    "weight_kg": 0
    },
    "rules": {
    "currency": "GHS",
    "base_fee": 0,
    "per_km": 0,
    "per_min": 0,
    "minimum": 0,
    "maximum": 0,
    "round_to": 0,
    "mode_multipliers": {
    "driving": 1.5,
    "truck": 2
    },
    "zones": [
    {
    "service_area_id": "string",
    "label": "string",
    "add": 0,
    "multiply": 0
    }
    ],
    "surcharges": [
    {
    "type": "unpaved",
    "label": "string",
    "add": 0,
    "multiply": 0,
    "min_share": 0,
    "start": "20:00",
    "end": "06:00",
    "min_kg": 0,
    "max_kg": 0
    }
    ]
    }
    }