Get Delivery Price Estimate

Get Delivery Price

POST {baseUrl}/deliveries/estimate

This endpoint allows you to get the delivery price estimate between two locations.

You have 2 options:

Pass a location code. You can get a location code of every location via the get locations endpoint here.

Include the geocode for both the pickup and drop-off locations. This includes the lat and long values.

Request Body

NameTypeDescription

pickupCode

string

Location code

dropoffCode

string

Location code

pickupGeo

object

Longitude and latitude

dropoffGeo

object

Longitude and latitude

pickupDate*

Date(ISO)

The delivery date

weight

String

height

String

width

String

length

String

{
  "status": true,
  "message": "Delivery price successfully generated",
  "data": {
    "price": 1500
  }
}

Sample Success Data


{
    "orderType": "FULFILLMENT",
    "pickupGeo": {
      "lat": 6.650285,
      "long": 3.28603
    },
    "dropoffGeo": {
      "lat": 6.615356,
      "long": 3.323782
    },
    "pickupDate": "2024-09-22",
    "weight": "40",
    "height": "20",
    "width": "30",
    "length": "20"
}
{
    "orderType": "FULFILLMENT",
    "pickupCode": "ETWD",
    "dropoffCode": "FD82",
    "pickupCity": "Abule Egba  - Agbado ljaye Road",
    "dropoffCity": "Agege  - Dopemu",
    "pickupDate": "2024-09-22",
    "weight": "40",
    "height": "20",
    "width": "30",
    "length": "20"
}
// Sample Response Body - 200 OK
{
    "status": true,
    "message": "Delivery estimate successfully generated",
    "data": {
        "price": 2500,
        "deliveryWindow": false
    }
}

Sample Error Data

{
    "pickupGeo": {
      "lat": 6.650285,
      "long": 3.28603
    },
    "dropoffGeo": {
      "lat": 6.615356,
      "long": 3.323782
    },
    "weight": "40",
    "height": "20",
    "width": "30",
    "length": "20"
}
// Sample Response Body - 400 Bad Request
{
    "status": false,
    "message": "\"pickupDate\" is required"
}

Last updated