Skip to main content

Overview

Create multiple deliveries at once using either a bulkId from bulk pricing or an array of tempDeliveryIds. This is efficient for multi-stop deliveries from a single pickup location.
Required permission: delivery:create

Endpoint

POST /api/deliveries/create-bulk

Request

Headers

X-API-Key
string
required
Your Chidori API key
Content-Type
string
required
Must be application/json

Body parameters

You must provide either bulkId OR tempDeliveryIds:
bulkId
string
The bulk ID from the bulk pricing response. Creates all deliveries in the bulk.
tempDeliveryIds
array
Array of temporary delivery IDs to create. Use this for selective creation.
deliveryName
string
A descriptive name for all deliveries in the bulk
deliveryType
string
Type of delivery. Options: SendDelivery or RequestPickup
receiverPhoneNumber
string
Default phone number for all recipients
senderPhoneNumber
string
Phone number of the sender
additionalNotes
string
Special instructions for all deliveries
scheduledTime
string
ISO 8601 datetime for scheduled deliveries

Response

Success response

status
boolean
Always true for successful requests
data
object

Examples

Using bulkId

curl -X POST https://api.chidori.africa/api/deliveries/create-bulk \
  -H "X-API-Key: sk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{
    "bulkId": "1a4f1a5e-5b79-4c4a-a0d4-4c5c7b7bb1aa",
    "deliveryName": "Daily Shipments",
    "senderPhoneNumber": "+2348087654321"
  }'

Using tempDeliveryIds

curl -X POST https://api.chidori.africa/api/deliveries/create-bulk \
  -H "X-API-Key: sk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{
    "tempDeliveryIds": [
      "7c9aa6f0-0f62-4bb2-a3aa-6c7bbf7b9a1a",
      "6c9aa6f0-0f62-4bb2-a3aa-6c7bbf7b9a1b"
    ],
    "deliveryName": "Selected Shipments"
  }'
{
  "status": true,
  "data": {
    "bulk": "1a4f1a5e-5b79-4c4a-a0d4-4c5c7b7bb1aa",
    "deliveries": [
      {
        "id": "abc123-def456-ghi789",
        "trackingId": "CHI-ABC123",
        "order": 1
      },
      {
        "id": "def456-ghi789-jkl012",
        "trackingId": "CHI-DEF456",
        "order": 2
      },
      {
        "id": "ghi789-jkl012-mno345",
        "trackingId": "CHI-GHI789",
        "order": 3
      }
    ]
  }
}

Bulk payment

When paying for bulk deliveries, you only need to make one payment call with any deliveryId from the bulk. The system automatically calculates and charges the total for all deliveries.
curl -X POST https://api.chidori.africa/api/payments/charge \
  -H "X-API-Key: sk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{
    "deliveryId": "abc123-def456-ghi789",
    "reference": "bulk_order_12345"
  }'
The payment response will include bulk field with the bulk ID, confirming all deliveries in the bulk were paid.

Next steps