Zopping

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-capacity with capacity, 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-trip with referenceNumbers bins orders into new/existing trips.
  • ETAs — GET /trip-eta?tripId=..&storeId=.. returns per-order ETA/distance.
  • Close — PUT /trip/{id} with status: CLOSE (then FIN_CLOSE with the COD/ online payment settlement per order).

Trip status: DRAFT → OPEN → CLOSE → FIN_CLOSE.

3. Vehicles & agents

  • Vehicles — POST/GET/PUT /vehicle (number, type 2W/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-planner forecasts 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 the GET /track widget.

5. The order → delivery flow

  1. Order becomes ready (dispatched) in Orders.
  2. Assign it to a trip — manually (POST /trip) or via allocate-trip (automation can bin-pack using planner + zone capacity).
  3. Agent checks in, picks, and starts the trip; GPS streams to tripLocations.
  4. Each delivery is marked with proof (PUT /trip/{id}/order — driver app).
  5. 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-etatripLocations (GPS push)
vehicle, vehicle-vendor, vehicle-attendance, vehicle-plannertrip/{id}/order (delivery proof)
zone-capacity, slot-capacity, serviceable-area, delivery-areapickingQueue
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.