Skip to content

Account Custom Fields

Taxi & Private HireProductsAccount › Account Custom Fields

Generally available

Per-Account custom field definitions: tenants can require arbitrary data at booking time (e.g. "Cost Centre", "PO Number", "Patient ID", "Job Reference"). Each field has a type (TEXT / SELECT / NUMBER / DATE), a requiredAt phase (BOOKING / DROPOFF / NEVER), display priority, and optional SELECT options. Captured values are stored on the trip metadata for invoicing + reporting.

Example request

POST /client/{clientId}/account/{accountId}/accountfield

{
  "requiredAt": "OPTIONAL",
  "priority": 0,
  "customName": "<string>",
  "customType": "TEXT",
  "customSelectOptions": [
    {
      "id": "<id>"
    }
  ]
}

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

Endpoints

MethodPath
POST /client/{clientId}/account/{accountId}/accountfield · primary
DELETE /client/{clientId}/account/{accountId}/accountfield/{accountfieldId}
GET /client/{clientId}/account/{accountId}/accountfield
POST /client/{clientId}/account/{accountId}/accountfield/{accountfieldId}
POST /client/{clientId}/accountfield
DELETE /client/{clientId}/accountfield/{accountfieldId}
GET /client/{clientId}/accountfield/{accountfieldId}
GET /client/{clientId}/accountfield
POST /client/{clientId}/accountfield/{accountfieldId}

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

Use cases

Operator flows that exercise this feature.

Add an account custom field

config risk: low

Define a custom field on an account (PO number, auth reference, etc.).

  1. POST /client/{clientId}/account/{accountId}/accountfield

Fields

FieldTypeDescription
account Account Parent account that owns this field definition. Fields scope to their owning account — different accounts can define different custom data requirements.
requiredAt AccountFieldRequiredAt · OPTIONAL | AT_CREATION | AT_PICKUP When the value must be supplied: OPTIONAL (always optional), AT_CREATION (required when the trip segment is created), AT_PICKUP (required at the pickup transition). Drives AccountFieldValidationService gating.
priority smallint Display order in the booking UI. Lower priority renders first; matches the rest of the platform's "lower means more important" convention.
customName string Human-readable label shown to the operator / customer at the input. Free-form per-tenant ("Cost Centre", "Patient ID", "Job Reference"). Required.
customFieldKey string Stable internal key used to read / write the captured value on TripSegment.accountFieldData. Auto-derived from customName at write time; not edited directly by operators.
customType AccountFieldType · TEXT | NUMBER | SELECT Input type the operator / customer sees: TEXT (free text), NUMBER (validated numeric), SELECT (dropdown from customSelectOptions). Drives FE form-field rendering + validation.
customSelectOptions array Dropdown option list, used only when customType = SELECT. JSON array of `{value, label}` pairs.
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.