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.
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" }'