Skip to main content

Overview

Retrieve detailed information about a specific delivery using either its id (UUID) or trackingId.
Required permission: delivery:read

Endpoint

GET /api/deliveries/get

Request

Headers

X-API-Key
string
required
Your Chidori API key

Query parameters

Provide either id OR trackingId:
id
string
The unique delivery ID (UUID)
trackingId
string
The human-readable tracking ID (e.g., CHI-ABC123)

Response

Success response

status
boolean
Always true for successful requests
data
object
Complete delivery object with all details including:
  • Delivery ID and tracking ID
  • Status and timestamps
  • Pickup and destination coordinates
  • Pricing information
  • Driver details (when assigned)
  • Payment status

Examples

curl "https://api.chidori.africa/api/deliveries/get?id=abc123-def456-ghi789" \
  -H "X-API-Key: sk_live_xxx.yyy"
{
  "status": true,
  "data": {
    "id": "abc123-def456-ghi789",
    "trackingId": "CHI-ABC123",
    "deliveryStatus": "IN_TRANSIT",
    "deliveryName": "Office Supplies",
    "deliveryType": "SendDelivery",
    "pickup": {
      "lat": 6.5244,
      "lon": 3.3792,
      "address": "123 Main Street, Lagos"
    },
    "destination": {
      "lat": 6.4654,
      "lon": 3.4064,
      "address": "456 Business Ave, Lagos"
    },
    "deliveryAmount": 2500,
    "isPaid": true,
    "paidAt": "2025-01-15T10:30:00.000Z",
    "bulk": null,
    "driver": {
      "id": "driver-123",
      "name": "John Driver",
      "phone": "+2348011111111",
      "vehicleType": "Motorcycle"
    },
    "receiverPhoneNumber": "+2348012345678",
    "senderPhoneNumber": "+2348087654321",
    "additionalNotes": "Please call before delivery",
    "createdAt": "2025-01-15T10:00:00.000Z",
    "updatedAt": "2025-01-15T10:45:00.000Z"
  }
}

Delivery statuses

StatusDescription
PENDINGDelivery created, awaiting payment
PAIDPayment received, awaiting driver assignment
ASSIGNEDDriver assigned to the delivery
PICKED_UPDriver has picked up the package
IN_TRANSITPackage is on the way to destination
DELIVEREDPackage successfully delivered
CANCELLEDDelivery was cancelled

Use cases

Use the trackingId to let customers check their delivery status:
async function getDeliveryStatus(trackingId) {
  const response = await fetch(
    `https://api.chidori.africa/api/deliveries/get?trackingId=${trackingId}`,
    { headers: { 'X-API-Key': apiKey } }
  );
  const { data } = await response.json();
  return {
    status: data.deliveryStatus,
    driver: data.driver,
    estimatedTime: data.estimatedDeliveryTime
  };
}
Use the delivery id to sync with your internal order system:
async function syncDeliveryStatus(deliveryId) {
  const response = await fetch(
    `https://api.chidori.africa/api/deliveries/get?id=${deliveryId}`,
    { headers: { 'X-API-Key': apiKey } }
  );
  const { data } = await response.json();
  
  await updateOrderInDatabase({
    deliveryStatus: data.deliveryStatus,
    isPaid: data.isPaid,
    driverAssigned: !!data.driver
  });
}

Next steps