Direct Booking
Create automatically priced CLICK, GO_LIGHT, and EXPRESS bookings.
At a glance
Direct bookings support CLICK, GO_LIGHT, and EXPRESS. Use manual quote flows for GO_BULK and HAUL.
Click batches
A Click batch has one pickup, two to the configured maximum (30 by default) separate deliveries, and one rider. Each delivery keeps its order ID, tracking number, delivery PIN, price and invoice line. The batch has its own ID and reference. Existing single-booking endpoints remain available.
- Quote all destinations
POST /partner-api/click-batches/quoteswithpickupanddeliveries. Each delivery needs a uniqueclientReference, an address and numeric latitude/longitude. Phone, recipientName, externalReference, packageDescription and deliveryNote are optional. City is derived from the address; do not repeat it. - Confirm the combined price
POST /partner-api/click-batcheswith{ "quoteId": "cbq_..." }. All orders and invoice lines commit together after a fresh combined credit/prepaid check. Retrying the same quote returns the same batch. - Follow individual deliveries
GET /partner-api/click-batches/{id}returns every delivery, its order ID, tracking number, status, charge and invoice reference. Use the existing booking tracking endpoint for each order. Booking webhooks includebooking.clickBatchwith the batch ID, reference and sequence.
{ "pickup": { "address": "12 Marina Road, Lagos", "latitude": 6.4541, "longitude": 3.3947 }, "deliveries": [ { "clientReference": "customer-001", "address": "2 Herbert Macaulay Way, Yaba, Lagos", "latitude": 6.5102, "longitude": 3.3702 }, { "clientReference": "customer-002", "address": "4 Montgomery Road, Yaba, Lagos", "latitude": 6.506, "longitude": 3.376 } ]}| Action | Endpoint | Rules |
|---|---|---|
| List | GET /partner-api/click-batches?page=1 | Twenty batches per page. Only the API key’s organization and data mode are visible. |
| Quote additions | POST /partner-api/click-batches/{id}/delivery-quotes | Quote one or more new deliveries before assignment. The existing pickup and scheduled time are preserved. |
| Add deliveries | POST /partner-api/click-batches/{id}/deliveries | quoteId and current revision are required. Reusing the quote is safe. The Admin setting controls the maximum current deliveries per batch (30 by default). Removed or cancelled deliveries can be replaced before assignment. |
| Remove | POST /partner-api/click-batches/{id}/deliveries/{orderId}/remove | revision required. Before assignment only. Removal retains the live order and its original invoice attribution. Set dispatchSeparately: true to offer it separately; otherwise it awaits manual assignment. |
| Cancel one | POST /partner-api/click-batches/{id}/deliveries/{orderId}/cancel | Uses the existing delivery cancellation and billing rules. Other deliveries continue. |
| Cancel remaining | POST /partner-api/click-batches/{id}/cancel | Cancels eligible pre-pickup deliveries and returns a result for each. Inspect every result; a batch cancellation may have partial failures. |
The batch total is the sum of its invoice lines, including deliveries later removed from dispatch. Delivery charges follow the existing Click pricing rules and are finalized using actual delivery duration where applicable. Cancelled lines follow the existing adjustment/refund rules. Invoice batch headings and subtotals never add a second charge. Scheduled pickup is optional, between one hour and seven days ahead.
Supported services
| Service | Endpoints | Notes |
|---|---|---|
| CLICK | POST /partner-api/booking-quotes, then POST /partner-api/bookings | Standard direct booking flow. |
| GO_LIGHT | POST /partner-api/booking-quotes, then POST /partner-api/bookings | Multi-leg GO delivery with supported home or hub routes. |
| EXPRESS | POST /partner-api/booking-quotes, then POST /partner-api/bookings | Multi-leg Express delivery. Requires packageWeightKg and is capped by backend validation. |
Create a quote
Home pickup routes need pickup address and coordinates. Home delivery routes need dropoff address and coordinates. Hub routes use IDs from GET /partner-api/hubs.
| Need | Fields | |
|---|---|---|
| Home pickup | pickupMethod=HOME_PICKUP, pickupAddress, pickupLatitude, pickupLongitude | Default pickup behavior when pickupMethod is omitted. |
| Sender drops at hub | pickupMethod=HUB_DROPOFF, pickupHubId | Use a hub ID from GET /partner-api/hubs. |
| Home delivery | dropoffMethod=HOME_DELIVERY, dropoffAddress, dropoffLatitude, dropoffLongitude | Default dropoff behavior when dropoffMethod is omitted. |
| Receiver picks at hub | dropoffMethod=HUB_PICKUP, dropoffHubId | Use a hub ID from GET /partner-api/hubs. |
curl -X POST https://services.enviablelogistics.com/api/v1/partner-api/booking-quotes \ -H "X-ELA-API-Key: ela_live_xxx" \ -H "Idempotency-Key: quote-demo-1001" \ -H "Content-Type: application/json" \ -d '{ "serviceType": "CLICK", "vehicleType": "BIKE", "externalReference": "DEMO-1001", "pickupAddress": "Demo pickup address, Lagos", "pickupLatitude": 6.450001, "pickupLongitude": 3.390001, "dropoffAddress": "Demo dropoff address, Lagos", "dropoffLatitude": 6.460001, "dropoffLongitude": 3.400001, "packageDescription": "Small parcel - documents" }'curl -X POST https://services.enviablelogistics.com/api/v1/partner-api/booking-quotes \ -H "X-ELA-API-Key: ela_live_xxx" \ -H "Idempotency-Key: quote-go-hub-demo-1002" \ -H "Content-Type: application/json" \ -d '{ "serviceType": "GO_LIGHT", "vehicleType": "VAN", "deliveryMode": "STANDARD", "externalReference": "DEMO-1002", "pickupMethod": "HUB_DROPOFF", "pickupHubId": "hub_partner_lagos", "dropoffMethod": "HOME_DELIVERY", "dropoffAddress": "Demo dropoff address, Aba", "dropoffLatitude": 5.1214, "dropoffLongitude": 7.3733, "packageDescription": "Two cartons of packaged goods" }'curl -X POST https://services.enviablelogistics.com/api/v1/partner-api/booking-quotes \ -H "X-ELA-API-Key: ela_live_xxx" \ -H "Idempotency-Key: quote-express-hub-demo-1003" \ -H "Content-Type: application/json" \ -d '{ "serviceType": "EXPRESS", "vehicleType": "VAN", "packageWeightKg": 12.5, "externalReference": "DEMO-1003", "pickupMethod": "HUB_DROPOFF", "pickupHubId": "hub_partner_lagos", "dropoffMethod": "HUB_PICKUP", "dropoffHubId": "hub_partner_aba", "packageDescription": "Urgent stock transfer" }'Create the booking
Create the booking with the returned quoteId before the quote expires. Repeat the same route fields used to generate the quote, including any hub method and hub ID fields. Use a fresh idempotency key for booking creation.
curl -X POST https://services.enviablelogistics.com/api/v1/partner-api/bookings \ -H "X-ELA-API-Key: ela_live_xxx" \ -H "Idempotency-Key: booking-demo-1001" \ -H "Content-Type: application/json" \ -d '{ "quoteId": "quote_demo_123", "serviceType": "CLICK", "vehicleType": "BIKE", "externalReference": "DEMO-1001", "pickupAddress": "Demo pickup address, Lagos", "pickupLatitude": 6.450001, "pickupLongitude": 3.390001, "dropoffAddress": "Demo dropoff address, Lagos", "dropoffLatitude": 6.460001, "dropoffLongitude": 3.400001, "packageDescription": "Small parcel - documents" }'curl -X POST https://services.enviablelogistics.com/api/v1/partner-api/bookings \ -H "X-ELA-API-Key: ela_live_xxx" \ -H "Idempotency-Key: booking-go-hub-demo-1002" \ -H "Content-Type: application/json" \ -d '{ "quoteId": "quote_go_hub_demo_123", "serviceType": "GO_LIGHT", "vehicleType": "VAN", "deliveryMode": "STANDARD", "externalReference": "DEMO-1002", "pickupMethod": "HUB_DROPOFF", "pickupHubId": "hub_partner_lagos", "dropoffMethod": "HOME_DELIVERY", "dropoffAddress": "Demo dropoff address, Aba", "dropoffLatitude": 5.1214, "dropoffLongitude": 7.3733, "packageDescription": "Two cartons of packaged goods" }'