Sendstack APIs
  • Introduction
  • The Basics
    • Set up your account
    • Base URLs
    • Authentication
    • Postman
    • Responses and Errors
    • Webhook Verification
    • Pagination
    • Rate Limiting
    • Session
  • Guides
    • Integrated Partners
    • Manual Partners
    • Connected Partners
    • Connected Platforms
    • Payments
    • Addresses and Locations
    • Delivery Statuses
    • Order Tracking
    • Common Terminology
    • Packaging
    • Pay on Delivery
    • Roles and Permissions
      • Associates
      • Operators
      • Admins
      • Super Admins
      • Tabular presentation
    • Websockets
  • Delivery Management APIs
    • Wallet
      • Get Wallet Balance
      • Get Wallet Transactions
    • Locations
      • Get Mapped Locations
      • Get Countries
    • Estimates
      • Get Delivery Price Estimate
    • Partners
      • Get Partners
      • Get Partner
      • Update Partner Profile
      • Add Partner Off Days
      • Delete Partner Off Day
    • Packaging
    • Categories
    • Bookings
      • New Booking
      • Generate POD account number
      • Fetch Deliveries
      • Update Delivery Details
      • Update Drop Statuses
      • Cancel Drops
      • Reschedule Delivery
      • Update Delivery Window
      • Assign Drop
    • Status Tracking
      • Track Delivery Status
    • Messaging
      • Send Customer Message
      • Add Private Note
      • Update note status
    • Sample Webhook Payloads
      • New delivery
      • Updated delivery status
      • New internal note
      • New customer message
      • Pickup attempt
      • Dropoff attempt
      • Pickup window updated
      • Delivery window updated
  • Live Tracking APIs
    • Devices
      • Get Devices
    • Positions
      • Get All Positions
      • Get Device Position History
      • Stream Positions
    • Geofences
      • Create Geofence
      • Update Geofence
      • Fetch Geofences
      • Fetch Single Geofence
    • Events
      • Create Events
        • Overspeed Event
        • Low Battery Event
        • No Movement Event
        • No Signal Event
        • Geofence In Event
        • Geofence Out Event
      • Update Events
        • Overspeed Event
        • Low Battery Event
        • No Movement Event
        • No Signal Event
        • Geofence In Event
        • Geofence Out Event
      • Fetch Events
      • Fetch Single Event
    • Sample Wehook Payloads
      • Overspeed Event
      • Low Battery Event
      • No Movement Event
      • No Signal Event
      • Geofence In Event
      • Geofence Out Event
Powered by GitBook
On this page
  • Get Delivery Price
  • Sample Success Data using location code
  • Sample Success Data using lat and long
  • Sample Sucess response
  • Sample Error Data
  1. Delivery Management APIs
  2. Estimates

Get Delivery Price Estimate

PreviousEstimatesNextPartners

Last updated 5 months ago

Get Delivery Price

POST {baseUrl}/deliveries/offers

This endpoint provides a price estimate for deliveries between two locations. You can use one of the following methods to specify locations:

  1. Location Code: Pass a locationCode for both the pickup and drop-off locations. Location codes can be retrieved via the endpoint.

  2. Latitude and Longitude: Provide lat and long values within the pickup and drop-off objects.

Required Details for Price Estimate:

  • orderType: Set to PROCESSING

  • Pick-up Details: Include all relevant information for the pickup location.

  • Drop-off Details: Include all relevant information for the drop-off location.

Request Body

Name
Type
Description

orderType

string

pickup

object

pickup details

drop

object

dropoff details

pickup object

Field
Description
Data Type
Constraints

long

Longitude of specified pickup address

Number

Optional

lat

Latitude of specified pickup address

Number

Optional

locationCode

Maps to an area, local government, or province connected to the address

String

Optional

city

Pickup city

String

Optional

state

Pickup state

String

Optional

country

Pickup country

String

Optional

address2

Alternative pickup address

String

Optional

address

Pickup address

String

Optional

postalCode

Pickup address postal code

String

Optional

pickupDate

The date scheduled for the pickup

String

Optional

Drop object

Field
Description
Data Type
Constraints

long

Longitude of specified drop address

Number

Optional

lat

Latitude of specified drop address

Number

Optional

locationCode

Maps to an area, local government, or province connected to the address

String

Optional

city

drop city

String

Optional

state

drop state

String

Optional

country

drop country

String

Optional

address2

Alternative drop address

String

Optional

address

drop address

String

Optional

postalCode

drop address postal code

String

Optional

width

Width of the package (cm)

Number

Optional

length

Length of the package (cm)

Number

Optional

height

Height of the package (cm)

Number

Optional

weight

Weight of the package (kg)

Number

Optional

category

category of item

String

Optional

podAmount

Proof of delivery amount

Number

Optional

{
    "status": true,
    "message": "Available Delivery Offers Returned",
    "data": [
        {
            "name": "DLVR By Sendstack",
            "price": 3200,
            "id": "657217b5901fd21b282399ca",
            "partnerLogo": "https://sendstack.s3.us-west-2.amazonaws.com/partnerDocuments/65bcd97c1e38ed2e78e78e93/supportingDocument/be48d753-075c-4611-9c0a-52ebe8e2b270.png",
            "deliveryTimeline": {
                "estimatedDropoffWindow": {
                    "start": "2024-04-26T13:00:00.000Z",
                    "end": "2024-04-26T18:00:00.000Z"
                },
                "estimatedPickupWindow": {
                    "start": "2024-04-26T07:00:00.000Z",
                    "end": "2024-04-26T13:00:00.000Z"
                }
            },
            "scope": "intracity_scheduled",
            "createdAt": "2024-04-25T16:40:18+01:00"
        }
    ]
}
{
    "status": false,
    "message": "\"dropoffCode\" is required",
    "data": {
        "statusCode": 400,
        "message": "\"dropoffCode\" is required",
    }
}

Sample Success Data using location code

{
    "orderType": "PROCESSING",
    "pickup": {
        "pickupDate": "2024-04-26", //optional
        "locationCode": "0NUP",
        "city": "Ikeja",
        "state": "Lagos",
        "address": "30, Allen Avenue, Ikeja",
        "address2": "5, Allen Avenue, Ikeja"
    },
    "drop": {
        "locationCode": "OHZ2",
        "city": "Yaba",
        "state": "Lagos",
        "address": "7, Adebiyi Street, Yaba",
        "address2": "10, Adebiyi Street, Yaba",
        "category": "Electronic",
        "width": 5,
        "height": 5,
        "weight": 5,
        "length": 5
    }
}
{
    "orderType": "PROCESSING",
    "pickup": {
        "pickupDate": "2024-04-27", //optional
        "locationCode": "0NUP",
        "city": "Ikeja", //optional
        "state": "Lagos", //optional
        "address": "30, Allen Avenue, Ikeja",
        "address2": "5, Allen Avenue, Ikeja"
    },
    "drop": {
        "locationCode": "OHZ2",
        "city": "Yaba", //optional
        "state": "Lagos", //optional
        "address": "7, Adebiyi Street, Yaba",
        "address2": "10, Adebiyi Street, Yaba",
        "category": "Electronic",
        "width": 5,
        "height": 5,
        "weight": 5,
        "length": 5
    }
}
// Sample Response Body - 200 OK
{
    "status": true,
    "message": "Available Delivery Offers Returned",
    "data": [
        {
            "name": "DLVR By Sendstack",
            "price": 3200,
            "id": "657217b5901fd21b282399ca",
            "partnerLogo": "https://sendstack.s3.us-west-2.amazonaws.com/partnerDocuments/65bcd97c1e38ed2e78e78e93/supportingDocument/be48d753-075c-4611-9c0a-52ebe8e2b270.png",
            "deliveryTimeline": {
                "estimatedDropoffWindow": {
                    "start": "2024-04-26T13:00:00.000Z",
                    "end": "2024-04-26T18:00:00.000Z"
                },
                "estimatedPickupWindow": {
                    "start": "2024-04-26T07:00:00.000Z",
                    "end": "2024-04-26T13:00:00.000Z"
                }
            },
            "scope": "intracity_scheduled",
            "createdAt": "2024-04-25T16:40:18+01:00"
        }
    ]
}

Sample Success Data using lat and long

{
    "orderType": "PROCESSING",
    "pickup": {
        "pickupDate": "2024-10-19",
        "lat": 6.60398,
        "long": 3.351345,
        "city": "Ikeja",
        "state": "Lagos",
        "address": "30, Allen Avenue, Ikeja"
    },
    "drop": {
        "lat": 6.514299,
        "long": 3.368903,
        "city": "Yaba",
        "state": "Lagos",
        "address": "7, Adebiyi Street, Yaba",
        "width": 5,
        "height": 5,
        "weight": 5,
        "length": 5
    }
}

Sample Sucess response

{
  "status": true,
  "message": "Available Delivery Offers Returned",
  "data": [
    {
      "name": "test",
      "offerName": "test",
      "price": 0,
      "id": "665064a7637d793b04a2f5a7",
      "deliveryTimeline": {
        "estimatedPickupWindow": {
          "start": "2024-10-19T06:00:00.000Z",
          "end": "2024-10-19T10:00:00.000Z"
        },
        "estimatedDropoffWindow": {
          "start": "2024-10-19T10:00:00.000Z",
          "end": "2024-10-19T18:00:00.000Z"
        }
      },
      "pickupDate": "2024-10-19",
      "scope": "intracity_scheduled",
      "isApiPartner": false,
      "serviceCharge": 200,
      "createdAt": "2024-10-18T15:32:45+00:00"
    },
    {
      "name": "DLVR By Sendstack",
      "offerName": "DLVR By Sendstack",
      "price": 2500,
      "id": "657217b5901fd21b282399ca",
      "deliveryTimeline": {
        "estimatedPickupWindow": {
          "start": "2024-10-19T06:00:00.000Z",
          "end": "2024-10-19T10:00:00.000Z"
        },
        "estimatedDropoffWindow": {
          "start": "2024-10-19T10:00:00.000Z",
          "end": "2024-10-19T18:00:00.000Z"
        }
      },
      "pickupDate": "2024-10-19",
      "scope": "intracity_scheduled",
      "isApiPartner": false,
      "longDistance": false,
      "serviceCharge": 200,
      "createdAt": "2024-10-18T15:32:45+00:00"
    },
    {
      "name": "Messenger",
      "offerName": "Messenger",
      "price": 2700,
      "id": "6568795e0197e613544aaaca",
      "deliveryTimeline": {
        "estimatedDropoffWindow": {
          "start": "2024-10-19T10:00:00.000Z",
          "end": null
        },
        "estimatedPickupWindow": {
          "start": "2024-10-19T06:00:00.000Z",
          "end": null
        }
      },
      "express": true,
      "pickupDate": "2024-10-19",
      "scope": "intracity_scheduled",
      "isApiPartner": true,
      "serviceCharge": 200,
      "createdAt": "2024-10-18T15:32:45+00:00"
    }
  ]
}

Sample Error Data

{
    "orderType": "PROCESSING",
    "pickup": {
        "pickupDate": "2024-04-26",
        "city": "Ikeja",
        "state": "Lagos",
        "address": "30, Allen Avenue, Ikeja",
        "address2": "5, Allen Avenue, Ikeja"
    },
    "drop": {
        "city": "Yaba",
        "state": "Lagos",
        "address": "7, Adebiyi Street, Yaba",
        "address2": "10, Adebiyi Street, Yaba",
        "category": "Electronic",
        "width": 5,
        "height": 5,
        "weight": 5,
        "length": 5
    }
}
// Sample Response Body - 400 Bad Request
{
    "status": false,
    "message": "Pickups in Lagos or Intra-city deliveries must include lat/long or locationCode"
}
Get Locations