Skip to content

Favourite Drivers

Taxi & Private HireProductsFleet › Favourite Drivers

Generally available

Customer-side preference: customers can request specific Drivers and dispatch favours them within a soft window (mode can be SOFT preference or HARD requirement). Each preference has an optional expiry and notes. Managed through the Driver edit page's Favourite Customers tab or directly. Pairs with Favourite SCPs for the school-run case where the same driver should handle the same child repeatedly.

Example request

POST /client/{clientId}/drivercustomer

{
  "customer": {
    "id": "<id>"
  },
  "mode": "HARD",
  "priority": 0,
  "expiresAt": 0,
  "notes": "<text>"
}

Example shape, derived from the DriverCustomer fields — indicative, not the authoritative schema (that arrives with the API reference).

Endpoints

MethodPath
POST /client/{clientId}/drivercustomer · primary
POST /client/{clientId}/driver/{driverId}/drivercustomer
POST /client/{clientId}/customer/{customerId}/drivercustomer
DELETE /client/{clientId}/drivercustomer/{prefId}
DELETE /client/{clientId}/driver/{driverId}/drivercustomer/{prefId}
DELETE /client/{clientId}/customer/{customerId}/drivercustomer/{prefId}
GET /client/{clientId}/drivercustomer/{prefId}
GET /client/{clientId}/drivercustomer
GET /client/{clientId}/driver/{driverId}/drivercustomer
GET /client/{clientId}/customer/{customerId}/drivercustomer
POST /client/{clientId}/drivercustomer/{prefId}
POST /client/{clientId}/driver/{driverId}/drivercustomer/{prefId}
POST /client/{clientId}/customer/{customerId}/drivercustomer/{prefId}

Full request/response schemas and an interactive explorer will live in the API reference (coming soon).

Use cases

Operator flows that exercise this feature.

Set a driver–customer preference

config risk: low

Mark a driver as a favourite for, or blacklisted from, a customer.

  1. POST /client/{clientId}/drivercustomer

Fields

FieldTypeDescription
driver Driver Driver this favourite-customer preference belongs to. Owning side — managed through the Driver edit page's Favourite Customers tab.
customer Customer Customer this preference applies to. Unique with `driver` per tenant — one row per (driver, customer) pair.
mode DriverPreferenceMode · HARD | SOFT HARD = dispatch only allocates this customer's trips to listed drivers; SOFT = prefer within a window then fall through. Drives the dispatch eligibility filter.
priority integer Tie-breaker priority among preferred drivers — lower numbers tried first.
expiresAt integer Date at which the preference lapses
notes text Internal operator note explaining the preference ("regular school run", "customer requested"). protected serialization — not surfaced on driver/customer apps.
deletedAt integer
deletedBy bigint
clientId bigint Tenant scope. Every tenant-aware entity carries this; `ClientFilter` enforces row-level isolation on read; the multi-tenancy routing layer (`/client/{clientId}`) sets it at create time. Surfaced only under `admin` / `tripLog` groups — never to end users.
internalKey string Optional client-supplied external reference / idempotency key. When present, lets external systems correlate platform-side records back to their own source-of-truth ids. Not persisted to a column — populated by the request handler when the caller sets it.
__objectType string Discriminator string (entity class short-name) emitted alongside the id in serialized output. Resolved at read time by `getObjectType()`; lets the FE dispatch entity-specific rendering without inspecting the URL.
id bigint Snowflake-style primary key (unsigned BIGINT). Generated by `IdFactory` at create time; surfaced to the FE / API as a `G`-prefixed string and stripped back to plain bigint server-side before Doctrine lookup.
createdDate integer Unix timestamp the row was first persisted. Set in the entity's PrePersist hook; never rewritten on subsequent updates.
updatedDate integer Unix timestamp the row was last touched. Bumped on every commit that hits the Doctrine UoW for this entity; drives FE invalidation + the listing change cursor.
passiveUpdatedDate int Read-through alias for `updatedDate` exposed under different serializer groups. Lets the FE distinguish "real edit" from "background touch" projections without changing the underlying column.
listingUpdatedDate int Listing-projection timestamp surfaced only under the `listMode` group. Driven by `TripCache` and other listing-shape refreshers separately from `updatedDate` so a listing rebuild doesn't trigger detail-page invalidation.