Guide · Performance

Pagination and field projection payload plan

Use this plan to keep every list page bounded and slim. A list returns only the fields its row screen reads. A detail returns the full record for one row. Pagination defaults to limit 50, with a maximum of 200, and never returns an unbounded list.

How the sizes were measured from the pack

Each estimate is built from the field list and the length limits already stated in this pack, not from live traffic. Field names, typical values, and the stated maxima are summed per row: requests up to 1000 characters on a booking, draft text up to 2000 characters on a message draft, notes and preference text on customer, chauffeur, and vehicle records, and check items and photo references on a daily check. A slim row keeps only the row fields named below. A full row adds every detail-only field listed below. To verify on a live workspace, request one page at limit 50 with no fields parameter and one detail for the same row, and compare the response byte size. The estimate and the live check must agree within the range in the table, or the projection for that resource is corrected.

Unbounded before this plan

The kit example uses LIMIT 200 with no pagination object. At 200 full booking rows that is about 330000 bytes for one request, before any join. At 200 full draft rows it is about 196000 bytes. A client cannot page, cannot bound latency, and cannot know the total behind a number.

Bounded after this plan

Every list returns a pagination object with limit, offset, total, and has_more, echoes the limit and offset applied, and uses limit 50 by default. An invalid limit or offset is an error naming that field. It is never clamped silently and never returns an unbounded list.

Estimated payload size and saving per endpoint

Read slim as the list default projection per row, full as the detail record per row, and page as 50 rows at limit 50. Saving is full page minus slim page for the same 50 rows.

ResourceSlim per rowFull per rowSlim page, 50 rowsFull page, 50 rowsEstimated saving per page
Bookingsabout 310 bytesabout 1650 bytesabout 15500 bytesabout 82500 bytesabout 67000 bytes, 81 percent
Customersabout 140 bytesabout 750 bytesabout 7000 bytesabout 37500 bytesabout 30500 bytes, 81 percent
Chauffeursabout 160 bytesabout 620 bytesabout 8000 bytesabout 31000 bytesabout 23000 bytes, 74 percent
Vehiclesabout 150 bytesabout 580 bytesabout 7500 bytesabout 29000 bytesabout 21500 bytes, 74 percent
Daily checksabout 130 bytesabout 540 bytesabout 6500 bytesabout 27000 bytesabout 20500 bytes, 76 percent
Service logsabout 120 bytesabout 420 bytesabout 6000 bytesabout 21000 bytesabout 15000 bytes, 71 percent
Invoicesabout 180 bytesabout 690 bytesabout 9000 bytesabout 34500 bytesabout 25500 bytes, 74 percent
Issuesabout 150 bytesabout 560 bytesabout 7500 bytesabout 28000 bytesabout 20500 bytes, 73 percent
Message draftsabout 170 bytesabout 980 bytesabout 8500 bytesabout 49000 bytesabout 40500 bytes, 83 percent

Against the unbounded kit example at 200 full rows, the bounded slim page at limit 50 saves about 95 percent on bookings, about 96 percent on message drafts, and about 92 to 93 percent on the other resources, and it bounds the response before the client decides to page again.

Slim list projection and detail-only fields

A list with no fields parameter returns only the slim fields below. A detail, create, and update response returns the full record for one row. Field selection with fields returns only the requested fields plus ok, the resource key, and pagination for a list.

Bookings

Slim: 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, updated_at. Detail only: dropoff, stops, requests, meet_point, sign_text, flight fields, booker contacts, passenger phone, notes, public token, and history.

Customers, chauffeurs, and vehicles

Slim: identifier, display name, status or state, dates, and totals needed for the row and for filtering. Detail only: staff notes, preferences text, VIP flag, spend history, certificate and permit detail text, contact detail beyond the row, and document history.

Daily checks, service logs, issues, invoices, and drafts

Slim: identifier, parent id, date, result or state, item or kind, and amount fields in cents where present. Detail only: full item lists, issue text, draft text up to 2000 characters, resolution notes, photo references, and linked history.

Field selection rule

fields is a comma list of snake_case names listed for that resource only, for example fields=reference_code,status,pickup_at,call_time. 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. Field selection never changes total or has_more for the same filter.

  • 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
  • No list default returns requests text, staff notes, VIP flag, spend history, public_token, audit detail, saved rate settings, or full history behind a record
  • Pagination, total, and has_more are the same with or without fields, so a trimmed page never changes the count behind a number

Pagination defaults to ship

Use the same defaults on every list, and state them on the screen beside the list.

Defaults and bounds

limit defaults to 50, minimum 1, maximum 200. offset defaults to 0, minimum 0. The kit example value of 200 is the maximum, not the default. A limit or offset that is not a whole number, or is outside its range, is invalid.

Response

Status 200, ok true, rows under the plural resource name, and a pagination object with limit, offset, total, and has_more. A valid filter with no rows returns an empty array, total 0, and has_more false, plus the next step for that list, not an error.

Ship the slim list, then page it

Compare one slim page at limit 50 with one detail for the same row, and confirm the saving in the table before you page a full day board.