Guide · Data guides

List API contract for ChauffeurDesk

Use this page as the single contract for every list, detail, create, and update response. It states pagination, filtering, sorting, null versus empty values, and date and number formatting in one place, and it states the same contract per resource. Where a fragment in another guide differs, this page controls.

How this contract controls

This page consolidates the unified response contract in the assign runs guide, the search and filters guide, the booking search guide, the validation spec guide, the data fields guide, and the normalized values guide. Read this page first when those fragments differ. This page adds no endpoint, no sign in path, and no tenant path. A detail, create, and update response for one resource always carries the same canonical fields for that resource, so a client can read a created or updated record in the same way as a fetched record.

One envelope for lists and details

Every list and detail response uses the envelope below. Writes keep the validation spec status codes and field order, with the same error shape below.

One sort, one filter set, one null rule

Every list uses the pagination, filtering, sorting, null, date, and number rules below. A list that uses a different default or date field is corrected to this page.

Envelope and status

Success and error shapes are the same on every list, detail, create, and update response.

List success

Status 200. ok true. Rows under the resource name in plural, such as bookings, at the top level of the flat envelope. A pagination object with limit, offset, total, and has_more beside the rows. No bare array at the top level.

Detail, create, and update success

Status 200, or the existing success status for that route. ok true. The one record under the resource name in singular, such as booking, with its fields in full. No bare record at the top level. Create and update return the full canonical record for that resource, with the same field names, types, null values, and date formats as the detail response for the same id. A create or update response never returns a partial record, a different field set, or extra legacy fields.

Error

ok false. error with one plain sentence that names what to do. field with the first invalid field when one field is at fault. Status 400 for validation failure, 404 for not found in the same workspace, and 409 for a state or conflict failure such as an out of sequence status, a day off assignment, a minimum gap conflict, or a vehicle not ready assignment. No partial list and no silent change to a default on an error.

Legacy tolerance at the edge only

A data wrapper, an error object with code and message, a top level code and message, a camelCase field name, and an epoch time are legacy input only. A client may read one legacy shape once at the edge and then use the canonical names only. The server never returns both a flat copy and a wrapped copy, and never returns a camelCase copy beside a snake_case name.

One contract per resource

Each card states the resource keys, the list sort default, the search fields, the filter fields, the nullable fields, and the date and number fields for that resource. A field not listed for a resource is not returned for that resource and is not accepted on create or update for that resource.

Bookings

Keys: bookings and booking. Sort: pickup_at asc on the schedule and day board, updated_at desc on the general bookings list. Search: customer name, pickup, drop off, stops in saved order, chauffeur name, vehicle name or plate, service type, flight airline and flight number, and reference where present. Filters, by canonical parameter name: pickup_date_start and pickup_date_end, status, service_type, client_id, assignee_id, vehicle_id, and flagged_only, with client_id and assignee_id each one record picked by search and selection, vehicle_id separate from assignee_id, and unassigned only as an explicit assignee_id choice. The names client, assignee, vehicle, flag, chauffeur, and pickup date range are not parameter names and are invalid as parameters. Nullable: dropoff, airline, flight_number, meet_point, sign_text, requests, chauffeur_id, and vehicle_id are null when blank or unassigned. Dates: pickup_at, call_time, and updated_at are ISO 8601 UTC, pickup_date is YYYY-MM-DD in the company timezone. Numbers: quote_cents, gratuity_cents, and total_cents are integers from the server, estimated_hours is a number from 0.25 to 24 in quarter hour steps, passengers is an integer from 1 to 7. Call time and quote amounts are derived by the server and are read only fields on create and update.

Customers

Keys: customers and customer. Sort: updated_at desc. Search: name, phone, and email, normalized as in the search section below. Filters: none beyond workspace scope. Nullable: company or hotel name, booker contact, passenger contact, billing contact, and preference fields are null when blank. Dates: updated_at is ISO 8601 UTC where present. Numbers: none are returned as strings. A create or update returns the same customer fields as a detail read, with no trip total stored on the profile.

Chauffeurs

Keys: chauffeurs and chauffeur. Sort: updated_at desc. Search: name, phone, email, and certificate number, normalized as below. Filters: none beyond workspace scope and active state where the list states it. Nullable: certificate_number, certificate_expiry, home_vehicle_id, and linked sign in id are null when blank or unlinked, and a null certificate or link blocks assignment until entered and valid. Dates: certificate_expiry is YYYY-MM-DD, updated_at is ISO 8601 UTC where present. A create or update returns the same chauffeur fields as a detail read.

Vehicles

Keys: vehicles and vehicle. Sort: updated_at desc. Search: plate, permit number, and vehicle name, normalized as below. Filters: none beyond workspace scope and readiness for the pickup date where the list states it. Nullable: permit_number, permit_expiry, inspection_expiry, and home_chauffeur_id are null when blank, and null permit, inspection, or odometer blocks assignment until entered and valid. Dates: permit_expiry, inspection_expiry, and check date are YYYY-MM-DD, updated_at is ISO 8601 UTC where present. Numbers: odometer is an integer or null, never a string.

Daily checks and service logs

Keys: daily_checks and daily_check, service_logs and service_log. Sort: check date or service date desc within the stated list. Filters: vehicle and date only where the list states them. Nullable: issue note and photo reference are null when blank. Dates: check_date and service_date are YYYY-MM-DD in the company timezone. Daily check result is Ready, Not checked, or Failed and is derived by the server, never supplied by the client. A second check for the same vehicle and date is held for review. Service log cost is a number from 0 upward and odometer is an integer that never moves backward for that vehicle.

Invoices, issues, and message drafts

Keys: invoices and invoice, issues and issue, message_drafts and message_draft. Sort: updated_at desc unless a list states another sort on this page. Invoices filter by client_id and pickup_date_start and pickup_date_end as bookings, where the range is the pickup date of the Complete bookings behind the invoice, and invoice_state Issued and Paid and payment_status Unpaid and Paid are separate filter groups. Issues filter by booking and type where the list states them. Drafts filter by booking and kind where the list states them. Nullable: resolution note, payment method label, approved_by, approved_at, and sent_at are null until set. Amounts on an invoice come only from Complete bookings, with fare, gratuity, and total on separate lines in whole dollars on screen.

Pagination

Pagination is the same on every page of every list, and the export matches the screen.

Defaults and bounds

Parameter limit, default 50, minimum 1, maximum 200. Parameter offset, default 0, minimum 0. The kit example limit of 200 is the maximum, not the default. The only pagination parameter names are limit and offset. The names page, page_size, per_page, and skip are unknown parameters and are invalid. A limit or offset that is not a whole number, is below the minimum, or is above the maximum is invalid and returns the error shape above naming limit or offset. Never clamp silently and never return an unbounded list.

Response and paging

The pagination object has exactly the fields limit, offset, total, and has_more. It echoes the limit and offset that were applied, states total for the filtered list, and states has_more as true or false. No other pagination metadata field is returned, including page, pages, total_pages, or count as a pagination field. Canonical parameter order in the address is q, pickup_date_start, pickup_date_end, status, service_type, client_id, assignee_id, vehicle_id, flagged_only, invoice_state, payment_status, sort, dir, limit, offset, fields. Every page uses the same workspace scope, the same search, filter, and sort. A valid filter that matches no rows returns a success list with an empty array, total 0, and has_more false, plus the next step for that list, not an error.

Filtering

Only listed filters are accepted. A record is shown only when it matches every group that has a value.

How filters compose

pickup_date_start and pickup_date_end and status and service_type and client_id and assignee_id and vehicle_id and flagged_only are combined with AND. Inside status, any selected status matches. Inside service_type, any selected service matches. Clearing one group does not clear another group. A filter does not change the confirmed scope used for dispatch counts.

Listed filters and defaults

For bookings and the schedule, the listed filter parameters are pickup_date_start, pickup_date_end, status, service_type, client_id, assignee_id, vehicle_id, and flagged_only. The name chauffeur is not a parameter name. The chauffeur filter is assignee_id. Defaults are pickup_date_start and pickup_date_end cleared except the day board default below, status all, service_type all, client_id none, assignee_id none, vehicle_id none, flagged_only off, q empty, sort and dir at the defaults in the sorting section below, fields omitted, limit 50, offset 0. On the Bookings list and the Invoices list the default date range is cleared. On the Schedule day board the default is the selected pickup date as both pickup_date_start and pickup_date_end. A single pickup date means start and end on that date.

Date range, client, and assignee

pickup_date_start and pickup_date_end are inclusive, by pickup date in the company timezone, not request date and not device timezone. If pickup_date_start is after pickup_date_end, the error shape names pickup_date_start, no list is shown, and the other entries are kept. client_id filters by one customer record picked after search by name, phone, or email. assignee_id filters by one assigned chauffeur picked the same way. Unassigned is shown only as an explicit assignee_id choice, never as the default. vehicle_id is a separate filter from assignee_id.

Status, service, unknown values, and clearing

Status accepts only Quote, Confirmed, Driver confirmed, En route, On location, Passenger on board, Complete, and Cancelled. Service accepts only airport_arrival, airport_departure, hourly, point_to_point, and event, displayed as MCI airport arrival, MCI airport departure, Hourly as directed, Point to point, and Weddings and events. An unknown filter name or a value outside those lists is invalid. One Clear filters button resets every group to the defaults above and states the new total count.

  • Every list states its active filters, period, grouping, limit, offset, and sort on the screen
  • Every query stays inside the signed in workspace with the same tenant filter on every page
  • Every number shows its numerator and denominator beside it and opens the filtered list behind it

Sorting and search

Sort takes a listed field and a direction only. Search takes a text term only and never changes the sort.

Sort fields and defaults

Parameters sort and dir only. Only pickup_at, call_time, and updated_at are accepted as sort values, in snake case, with dir asc or desc only. The names sort_by, order, order_by, ordering, and direction are unknown parameters and are invalid. The schedule and day board default to sort pickup_at with dir asc, in pickup order, with call time shown first on each row. General lists default to sort updated_at with dir desc. A sort value or dir value outside that list is invalid. Sorting never reorders stops on a booking and never changes a pickup date.

Search matching and normalization

Parameter q takes a text term only. Search matching is partial, meaning the normalized term matches anywhere inside the normalized field value. Names trim, collapse spaces, and compare in lower case. Phones compare digits only with an extension kept separate, ten digits as 1 plus those ten digits. Emails trim, remove spaces, and compare in lower case. Plates, permit numbers, and certificate numbers trim, use upper case, and remove spaces and hyphens. Places use the canonical pickup point list and compare in lower case after trim and collapse. A blank key does not match on that key.

Multi-word search and ranking

For record lists, the normalized full term is one substring, not a set of separate words joined across fields. Record lists keep the stated sort and are never re-ranked by relevance when a search term is present. Guide search ranking stays for guides only and is not copied to bookings, customers, chauffeurs, vehicles, or invoices.

Search scope

Only the fields listed for a list can be searched on that list. Search never widens a list beyond the signed in workspace, never returns another chauffeur run on My day, and never returns a record outside the signed in role scope. An empty q matches every record in scope in the stated sort order.

Null versus empty

Null, empty list, and zero are three different values. Do not use one for another.

JSON values

A field with no value is null in JSON, never an empty string, never zero as a sentinel, and never the words Not set, None, or not stated in the JSON. This applies to every nullable field in the per-resource contract above, including optional text such as dropoff, meet_point, sign_text, and requests. Text fields are strings and list fields are arrays. An empty list is an empty array with total 0, never a null list.

Screen rendering

The screen renders null in plain words as Not set, consistently on every screen and every field, except the exact pricing sentence and the exact draft unknown sentences in the approve messages guide, which keep their exact wording. When a denominator or count is zero, the screen shows no value and states what to do next, instead of showing zero or zero percent.

Date formatting

Every date and time in a response uses one form only.

Times and dates

Every field ending in at is one ISO 8601 date and time in UTC, such as 2026-11-07T14:30:00Z, for pickup_at, call_time, and updated_at. Every field ending in date is one calendar date as YYYY-MM-DD in the company timezone, for pickup_date, check_date, service_date, and expiry dates. Pickup date is the calendar date of pickup_at in the company timezone.

Timezone and legacy times

company_timezone is an IANA place name such as America/Chicago, never an abbreviation. Epoch seconds and milliseconds are legacy input only, converted once at the edge to the ISO form above. A value is never returned as epoch beside ISO for the same field. A client that receives an ISO time converts it once for a date and time input field, and does not treat an ISO string as empty.

Number formatting

Numbers in JSON and numbers on screen follow the same rule on every list.

JSON numbers

Counts, passenger numbers, and all money fields ending in cents are whole numbers, never strings and never floats. Estimated hours is a number from 0.25 to 24 in quarter hour steps. Gratuity percent is a number from 0 to 100. A negative number fails for every numeric field.

Screen amounts

Money on screen is whole dollars rounded up, with rate, gratuity, and all in total on separate lines and total as rate plus gratuity. Reports group by service type only, with sum and count beside the average, and never show a combined average across service types. A changed rate applies to new quotes only.

Trimmed list and detail projections with field selection

List endpoints return a slim row by default. Detail endpoints return the full record by default. An optional fields parameter returns only the requested fields. The default for each kind contains every field a screen in this pack reads from that kind, so a client that sends no fields parameter keeps working.

List default projection

For bookings, the list default is id, reference_code, service_type, status, pickup, pickup_at, call_time, passenger_name, assigned chauffeur name, assigned vehicle name, flag reason, quote_cents, gratuity_cents, total_cents, and updated_at. For customers, chauffeurs, vehicles, and invoices, the list default is the identifier, display name, status or state, dates, and totals needed for the row and for filtering. No list default returns requests text, staff notes, internal notes, VIP flag, spend history, public_token, audit or log detail, saved rate settings, or the full history of checks, service visits, issues, or invoices behind a record. Those fields are detail only.

Detail default projection

A detail, create, and update response returns the full record for that resource, with every field on the record in full, as stated above. A detail response is for one record, so the full text fields, notes for the roles that can see them, and linked records for that one record are kept on detail. A list never returns a detail record by accident.

Field selection with fields

A list or detail request may send fields as a comma list of snake_case field names, for example fields=reference_code,status,pickup_at,call_time. Only fields listed for that resource may be requested. The response returns only the requested fields plus ok, the resource key, and, for a list, the pagination object. An unknown field name, an empty fields value, or a field outside the role that can see it is invalid and returns the error shape above naming fields, with no partial list and no data from another workspace or role. Field selection never widens workspace scope, role scope, or the confirmed scope for dispatch counts.

Bytes per request and how to measure it

Measure one page at limit 50 with the default list projection and with full detail for the same rows, and compare field count and byte size in a test run. The saving comes from omitting large text per row, such as requests up to 1000 characters, and from omitting history and notes that a row screen does not read. Further saving comes from sending fields with only the fields that screen reads. Pagination, total, and has_more are the same for the same filter with or without fields, so a trimmed page never changes the count behind a number.

  • A list with no fields parameter returns only the list default fields for that resource and no detail only text, notes, token, or history fields
  • A detail with no fields parameter returns the full record for that one resource
  • A list or detail with fields returns only the requested fields plus ok, the resource key, and pagination for a list, with total and has_more unchanged for the same filter
  • An unknown field, an empty fields value, or a field outside the signed in role returns the error shape naming fields, with no partial list and no field from another workspace
  • Every field a screen in this pack reads from a list is present in that list default, so an existing client that sends no fields parameter renders the same row as before
  • Field selection does not change sort, filter, pickup date, status scope, or grouping, and a changed rate still applies to new quotes only

Field names and enums

Use snake case and canonical values only. A legacy variant displays as the canonical value and is never saved as a new value.

Names and statuses

Every JSON field name uses lower case words joined by an underscore, such as pickup_at, call_time, quote_cents, flight_number, passenger_name, reference_code, company_timezone, and updated_at. Booking statuses in order are Quote, Confirmed, Driver confirmed, En route, On location, Passenger on board, Complete, plus Cancelled set only by the public cancel flow on a Quote or Confirmed booking. Cancelled is filterable on the Bookings list and is excluded from dispatch coverage, schedule flags, vehicle readiness, earnings, invoice totals, and the five numbers on the Features page. No fee is computed from Cancelled.

Other enums

Service slugs are airport_arrival, airport_departure, hourly, point_to_point, and event. Daily check result is Ready, Not checked, or Failed. Vehicle state is Out of service. Service flag is On track, Due soon, or Overdue. Issue types are Complaint, Lost item, Billing, Late pickup, and Compliment. Draft kinds are Confirmation, Chauffeur details, On location, and Thank you. Payment status is Unpaid or Paid. Invoice state is Issued or Paid. Each group is a separate field and is never read as another group.

Contradictions resolved

Each card states the variant found in the pack and the canonical value kept on this page.

Multi-word search

Variant: each word may match a different field, in the booking search guide. Canonical: the full normalized term is one substring for record lists, as in the search and filters guide.

Relevance ranking

Variant: records ranked by exact, start, title, and section match, in the booking search guide. Canonical: record lists keep the stated sort with no relevance re-rank. Ranking stays for guide search only.

Cancelled status

Variant: guides that state no cancelled status exists. Canonical: Cancelled is a stored status via the public cancel flow, as in the normalized values guide and the passenger book pages.

Limit default

Variant: a kit example that reads as a limit of 200. Canonical: default 50, minimum 1, maximum 200, as in the assign runs and search and filters guides.

Data wrapper and error object

Variant: a data wrapper and an error object accepted in the site script. Canonical: a flat envelope with ok, resource name, and pagination, and an error string with field, as in the assign runs guide. Legacy shapes are edge tolerance only.

Null words and epoch times

Variant: Not set, None, and not stated used for the same null on one screen, and epoch numeric times read as empty in a date input. Canonical: null in JSON, Not set on screen, ISO UTC for at fields, and ISO strings converted once for inputs.

Acceptance checks

Run each check before a list change ships. Each check names the screen, the field, and the result.

  • An invalid limit, offset, filter, sort, dir, or fields value returns the error shape naming that field, with no partial list and no silent default
  • A valid filter with no rows returns an empty array, total 0, and has_more false, with the next step for that list
  • The schedule reads in pickup order with call time first, and general lists read in updated time descending, with and without a search term
  • A null optional field renders as Not set, an empty list is an empty array, and a zero denominator shows no value
  • Every at value is ISO 8601 in UTC, every date value is YYYY-MM-DD, and no epoch value is returned beside ISO
  • Every cents value is a whole number, and screen amounts are whole dollars on separate lines
  • An unknown status, service, filter, or sort value returns an error naming that field
  • Every page uses the same workspace scope and the same sort, and the export matches the screen
  • A create response and an update response return the same canonical fields as a later detail read for the same id, with the same null values and date formats, and no legacy or read only field
  • A list row for a resource uses only fields listed for that resource in the per-resource contract above, and nullable fields listed there are null in JSON when blank

Related pages

Use this contract with the other public pages for the service and with the related guides for the lists it governs.

Use one contract for every list

Read this page with the assign runs guide, then open the schedule for the live day.