Run your own logistics
Deliver with your own fleet instead of (or alongside) third-party couriers —
trips, delivery agents, capacity and live tracking. Requires the
LogisticsSupport extension. Endpoints are under
https://zopping.com/api/logistics-service.
Some endpoints are driver-app facing (live GPS, proof-of-delivery); the rest are partner-callable for orchestration and tracking. The split is at the end.
1. Configure capacity & serviceability
Decide where and how much you can deliver before taking orders:
- Delivery areas — which pincodes/buildings/polygons/radii a store serves
(
POST /delivery-area,configType:PINCODE·BUILDING·POLYGON·RADIAL). - Zone & slot capacity — max deliveries per zone/slot/day
(
POST /zone-capacity,POST /slot-capacitywithcapacity,cutOffTime). - Serviceability check — at checkout, confirm a location+time is deliverable
(
GET /serviceable-area?organizationId=<org-id>&storeId=<store-id>&latitude=..&longitude=..).
2. Build trips
A trip groups orders for one vehicle + agent.
curl -X POST https://zopping.com/api/logistics-service/trip \
-H "Authorization: Bearer $ZOPPING_TOKEN" -H "Content-Type: application/json" \
-d '{ "organizationId":"<org-id>","storeId":"<store-id>","vehicleId":"12","deliveryAgentId":"88","orderNumbers":["ORD-55012","ORD-55013"] }'
- List / read —
GET /trip(filters:storeId,status,date,vehicleId,deliveryAgentId),GET /trip/{id}. - Allocate dynamically —
POST /allocate-tripwithreferenceNumbersbins orders into new/existing trips. - ETAs —
GET /trip-eta?tripId=..&storeId=..returns per-order ETA/distance. - Close —
PUT /trip/{id}withstatus: CLOSE(thenFIN_CLOSEwith the COD/ onlinepaymentsettlement per order).
Trip status: DRAFT → OPEN → CLOSE → FIN_CLOSE.
3. Vehicles & agents
- Vehicles —
POST/GET/PUT /vehicle(number,type2W/4W,vendorId,status). - Fleet vendors —
POST/GET /vehicle-vendor. - Attendance (shift check-in) —
POST/GET/PUT /vehicle-attendance; a vehicle must be checked in before it can take a trip. - Planning —
POST /vehicle-plannerforecasts how many regular/ad-hoc vehicles a shift needs.
4. Live tracking
- The driver app pushes GPS to
POST /tripLocations(tripId,locations[]). - Customers see the live position via
GET /order-location?organizationId=<org-id>&orderId=ORD-55012(returns location, vehicle,trackingId,trackURL) and theGET /trackwidget.
5. The order → delivery flow
- Order becomes ready (dispatched) in Orders.
- Assign it to a trip — manually (
POST /trip) or viaallocate-trip(automation can bin-pack using planner + zone capacity). - Agent checks in, picks, and starts the trip; GPS streams to
tripLocations. - Each delivery is marked with proof (
PUT /trip/{id}/order— driver app). - Close the trip (
CLOSE), then settle (FIN_CLOSE).
Partner-callable vs driver-app
| Partner-callable (orchestration & tracking) | Driver-app / internal |
|---|---|
trip (create/list/close), allocate-trip, trip-eta | tripLocations (GPS push) |
vehicle, vehicle-vendor, vehicle-attendance, vehicle-planner | trip/{id}/order (delivery proof) |
zone-capacity, slot-capacity, serviceable-area, delivery-area | pickingQueue |
order-location, delivery-agent-stats |
Or hand off to a courier
Prefer not to run a fleet? Hand deliveries to a third-party courier instead — see Courier integration.
Reference: Fulfillment & Delivery · Delivery slots & capacity.