Documentation

Customer logistics

Order tracking, delivery jobs for gig workers, and payouts on /client/logistics/*.

The logistics client API at /client/logistics/* serves two audiences with the same URL prefix: end-customers tracking their deliveries, and gig-economy delivery workers (drivers, couriers) receiving and completing jobs. The endpoints are differentiated by the customer's role — a regular customer sees their orders, a registered driver sees the job feed.

Init and registration

GET/client/logistics/initJWT
POST/client/logistics/registerJWT
GET/client/logistics/meJWT

init returns config the customer-side app needs (driver vs. customer detection, payment options, region settings). register is for becoming a delivery driver — accepts vehicle info, licence, insurance docs. me returns the current driver profile if the customer is registered as one.

Driver-side: jobs

GET/client/logistics/jobs/availableJWT
GET/client/logistics/jobsJWT
GET/client/logistics/jobs/:jobIdJWT
POST/client/logistics/jobsJWT

available is the open-job feed (jobs needing a driver). jobs is the driver's accepted jobs. The POST creates a logistics job (used by merchant-side flows or by drivers offering to take a custom delivery).

Accept and reject

PUT/client/logistics/jobs/:jobId/acceptJWT
PUT/client/logistics/jobs/:jobId/rejectJWT

Driver picks up or passes on a job. Auto-routing in the logistics module re-offers rejected jobs to the next driver.

Pickup and dropoff lifecycle

PUT/client/logistics/jobs/:jobId/start-pickupJWT
PUT/client/logistics/jobs/:jobId/arrive-pickupJWT
PUT/client/logistics/jobs/:jobId/complete-pickupJWT
PUT/client/logistics/jobs/:jobId/start-dropoffJWT
PUT/client/logistics/jobs/:jobId/arrive-dropoffJWT
PUT/client/logistics/jobs/:jobId/complete-dropoffJWT
PUT/client/logistics/jobs/:jobId/completeJWT

The full state machine. Each transition writes a timestamp and (with tracking) a GPS location, which feeds the customer's order-tracking view.

Tracking and proof

PUT/client/logistics/jobs/:jobId/trackingJWT
POST/client/logistics/jobs/:jobId/imagesJWT
GET/client/logistics/jobs/:jobId/imagesJWT
POST/client/logistics/uploadJWT

tracking posts the driver's current location periodically. images is for proof-of-delivery photos.

Issues and messages

POST/client/logistics/jobs/:jobId/issuesJWT
GET/client/logistics/jobs/:jobId/issuesJWT
POST/client/logistics/jobs/:jobId/messagesJWT
GET/client/logistics/jobs/:jobId/messagesJWT
PUT/client/logistics/jobs/:jobId/messages/readJWT
GET/client/logistics/jobs/:jobId/contactsJWT

Issues are problems flagged on a job (item missing, address wrong). Messages are the chat thread between driver and customer. Contacts returns the relevant phone numbers for both parties.

Customer-side: orders and tracking

POST/client/logistics/ordersJWT
GET/client/logistics/ordersJWT
GET/client/logistics/orders/:jobId/trackJWT
PUT/client/logistics/orders/:jobId/cancelJWT
PUT/client/logistics/orders/:jobIdJWT

The customer side: book a delivery, list orders, track progress, cancel or modify. track returns current status, ETA, and the driver's last reported location.

Quotes

POST/client/logistics/quoteJWT
POST/client/logistics/quote/validatedJWT

Pre-book quote: customer enters pickup, dropoff, and item details, gets a price. validated runs a stricter address verification pass before confirming.

Payment

GET/client/logistics/stripe/configJWT
POST/client/logistics/stripe/intentJWT
POST/client/logistics/stripe/verifyJWT
POST/client/logistics/paypal/createJWT
POST/client/logistics/paypal/captureJWT
POST/client/logistics/orders/:jobId/payment-intentJWT
POST/client/logistics/orders/:jobId/complete-paymentJWT

Standard Stripe / PayPal payment surfaces, scoped to a logistics job.

Tipping and rating

POST/client/logistics/orders/:jobId/rateJWT
POST/client/logistics/orders/:jobId/tipJWT
POST/client/logistics/orders/:jobId/tip/completeJWT

Post-delivery rating goes 1-5 stars on the driver. Tips are a separate payment after-the-fact; the driver's wallet receives the tip via the finance module.

Driver presence

PUT/client/logistics/availabilityJWT
PUT/client/logistics/locationJWT

Drivers report online/offline and current location. Used by the dispatch service to pick the closest driver for a new job.

Driver payouts

GET/client/logistics/payout-methodsJWT
POST/client/logistics/payout-methodsJWT
PUT/client/logistics/payout-methods/:methodIdJWT
DELETE/client/logistics/payout-methods/:methodIdJWT
PUT/client/logistics/payout-methods/:methodId/defaultJWT
GET/client/logistics/payoutsJWT
POST/client/logistics/payouts/requestJWT

Driver-side payout management — same shape as the finance customer wallet but scoped to logistics earnings.

Payment history

GET/client/logistics/payments/:jobIdJWT
GET/client/logistics/paymentsJWT

Per-job and aggregate payment history for the driver — what they've earned and when.