Creating a Delivery

Relay lets you request on-demand package deliveries through Chowdeck's rider network. The flow is always two steps -- get a fee quote first, then create the delivery using the returned fee ID.

Step 1 -- Get a delivery fee

curl --request POST \
  --url https://api.relay.chowdeck.com/relay/delivery/fee \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "source_address": {
      "latitude": 6.601838,
      "longitude": 3.351486
    },
    "destination_address": {
      "latitude": 6.578997,
      "longitude": 3.349467
    },
    "estimated_order_amount": 500000
  }'

Request body:

FieldTypeRequiredDescription
source_addressobjectConditionalCoordinates of the pickup location. Required if source_address_string is not provided.
source_address.latitudenumberLatitude of the pickup point
source_address.longitudenumberLongitude of the pickup point
source_address_stringstringConditionalHuman-readable pickup address. Required if source_address is not provided.
destination_addressobjectConditionalCoordinates of the drop-off location. Required if destination_address_string is not provided.
destination_address.latitudenumberLatitude of the drop-off point
destination_address.longitudenumberLongitude of the drop-off point
destination_address_stringstringConditionalHuman-readable drop-off address. Required if destination_address is not provided.
estimated_order_amountintegerNoEstimated value of the items being delivered, in the smallest currency unit. May affect pricing — pass 0 or omit if not applicable.

Provide either coordinates or an address string for each side of the delivery — not both required.

A successful response returns a fee object. Save the id -- you'll pass it as fee_id in the next step.

{
  "status": "success",
  "data": {
    "id": 12345,
    "total_amount": 80000,
    "delivery_amount": 70000,
    "service_amount": 50000,
    "safety_fee": 10000
  }
}

All amounts are in the smallest currency unit. Divide by 100 for the display value (e.g. 80000 = ₦800).

Fee quotes are not permanent. Create your delivery promptly after getting a quote.


Step 2 -- Create the delivery

curl --request POST \
  --url https://api.relay.chowdeck.com/relay/delivery \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "fee_id": 12345,
    "reference": "my-delivery-ref-001",
    "item_type": "documents",
    "user_action": "sending",
    "source_contact": {
      "name": "Jane Smith",
      "phone": "08100000000"
    },
    "destination_contact": {
      "name": "John Doe",
      "phone": "08100000001"
    },
    "customer_delivery_note": "Please handle with care",
    "delivery_pin": 4821
  }'

Request body:

FieldTypeRequiredDescription
fee_idintegerYesThe id from the Get Delivery Fee response
item_typestringYesType of item being delivered (e.g. "documents", "electronics")
user_actionstringYes"sending" if the source contact is initiating, "receiving" if the destination contact is
source_contactobjectYesDetails of the sender
source_contact.namestringYesFull name of the sender
source_contact.phonestringYesPhone number of the sender
source_contact.emailstringNoEmail address of the sender
source_contact.country_codestringNoCountry code (e.g. "NG")
destination_contactobjectYesDetails of the recipient
destination_contact.namestringYesFull name of the recipient
destination_contact.phonestringYesPhone number of the recipient
destination_contact.emailstringNoEmail address of the recipient
destination_contact.country_codestringNoCountry code (e.g. "NG")
referencestringNoYour own unique reference for this delivery. Auto-generated if not provided.
estimated_order_amountintegerNoEstimated value of the items, in the smallest currency unit
customer_delivery_notestringNoInstructions for the rider
delivery_pinintegerNo4-digit PIN (1000–9999) the recipient must present to the rider to confirm delivery
notification_channelsarrayNoChannels to notify contacts: "sms", "email", "whatsapp"

A successful response returns the created delivery:

{
  "status": "success",
  "message": "Delivery created successfully",
  "data": {
    "id": 98765,
    "reference": "my-delivery-ref-001",
    "delivery_price": 80000,
    "delivery_pin": 4821,
    "tracking_url": "https://track.chowdeck.com/...",
    "status": "preparing"
  }
}

Track a delivery

curl --request GET \
  --url https://api.relay.chowdeck.com/relay/delivery/{reference} \
  --header 'Authorization: Bearer YOUR_API_KEY'

Delivery statuses:

StatusDescription
preparingDelivery created — rider assignment in progress
awaiting_pickupRider assigned and heading to pickup location
in_transitRider has collected the package
successPackage delivered successfully
rejectedDelivery was cancelled

Error responses

All failed requests return this shape:

{
  "status": "failed",
  "message": "..."
}