Drivers
Driver list, onboarding, documents, eligibility review, availability, and time off.
/dashboard/platform/drivers lists drivers with readiness and missing-document flags. /dashboard/platform/drivers/[id] is the driver record. Both need the drivers capability (owner or dispatcher).
Add a driver
addFleetDriver(fleetId, publicName, email, acceptsScheduled, publicBio) creates a DriverProfile with status pending_review and dispatch status offline. If the email matches a user, the profile links to that account.
Driver detail
- Review track:
reviewDriver(driverId, decision, notes)records aPolicyEvaluationagainst the active driver eligibility policy (created on first review) and sets the status toactive,paused,ineligible, oroffboarded. - Online toggle:
setDriverOnline. - Documents:
addComplianceDocumentwith kinddriver_license,insurance,background_check,inspection,business_license, orother; issuer, masked reference, issue and expiry dates.reviewComplianceDocument(documentId, decision, notes)accepts or rejects it (accepted_evidence,rejected_evidence). Document status:submitted,under_review,accepted_evidence,rejected_evidence,expired,revoked. - Vehicles: the vehicles the driver can use.
- Weekly hours:
setDriverAvailability(driverId, timezone, rules)replacesAvailabilityRulerows (day of week 0 to 6, start and end time). - Time off:
addDriverTimeOff(driverId, startsAt, endsAt, kind, reason)andremoveDriverTimeOff(exceptionId). - Eligibility checks: the history of policy evaluations (
pending,eligible,ineligible,manual_review). - Trips: the driver's trips.
Dispatch only offers to drivers whose latest evaluation is eligible. Driver status changes only through reviewDriver, not by editing the record.