Skip to content

Tariffs

Taxi & Private HireProductsPricing › Tariffs

Generally available

A tariff defines how a trip is priced — its base fare components for distance, time and fixed charges, the vehicle types it applies to, and an optional rule that selects between candidate tariffs at quote time. Rather than a fixed account/brand mapping, the selection rule lets you express conditions like "this tariff applies at weekends for VIP customers in premium vehicles." Tariff bands add stepped pricing on top of the base.

Example request

POST /client/{clientId}/tariff

{
  "name": "<string>",
  "uotSeconds": 0,
  "uodMetres": 0,
  "uopCents": 0,
  "vehicleTypes": [
    {
      "id": "<id>"
    }
  ],
  "primaryGroup": "<string>",
  "modifierGroups": [
    {
      "id": "<id>"
    }
  ],
  "targetModifierGroup": {
    "id": "<id>"
  },
  "decisionTree": {},
  "taxCategory": {
    "id": "<id>"
  }
}

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

Endpoints

MethodPath
POST /client/{clientId}/tariff/{tariffId}/modifiergroup/{modifierGroupId}/modifier
POST /client/{clientId}/tariff/{tariffId}/modifiergroup
POST /client/{clientId}/tariff · primary
DELETE /client/{clientId}/tariff/{tariffId}/modifiergroup/{modifierGroupId}
DELETE /client/{clientId}/tariff/{tariffId}/modifiergroup/{modifierGroupId}/modifier/{modifierId}
GET /client/{clientId}/tariff/{tariffId}
DELETE /client/{clientId}/tariff/{tariffId}/modifier/{modifierId}/modifiergroup/{modifierGroupId}
POST /client/{clientId}/tariff/{tariffId}/modifier/{modifierId}/modifiergroup/{modifierGroupId}
GET /client/{clientId}/tariff/test/{tripSegmentId}
POST /client/{clientId}/tariff/{tariffId}
POST /client/{clientId}/tariff/{tariffId}/modifier/{modifierId}
POST /client/{clientId}/tariff/{tariffId}/modifiergroup/{modifierGroupId}

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 a pricing modifier

tune risk: high approval required

Add a pricing modifier (surcharge / discount). Affects all future pricing — requires approval.

  1. POST /client/{clientId}/tariff/{tariffId}/modifiergroup/{modifierGroupId}/modifier
Add a modifier group

config risk: medium

Add a modifier group to a tariff (container for surcharge / discount rules).

  1. POST /client/{clientId}/tariff/{tariffId}/modifiergroup
Create a tariff

config risk: medium

Create a tariff and add its first distance/time band.

  1. POST /client/{clientId}/tariff
  2. POST /client/{clientId}/tariff/{tariffId}/tariffband

Fields

FieldTypeDescription
name string
uotSeconds smallint
uodMetres smallint
uopCents smallint
tariffBands Collection
vehicleTypes Collection
primaryGroup string
modifierGroups Collection
targetModifierGroup ModifierGroup
decisionTree JsonStorage
taxCategory TaxCategory
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.