Create Delivery Request
Complete guide to initiating a delivery request on the Safaribid platform.
Create Delivery Request
The /deliveries endpoint is the core of the Safaribid Logistics API. It allows you to request a rider for immediate or scheduled fulfillment.
Endpoint
POST /v1/deliveriesThe Delivery Workflow
- Request: Your application sends a delivery request.
- Matching: Safaribid's engine identifies and notifies the nearest qualified riders.
- Acceptance: A rider accepts the request.
- Pickup: The rider arrives at the pickup location.
- Transit: The rider delivers the package to the destination.
- Completion: Delivery is confirmed via OTP or signature.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
pickup | Object | Yes | Pickup location and contact details. |
dropoff | Object | Yes | Destination and customer details. |
package | Object | Yes | Details about the items being delivered. |
payment_method | String | Yes | wallet, m-pesa, or cash. |
instructions | String | No | Special handling instructions. |
Pickup Object
{
"name": "Safaribid Business Store",
"phone": "+254700000000",
"address": "Westlands, Nairobi",
"lat": -1.2633,
"lng": 36.8000
}Dropoff Object
{
"name": "John Doe",
"phone": "+254711111111",
"address": "Kilimani, Nairobi",
"lat": -1.2833,
"lng": 36.8167
}Request Example
{
"pickup": {
"name": "The Hub Karen",
"phone": "+254700123456",
"address": "Dagoretti Rd, Nairobi"
},
"dropoff": {
"name": "Jane Smith",
"phone": "+254722123456",
"address": "State House Rd, Nairobi"
},
"package": {
"type": "electronics",
"weight": 2.5,
"description": "Fragile: Laptop"
},
"payment_method": "wallet"
}Response Example
{
"id": "del_8x2j9k1",
"status": "searching",
"eta": "15 mins",
"tracking_url": "https://track.safaribid.com/del_8x2j9k1",
"created_at": "2026-05-14T10:00:00Z"
}Implementation
const delivery = await client.deliveries.create({
pickup: {
name: 'The Hub Karen',
address: 'Dagoretti Rd, Nairobi'
},
dropoff: {
name: 'Jane Smith',
address: 'State House Rd, Nairobi'
},
package: {
type: 'electronics',
weight: 2.5
},
payment_method: 'wallet'
});$delivery = $client->deliveries->create([
'pickup' => ['name' => 'The Hub', 'address' => 'Karen'],
'dropoff' => ['name' => 'Jane', 'address' => 'State House'],
'package' => ['type' => 'electronics', 'weight' => 2.5],
'payment_method' => 'wallet'
]);delivery = client.deliveries.create(
pickup={'name': 'The Hub', 'address': 'Karen'},
dropoff={'name': 'Jane', 'address': 'State House'},
package={'type': 'electronics', 'weight': 2.5},
payment_method='wallet'
)Scheduling Deliveries
You can schedule a delivery for later by providing a scheduled_at timestamp (ISO 8601).
{
"scheduled_at": "2026-05-15T09:00:00Z",
"pickup": { ... },
"dropoff": { ... }
}