try out ↗

← API Index · ↑ methods


/api/driver

Methods

Endpoint Description
/api/driver/assign1 Assign a reusable box to a customer. Box-level rejections (box_not_existing, box_locked) are returned as result codes with HTTP 200, see the DriverAssignResult type.
/api/driver/boxexchange1 Report the number of boxes delivered to and returned by a customer. At least one of delivered/returned must be non-zero.
/api/driver/bpos1 Store the geo position where the box is placed for a customer address. Requires power driver permission.
/api/driver/cadr1 Correct the delivery geo position (park position) of a customer address. Requires power driver permission.
/api/driver/deassign1 Remove a box assignment from a customer. The box must currently be assigned to the given cid. Box-level rejections (box_not_existing, unassigned, wrong_cid) are returned as result codes with HTTP 200, see the DriverAssignResult type.
/api/driver/delpause Delete a previously recorded driver pause, returning a PauseResult with id=0 to confirm deletion. The pauseid alone is sufficient - the tourid used as consistency guard in the delete is resolved from the pause row itself. ddate or tourid may optionally be supplied (PCG call shape); they are then cross-checked against the pause row and a mismatch is rejected.
/api/driver/dlvr1 Mark an order as delivered. Logs the delivery, updates the tour delivery state and may trigger delivery notifications (mail, SMS, push) to the customer and to customers whose delivery is announced as upcoming.
/api/driver/info1 Send an arbitrary driver info message to the office. The message is logged for the given customer or, when no cid is given, for the driver itself.
/api/driver/locate1 Last known driver positions. A driver gets the latest position of every active tour; a regular authenticated customer gets the single position of the tour currently delivering to them.
/api/driver/pauses List active driver pauses for a tour and date
/api/driver/refund1 Hand over one or more refund bookings collected by the driver. The refunded lines are passed positionally: for each value of the repeatable position parameter n, the item is given as pid-n and the amount as amount-n. Returns result refundok on success.
/api/driver/reorder1 Hand over a re-ordered tour position sequence. Each entry of pos is a triple of customer ids [before, moved, after]; a missing first or last element means the customer was moved to the very start or end of the tour.
/api/driver/setpause1 Record a planned or actual driver pause, returning the stored pause with its computed start and end times. Pass either length (minutes) or endtime - exactly one is required. To set a recurring pause that applies to every run of a tour (e.g. a standing lunch pause set by PCG), pass ddate=0 and include tourid; for a date-specific pause, pass the ddates.id as ddate.
/api/driver/setstart1 Set the start time of a tour. With a ddate the start applies to that specific tour run; with only a tourid the general start time of the tour is set.
/api/driver/state1 Report a driver tour state change (e.g. starttour) with optional car plate, temperature and mileage. The state is logged against the tour resolved from ddate.
/api/driver/trck1 Upload driver GPS tracking data, one position fix per line. Each line is lat,lng,accuracy,timestamp with an optional fifth mileage (km) value. The tour is taken from tourid/tid or, if absent, from the current session.
/api/driver/udlvr1 Revoke a previously reported delivery of an order (undo of dlvr).
/api/driver/urefund1 Revoke previously handed over refund bookings (mistake correction); the amounts are booked negatively. Takes the same positional parameters as refund1 and also returns result refundok on success.