Trip Quotes
Taxi & Private Hire › Products › Pricing › Trip Quotes
Generally available
A quote is a priced snapshot of a trip segment — either a pre-booking estimate the operator or customer sees before confirming, or the billing snapshot taken at completion. It carries the resolved tariff, base fare, any modifiers and discounts, and the final amount, and it has an expiry (preview quotes default to five minutes). Each quote is marked as either the billing quote (the one used to charge) or a shadow quote — a parallel "what a metered fare would have been" figure kept alongside a fixed fare for comparison.
Example request
POST /client/{clientId}/quote/trip
{
"pricingMode": "METERED",
"tripSegments": [
{
"customer": {
"phone": "<E.164 phone>"
},
"tripSegmentStops": [
{
"type": "PICKUP",
"pickupAddress": "<address>",
"pickupLatitude": "<lat>",
"pickupLongitude": "<lng>"
},
{
"type": "DROPOFF",
"pickupAddress": "<address>",
"pickupLatitude": "<lat>",
"pickupLongitude": "<lng>"
}
],
"requestedPickupDate": "<unix-seconds>"
}
],
"maxSeatCapacity": "<seats>"
} Endpoints
| Method | Path | |
|---|---|---|
POST | /client/{clientId}/quote/trip · primary | |
POST | /client/{clientId}/quote/check | |
GET | /client/{clientId}/quote/{quoteId} | |
GET | /client/{clientId}/quote |
Full request/response schemas and an interactive explorer will live in the API reference (coming soon).
Use cases
Operator flows that exercise this feature.
read_diagnose risk: low
Compute a fare quote for a prospective trip before booking.
POST/client/{clientId}/quote/trip
action risk: low
Take a new ASAP booking — optionally quote first, then create the trip.
POST/client/{clientId}/quote/tripPOST/client/{clientId}/trip
Related
Fields
| Field | Type | Description |
|---|---|---|
tariff | Tariff | Tariff that produced this quote. Resolved at quote time by TariffFinderService (decision-tree match on account / brand / vehicle-type / time-of-day). |
role | string · BILLING | SHADOW | Whether this quote is the BILLING quote (the one used to charge) or a SHADOW quote (a parallel "what would a metered fare have been" estimate for fixed-fare reconciliation). Both roles render in the catalogue render but only BILLING drives TripCharge. |
price | int | Calculated price for this segment, in cents of the trip currency. Null on a partially-built quote; populated by the pricing pipeline at quote time. |
startDate | integer | Unix timestamp the price was computed for — typically the segment's requestedPickupDate. Used to lock the quote to a specific moment (tariff rate cards, surcharge windows) so a recomputation later is reproducible. |
expiryDate | integer | Unix timestamp at which this quote stops being valid. Default = time() + 300s (the system). A consumer reading an expired quote should re-quote rather than trust the cached price. |
route | Route | the routing service-resolved route the price was calculated against — coordinates, distance metres, duration seconds. Stored alongside the quote so a recomputation re-runs against the same geometry. |
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. |