Safaribid Docs

Track Delivery

Learn how to monitor riders and delivery status in real-time.

Track Delivery

Safaribid provides high-precision tracking for all active deliveries. You can monitor rider movement, ETAs, and status transitions through our Tracking API and webhooks.

Real-time Tracking

Once a rider is assigned to a delivery, you can retrieve their real-time coordinates and estimated time of arrival.

Endpoint

GET /v1/deliveries/:id/tracking

Response Example

{
  "delivery_id": "del_8x2j9k1",
  "status": "in_transit",
  "rider": {
    "name": "Sam K.",
    "location": {
      "lat": -1.2921,
      "lng": 36.8219
    },
    "bearing": 145,
    "speed_kph": 22
  },
  "eta_minutes": 8,
  "distance_remaining_km": 2.4
}

Delivery Statuses

A delivery moves through several states during its lifecycle. Use these statuses to update your own application UI.

StatusDescription
pendingDelivery created, awaiting system processing.
searchingSystem is looking for the nearest available rider.
rider_assignedA rider has accepted the trip.
rider_arrivingRider is on the way to the pickup location.
at_pickupRider has arrived at the merchant's location.
picked_upPackage collected, delivery in transit.
deliveredPackage successfully handed over to the customer.
cancelledTrip terminated before completion.

Implementation Patterns

Polling

If you don't use webhooks, you can poll the tracking endpoint every 30-60 seconds while the delivery is in_transit.

const trackRider = setInterval(async () => {
  const tracking = await client.deliveries.getTracking('del_8x2j9k1');
  
  updateMap(tracking.rider.location);
  
  if (tracking.status === 'delivered') {
    clearInterval(trackRider);
  }
}, 30000);

For a more efficient integration, listen for delivery.in_transit and delivery.rider_arriving events via Webhooks.

Tracking Widget

Safaribid provides a pre-built tracking widget that you can embed in your customer-facing applications.

<script src="https://js.safaribid.com/v1/tracking.js"></script>
<div id="safaribid-tracking" data-id="del_8x2j9k1"></div>

On this page