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.
| Resource | Slim per row | Full per row | Slim page, 50 rows | Full page, 50 rows | Estimated saving per page |
|---|---|---|---|---|---|
| Bookings | about 310 bytes | about 1650 bytes | about 15500 bytes | about 82500 bytes | about 67000 bytes, 81 percent |
| Customers | about 140 bytes | about 750 bytes | about 7000 bytes | about 37500 bytes | about 30500 bytes, 81 percent |
| Chauffeurs | about 160 bytes | about 620 bytes | about 8000 bytes | about 31000 bytes | about 23000 bytes, 74 percent |
| Vehicles | about 150 bytes | about 580 bytes | about 7500 bytes | about 29000 bytes | about 21500 bytes, 74 percent |
| Daily checks | about 130 bytes | about 540 bytes | about 6500 bytes | about 27000 bytes | about 20500 bytes, 76 percent |
| Service logs | about 120 bytes | about 420 bytes | about 6000 bytes | about 21000 bytes | about 15000 bytes, 71 percent |
| Invoices | about 180 bytes | about 690 bytes | about 9000 bytes | about 34500 bytes | about 25500 bytes, 74 percent |
| Issues | about 150 bytes | about 560 bytes | about 7500 bytes | about 28000 bytes | about 20500 bytes, 73 percent |
| Message drafts | about 170 bytes | about 980 bytes | about 8500 bytes | about 49000 bytes | about 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.