eBakkie

eBakkie Partner API

Integrate eBakkie delivery services directly into your platform. Calculate rates, create deliveries, track shipments, and receive real-time webhook updates.

Quick Start

  1. Sign up at ebakkie.co.za/register
  2. Enable your merchant account at /merchants
  3. Create an API key
  4. Make your first API call (see below)

Base URL

https://api.ebakkie.co.za/api/partner

Authentication

Include your API key in the X-API-Key header with every request. Keys start with ebk_live_.

curl -X GET \
  https://api.ebakkie.co.za/api/partner/vehicle-types \
  -H "X-API-Key: ebk_live_your_api_key_here" \
  -H "Content-Type: application/json"

Error Handling

All errors return a consistent JSON format:

{
  "statusCode": 400,
  "message": "Pickup location is required",
  "error": "Bad Request",
  "timestamp": "2026-03-17T08:00:00.000Z",
  "path": "/api/partner/deliveries"
}
Status CodeMeaning
200Success
201Created
400Bad Request — invalid parameters
401Unauthorized — invalid or missing API key
403Forbidden — insufficient permissions
404Not Found
429Rate Limit Exceeded
500Internal Server Error

Endpoints

GET/vehicle-types

List vehicle types

Returns all active vehicle types with pricing information. Use the id field when creating deliveries.

Response:

[
  {
    "id": "04f17276-8431-46b5-bd84-3edbc14b3601",
    "name": "1-Ton Bakkie",
    "extra_info": "Perfect for small moves and single items",
    "image_url": "https://...",
    "base_fare": 350.00,
    "rate_per_km": 12.00,
    "rate_per_hour": 120.00,
    "min_fare": 80.00
  }
]
POST/rates

Calculate delivery rates

Returns estimated fare, distance, and duration for a delivery. Optionally filter by vehicle type.

Request body:

{
  "pickup_lat": -26.2041,
  "pickup_lng": 28.0473,
  "dropoff_lat": -25.7479,
  "dropoff_lng": 28.2293,
  "vehicle_type_id": "04f17276-..."  // optional — omit to get all rates
}

Response:

{
  "distance_km": 58.2,
  "duration_min": 52,
  "rates": [
    {
      "vehicle_type_id": "04f17276-...",
      "vehicle_name": "1-Ton Bakkie",
      "estimated_fare": 1048.40,
      "base_fare": 350.00,
      "distance_charge": 698.40,
      "convenience_fee": 0
    }
  ]
}
POST/deliveries

Create a delivery

Creates a new delivery and dispatches it to nearby drivers. Returns the delivery object with a tracking ID.

Request body:

{
  "pickup_address": "123 Main St, Sandton, Johannesburg",
  "pickup_lat": -26.2041,
  "pickup_lng": 28.0473,
  "dropoff_address": "456 Oak Ave, Hatfield, Pretoria",
  "dropoff_lat": -25.7479,
  "dropoff_lng": 28.2293,
  "vehicle_type_id": "04f17276-...",
  "notes": "Handle with care, fragile items",
  "recipient_name": "John Doe",
  "recipient_phone": "+27612345678",
  "webhook_url": "https://your-app.com/webhooks/ebakkie"  // optional
}

Response:

{
  "id": "ride-uuid-here",
  "status": "pending",
  "pickup_address": "123 Main St, Sandton, Johannesburg",
  "dropoff_address": "456 Oak Ave, Hatfield, Pretoria",
  "estimated_fare": 1048.40,
  "estimated_distance_km": 58.2,
  "estimated_duration_min": 52,
  "vehicle_type": "1-Ton Bakkie",
  "created_at": "2026-03-17T08:00:00.000Z"
}
GET/deliveries

List deliveries

Returns a paginated list of your deliveries. Supports filtering by status and date range.

Request body:

Query parameters:
  ?status=completed       // pending|accepted|arrived|started|completed|cancelled
  &from=2026-03-01       // ISO date
  &to=2026-03-17         // ISO date
  &page=1                // pagination
  &limit=20              // max 100

Response:

{
  "data": [
    {
      "id": "ride-uuid",
      "status": "completed",
      "pickup_address": "...",
      "dropoff_address": "...",
      "final_fare": 1048.40,
      "driver_name": "Sipho M.",
      "created_at": "2026-03-17T08:00:00.000Z",
      "completed_at": "2026-03-17T09:12:00.000Z"
    }
  ],
  "total": 42,
  "page": 1,
  "limit": 20
}
GET/deliveries/:id

Get delivery details

Returns full delivery details including driver info, live location, fare breakdown, and timeline.

Response:

{
  "id": "ride-uuid",
  "status": "started",
  "pickup_address": "123 Main St, Sandton",
  "dropoff_address": "456 Oak Ave, Pretoria",
  "pickup_lat": -26.2041,
  "pickup_lng": 28.0473,
  "dropoff_lat": -25.7479,
  "dropoff_lng": 28.2293,
  "estimated_fare": 1048.40,
  "final_fare": null,
  "driver": {
    "name": "Sipho M.",
    "phone": "+27612345678",
    "rating": 4.8,
    "vehicle": "White Toyota Hilux (CA 123-456)"
  },
  "timeline": {
    "created_at": "2026-03-17T08:00:00.000Z",
    "accepted_at": "2026-03-17T08:02:30.000Z",
    "arrived_at": "2026-03-17T08:15:00.000Z",
    "started_at": "2026-03-17T08:20:00.000Z",
    "completed_at": null
  }
}
GET/deliveries/:id/tracking

Get live tracking

Returns real-time driver location and ETA for active deliveries.

Response:

{
  "driver_lat": -26.1523,
  "driver_lng": 28.0891,
  "heading": 45,
  "speed_kmh": 62,
  "eta_minutes": 18,
  "distance_remaining_km": 14.3,
  "updated_at": "2026-03-17T08:35:00.000Z"
}
POST/deliveries/:id/cancel

Cancel a delivery

Cancels a pending or accepted delivery. Cancellation fees may apply depending on the stage and time elapsed.

Request body:

{
  "reason": "Customer changed their mind"  // optional
}

Response:

{
  "id": "ride-uuid",
  "status": "cancelled",
  "cancellation_fee": 50.00,
  "cancelled_at": "2026-03-17T08:05:00.000Z"
}

Webhooks

Register a webhook URL to receive real-time delivery status updates. We send a POST request to your URL whenever a delivery status changes.

POST/webhooks

Register a webhook

Register a URL to receive delivery event notifications.

Request body:

{
  "url": "https://your-app.com/webhooks/ebakkie",
  "events": ["delivery.accepted", "delivery.completed", "delivery.cancelled"]
}

Response:

{
  "id": "webhook-uuid",
  "url": "https://your-app.com/webhooks/ebakkie",
  "events": ["delivery.accepted", "delivery.completed", "delivery.cancelled"],
  "active": true,
  "created_at": "2026-03-17T08:00:00.000Z"
}

Webhook payload:

{
  "event": "delivery.completed",
  "delivery_id": "ride-uuid",
  "status": "completed",
  "final_fare": 1048.40,
  "driver_name": "Sipho M.",
  "completed_at": "2026-03-17T09:12:00.000Z",
  "timestamp": "2026-03-17T09:12:01.000Z"
}

Available events:

EventDescription
delivery.acceptedDriver accepted the delivery
delivery.arrivedDriver arrived at pickup location
delivery.startedGoods picked up, delivery in transit
delivery.completedDelivery completed successfully
delivery.cancelledDelivery was cancelled

Rate Limits

Default: 60 requests per minute per API key. Rate limit headers are included in every response.

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetWindow reset time (Unix timestamp)

Code Examples

Node.js / JavaScript

const axios = require('axios');

const ebakkie = axios.create({
  baseURL: 'https://api.ebakkie.co.za/api/partner',
  headers: { 'X-API-Key': 'ebk_live_your_key_here' }
});

// Calculate rates
const rates = await ebakkie.post('/rates', {
  pickup_lat: -26.2041, pickup_lng: 28.0473,
  dropoff_lat: -25.7479, dropoff_lng: 28.2293,
});
console.log(rates.data);

// Create a delivery
const delivery = await ebakkie.post('/deliveries', {
  pickup_address: '123 Main St, Sandton',
  pickup_lat: -26.2041, pickup_lng: 28.0473,
  dropoff_address: '456 Oak Ave, Pretoria',
  dropoff_lat: -25.7479, dropoff_lng: 28.2293,
  vehicle_type_id: '04f17276-...',
  recipient_name: 'John Doe',
  recipient_phone: '+27612345678',
});
console.log(delivery.data);

Python

import requests

API_KEY = "ebk_live_your_key_here"
BASE = "https://api.ebakkie.co.za/api/partner"
headers = {"X-API-Key": API_KEY, "Content-Type": "application/json"}

# Calculate rates
rates = requests.post(f"{BASE}/rates", json={
    "pickup_lat": -26.2041, "pickup_lng": 28.0473,
    "dropoff_lat": -25.7479, "dropoff_lng": 28.2293,
}, headers=headers)
print(rates.json())

# Create delivery
delivery = requests.post(f"{BASE}/deliveries", json={
    "pickup_address": "123 Main St, Sandton",
    "pickup_lat": -26.2041, "pickup_lng": 28.0473,
    "dropoff_address": "456 Oak Ave, Pretoria",
    "dropoff_lat": -25.7479, "dropoff_lng": 28.2293,
    "vehicle_type_id": "04f17276-...",
    "recipient_name": "John Doe",
    "recipient_phone": "+27612345678",
}, headers=headers)
print(delivery.json())

PHP

$apiKey = "ebk_live_your_key_here";
$base = "https://api.ebakkie.co.za/api/partner";

$ch = curl_init("$base/rates");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-API-Key: $apiKey",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "pickup_lat" => -26.2041, "pickup_lng" => 28.0473,
        "dropoff_lat" => -25.7479, "dropoff_lng" => 28.2293,
    ]),
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
print_r($data);

Need help integrating?

Our developer support team is here to help with integration, testing, and going live.

[email protected]|WhatsApp: 069 642 4230