Overview
Calculate delivery price estimates for multiple destinations from a single pickup location. This is ideal for multi-stop deliveries or batch shipments. The endpoint returns a bulkId and individual tempDeliveryIds for each stop.
Required permission: pricing:read
Endpoint
Request
Body parameters
Pickup location coordinates (shared for all stops) Latitude of the pickup location
Longitude of the pickup location
Array of destination coordinates
Response
Success response
Always true for successful requests
Aggregated totals for all stops Total distance in kilometers
Total estimated duration in seconds
Total cost for all deliveries in Naira
Whether a promotional discount was applied
Percentage discount applied
Encoded polyline of the complete route (can be null)
Bulk delivery ID for creating all deliveries at once
Array of temporary delivery IDs, one for each stop
Examples
curl -X POST https://api.chidori.africa/api/pricing/bulk \
-H "X-API-Key: sk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{
"pickup": {
"lat": 6.5244,
"lon": 3.3792
},
"stops": [
{"lat": 6.4654, "lon": 3.4064},
{"lat": 6.4321, "lon": 3.4567},
{"lat": 6.4890, "lon": 3.3901}
]
}'
200 Success
400 Location Out of Bounds
{
"status" : true ,
"data" : {
"totals" : {
"distanceKm" : 30.12 ,
"durationSec" : 2400 ,
"pricing" : {
"distance_km" : 30.12 ,
"total_cost" : 7000 ,
"promo_applied" : false ,
"promo_percent" : 0
}
},
"geometry" : null ,
"bulkId" : "1a4f1a5e-5b79-4c4a-a0d4-4c5c7b7bb1aa" ,
"tempDeliveryIds" : [
"7c9aa6f0-0f62-4bb2-a3aa-6c7bbf7b9a1a" ,
"6c9aa6f0-0f62-4bb2-a3aa-6c7bbf7b9a1b" ,
"5c9aa6f0-0f62-4bb2-a3aa-6c7bbf7b9a1c"
]
}
}
Creating bulk deliveries
After getting bulk pricing, you have two options:
Option 1: Create all at once using bulkId
Use the bulkId to create all deliveries in a single request:
curl -X POST https://api.chidori.africa/api/deliveries/create-bulk \
-H "X-API-Key: sk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{"bulkId": "1a4f1a5e-5b79-4c4a-a0d4-4c5c7b7bb1aa"}'
Option 2: Create individually using tempDeliveryIds
Create each delivery separately using individual tempDeliveryIds:
curl -X POST https://api.chidori.africa/api/deliveries/create \
-H "X-API-Key: sk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{"tempDeliveryId": "7c9aa6f0-0f62-4bb2-a3aa-6c7bbf7b9a1a"}'
Bulk payment
When paying for bulk deliveries, you can pay for all deliveries in the bulk by passing any deliveryId from the bulk. The system automatically calculates the total for all deliveries in that bulk.
Create Bulk Deliveries Create multiple deliveries from a bulk pricing request