● Travel Never Stops. Neither Do We. 365 Days a Year.

Bus API Seat Maps and Passenger Booking

Build bus seat-map and booking workflows with seat-level prices, deck layouts, boarding points, passenger details and supplier confirmation checks.

Coach operations planner working near a terminal window

This guide explains how a travel booking platform should turn a supplier's bus layout into a reliable seat-selection, passenger-assignment, payment, and ticket-reconciliation workflow. The running scenario, COACH-317, is entirely illustrative. Its route, identifiers, passengers, currency, prices, times, revisions, and confirmation references are test fixtures, not customer history, live availability, or claims about any operator. The design separates what a supplier actually returns from the platform's normalized interpretation.

Successful bus API seat map integration means more than drawing rectangles. The platform must preserve seat identity across decks, distinguish non-bookable geometry, calculate payable amounts from correctly scoped fare components, and prove that each named traveler occupies exactly one valid inventory item. Most importantly, an interrupted booking response cannot become a second purchase merely because the first response was not received.

Supplier Documentation and Boundary of Responsibility

Use the official eTravelSmart bus API integration document for eTravelSmart-specific operations and field names. It describes AvailableBuses, BusLayout, BlockTicket, seatBooking, retrieval by block key, and retrieval by ETS ticket number. Its layout records include id, row, column, zIndex, length, width, available, fare, and totalFareWithTaxes. Its request context includes source, destination, journey date, inventoryType, and routeScheduleId.

Use the separate TBO Bus Seatlayout reference for TBO's ResultIndex, TraceId, TokenId, SeatDetails, RowNo, ColumnNo, IsUpper, SeatIndex, SeatName, SeatStatus, SeatType, Height, Width, and price breakdown. The TBO GetBooking reference documents booking lookup, itinerary status, passenger seat details, and operator confirmation. Do not combine these two vendors' wire schemas into a fictional shared API.

Documented vendor concepts and adapter responsibilities
Concern eTravelSmart scope TBO scope TravelTech365 normalization
Search reference inventoryType and routeScheduleId with route and date TraceId and ResultIndex in seat-layout context Supplier, search, journey, and departure keys
Physical position row, column, zIndex, length, width RowNo, ColumnNo, IsUpper, Height, Width Deck, origin cell, footprint, and orientation
Seat identity String id on layout seat Numeric SeatIndex and display SeatName Opaque supplier seat key plus display label
Price fare, tax and operator charge fields, totalFareWithTaxes Price with BasePrice, Tax, OtherCharges, discounts, and offered or published prices Auditable monetary components and payable total
Booking retrieval Block key or ETS ticket number using the documented retrieval methods GetBookingDetail using documented identifiers and response Read-only reconciliation before any retry

COACH-317 Scenario and Acceptance Baseline

COACH-317 represents an illustrative overnight journey from North Quay to South Terminal on 8 December 2026. The boarding location is BOARD-7, Bay C, at 23:35 local time; the selected drop is DROP-2 at 06:10 on 9 December 2026. Both times belong to the route's stated Europe/London time zone. The fixture's departure and arrival locations are fictional; the dates establish an unambiguous next-day boundary.

Two travelers, P-A and P-B, select lower-deck L2 and upper-deck U2. Both seats occupy row 2, column 2 in their respective decks, yet have different supplier identifiers. L2 costs GBP 28; U2 costs GBP 34; the first payable quote is GBP 62. A later inventory revision withdraws U2. U3, a different upper-deck seat, is offered at GBP 36, and the revised total is GBP 64. The customer must explicitly accept that substitution and the additional GBP 2 before any new hold or booking request.

Complete illustrative journey and commercial fixture
Fixture field Initial value Revised or final value
Case and supplier adapter COACH-317, DEMO-COACH Same illustrative adapter
Journey and time zone 2026-12-08, Europe/London Same journey, no schedule change
Boarding selection BOARD-7, Bay C, 2026-12-08 23:35 Retained and revalidated
Dropping selection DROP-2, 2026-12-09 06:10 Retained and revalidated
P-A assignment L2, supplier key SUP-L-202 L2, unchanged
P-B assignment U2, supplier key SUP-U-202 U3, supplier key SUP-U-203
Layout revision REV-1 REV-2 removes U2
Selection quote GBP 28 + GBP 34 = GBP 62 GBP 28 + GBP 36 = GBP 64
Booking outcome Not yet booked Confirmed: ET17 and OP17

Normalize Geometry Before Rendering

Deck Coordinates Are Not Global Seat Addresses

Use a composite identity consisting of supplier, service, journey, revision, deck, and opaque seat key. The visible label is separate. In this fixture, L2 and U2 share row 2 and column 2 without colliding because L2 belongs to deck 0 and U2 belongs to deck 1. Their supplier keys, SUP-L-202 and SUP-U-202, are distinct even before the deck is included. Reject adapters that index seat objects only by row and column or silently replace an upper berth with a lower berth.

Aisles, Exits, and Sleeper Footprints

The illustrative lower deck has an aisle at row 2, column 1 and an exit at row 2, column 4. These are static fixtures with selectable=false, no supplier seat key, no fare, and no passenger eligibility. They cannot be counted toward available seats or included in a hold. eTravelSmart documents special non-seat positions including EME for emergency exits and related exit or restroom markers. Convert such markers to appropriate static geometry rather than assuming every item in a seat array represents inventory.

For ordinary seats use a one-by-one footprint. A sleeper may span two grid units, and the direction of that span matters. eTravelSmart's documented examples distinguish vertical sleepers, horizontal sleepers, and mixed seater-sleeper layouts using deck index, length, and width; it also gives a specific display adjustment for certain upper or lower sleeper rows. TBO exposes a seat type alongside Height and Width. Maintain vendor-specific dimension adapters instead of interpreting similarly named fields as automatically identical axes.

Resolve each footprint into occupied cells on its own deck. Reject overlap between bookable seats, clipping beyond the grid, negative coordinates, or any geometry that covers an exit. Do not fabricate a second inventory item for the second cell of a two-unit berth. The selection hit target, focus label, and booking reference must all point to the single underlying berth. Show deck controls with explicit labels such as “Lower deck” and “Upper deck”; never rely on color alone to communicate the difference.

Coach staff member checking seat positions from the aisle

Seat-State Revision and Stable Selection

A seating map has at least three independent states: physical geometry, supplier availability, and local customer selection. Geometry can remain the same while inventory changes. When REV-2 arrives, U2 disappears from valid inventory. The interface must invalidate P-B's assignment to U2 rather than shifting a visual highlight onto the next available upper berth. L2 remains selected for P-A only after the service and revision checks confirm it is still offered.

U3 is not a rename for U2. It is a new candidate at upper deck, row 2, column 3, with supplier key SUP-U-203. Present the change as a new seat choice, show that U2 is no longer available, and display the updated GBP 36 price alongside the GBP 34 former price. Preserve an immutable record of what the customer originally selected; version the proposed replacement separately. A seat disappearing during checkout should not become a hidden substitution.

Illustrative normalized seat geometry and revision states
Object Deck and cells Revision 1 Revision 2
L2 / SUP-L-202 Lower 0; row 2, column 2; 1 by 1 Available, GBP 28 Available, GBP 28
U2 / SUP-U-202 Upper 1; row 2, column 2; 1 by 1 Available, GBP 34 Removed; cannot book
U3 / SUP-U-203 Upper 1; row 2, column 3; 1 by 1 Not offered Available, GBP 36
Aisle Lower 0; row 2, column 1 Static, not selectable Static, not selectable
Exit Lower 0; row 2, column 4 Static, not selectable Static, not selectable

Money, Restrictions, and Inventory Are Separately Scoped

Reconcile the Two Quotes by Component

The fixture deliberately uses GBP for local application testing; it does not assert GBP availability or specific charges from either documented supplier. L2 consists of GBP 25 base fare, GBP 1 tax, and GBP 2 operator charge. U2 consists of GBP 30 base, GBP 2 tax, and GBP 2 operator charge. The first total is therefore GBP 55 base plus GBP 3 tax plus GBP 4 operator charges, or GBP 62 payable. No separate platform fee, discount, commission, or rounding adjustment is applied.

After substitution, U3 consists of GBP 32 base, GBP 2 tax, and GBP 2 operator charge. The revised journey has GBP 57 base, GBP 3 tax, and GBP 4 operator charges, totaling GBP 64. The GBP 2 difference is entirely attributable to the base-price change for the second passenger. Display every component that contributes to checkout and ensure the amount authorized for payment equals the current, accepted payable total.

Illustrative GBP seat-level reconciliation, not a supplier tariff
Seat Base Tax Operator charges Payable
L2, both revisions 25.00 1.00 2.00 28.00
U2, revision 1 only 30.00 2.00 2.00 34.00
Revision 1 total 55.00 3.00 4.00 62.00
U3, revision 2 only 32.00 2.00 2.00 36.00
Revision 2 total 57.00 3.00 4.00 64.00

At the supplier boundary, respect source-specific totals. eTravelSmart provides seat-level fare and taxes plus possible updated fare breakup during blocking; a changed amount must be reviewed before booking. TBO documents offered and published prices, commissions, markups, taxes, other charges, and GST-related fields. Some are commercial metadata rather than extra customer charges. Do not add tax twice, add a commission to the customer price without commercial rules, or assume a published display number equals the payable offer.

Scope Availability and Restrictions to the Exact Trip

A green seat on a different date, departure, boarding pair, or inventory type is not evidence that the current item remains available. Key cached layouts and quotes to provider, service, journey date, result context, segment, boarding and dropping selections where relevant, currency, and response revision. Treat restriction flags as supplier data, not guesses from names or colors. Validate gender-reserved inventory against the rules supplied for that booking, and do not infer eligibility from a passenger's title.

Passenger, Boarding, and Dropping Assignments

Define one authoritative assignment record per traveler. In the initial state, P-A maps to L2 and P-B maps to U2. After explicit approval, P-A still maps to L2 while P-B maps to U3. Both travelers share the chosen boarding point BOARD-7, Bay C, at 23:35 and the dropping point DROP-2 at 06:10 the next day. Store the full local date with each time, the route time zone, and the supplier point identifiers.

Use fictional passenger profiles only in tests: P-A is Alex Example, age 29; P-B is Blair Example, age 31. Each has a synthetic contact record, and neither is a real customer. For an integration with eTravelSmart, its documented blockSeatPaxDetails includes passenger attributes such as age, name, seatNbr, sex, fare, totalFareWithTaxes, and other required contact and identity fields. Supply those according to the actual contracted API and applicable privacy requirements, not by copying a TBO object.

TBO's documented booking-retrieval passenger records instead expose Passenger[] with a nested Seat object, names and other passenger attributes; its itinerary includes BoardingPointsDetails and DropingPointdetails. Treat these as retrieved details, not as evidence that a TBO booking request accepts eTravelSmart's blockSeatPaxDetails. Preserve field provenance in the adapter and define which API result is authoritative for each displayed boarding instruction.

Illustrative final passenger manifest and points
Traveler Assigned seat Boarding Dropping
P-A, Alex Example, 29 L2, lower deck; SUP-L-202 BOARD-7, Bay C; 8 Dec 23:35 DROP-2; 9 Dec 06:10
P-B, Blair Example, 31 U3, upper deck; SUP-U-203 BOARD-7, Bay C; 8 Dec 23:35 DROP-2; 9 Dec 06:10

Approval, Holds, and Expiry Handling

A revision creates a new offer, not silent consent. Record APPROVAL-317 against revision REV-2, seat pair L2 plus U3, passenger mapping, boarding and dropping points, GBP 64 payable, and the customer's affirmative action at 21:43 local on 8 December. The approval artifact should identify the displayed price difference and carry a server-issued signature or hash over the accepted terms. A generic click recorded before the revision is insufficient evidence of acceptance.

The illustrative supplier adapter returns hold H317-A at 21:44 with an explicit expiry at 21:52. These are invented fixture times, not an asserted vendor policy. At 21:53 the hold has expired, so booking against H317-A is forbidden. Refresh inventory, passenger restrictions, boarding data, and price; the fixture returns the same L2 and U3 selection at GBP 64. Obtain a new hold, H317-B, at 21:54 with supplier-reported expiry 22:02, and retain evidence that the approved terms still match.

eTravelSmart's cited BlockTicket documentation describes a ten-minute blocking period for that operation. This does not establish a universal hold time for all suppliers or inventory types. TBO's GetBooking reference includes BlockDuration in its itinerary response and directs readers to the relevant block method. A platform should use contract-specific expiry information where available, apply conservative server-side deadlines, and never invent a fixed timer because a different provider's example did so.

Book Once; Reconcile Ambiguous Outcomes

Send a booking command only for a valid, unexpired hold and an approved normalized offer. Bind it to a durable internal order ID, a provider-specific transaction reference, and an idempotency control enforced by the TravelTech365 application. The adapter should serialize the exact seat and passenger pairs required by its contracted supplier. Do not assume that a supplier supports an idempotency header unless its agreement explicitly documents one.

At illustrative 21:56, booking against H317-B is submitted, but the network response is lost. Mark order ORDER-317 as UNRESOLVED, not failed and not confirmed. Do not immediately send another purchase request. Payment state, supplier state, and customer-facing ticket state remain separate until reconciliation establishes the actual outcome.

For an eTravelSmart path, correlate the block key, any received ETS ticket identifier, and its documented ticket-retrieval operations. For a TBO path, the documented GetBookingDetail supports retrieval based on booking identifiers and states that the booking TraceId may help when the bus ID or confirmation number is unavailable. Its response describes ticket status values including tentative, confirmed, cancelled, failed, and pending. These paths are alternatives within their vendor scopes, not interchangeable endpoints.

The illustrative reconciliation lookup at 21:57 returns confirmed ticket reference ET17 and operator reference OP17, both explicitly fictional values in this test. Promote the local order to CONFIRMED only after matching the supplier outcome to journey, two travelers, L2 and U3, boarding and drop selections, and GBP 64. Store confirmation provenance, raw reference values, response timestamp, and reconciliation attempt ID. Releasing a ticket to the user before those checks risks showing a confirmation belonging to another booking.

If the lookup returns pending or is temporarily unavailable, keep the order unresolved and retry the read-only status check with bounded backoff. If it returns failure, inspect whether a ticket or charge already exists before initiating a replacement transaction. On contradictory results, route the record for operator investigation with purchasing disabled. Never treat a timeout, empty response, or missing operator reference as proof that inventory was not sold.

Filled State-Transition Fixture and Audit Events

The following sequence contains all inputs necessary to replay the important transitions. Every value in this table is illustrative. Time stamps refer to 8 December 2026 in Europe/London, and each event records its own revision and commercial context. A production event store should also capture request correlation, source response hashes, and credential-safe error metadata, with personal identifiers masked in operational logs.

Illustrative COACH-317 event timeline with expected persisted states
Local time Event and fixture data Persisted result
21:40 REV-1: P-A/L2 GBP 28; P-B/U2 GBP 34 Quote GBP 62, selection draft
21:42 REV-2: U2 removed; U3 offered GBP 36 Old P-B assignment invalid
21:43 APPROVAL-317: L2/U3, GBP 64, customer accepts New offer approved
21:44 H317-A, expiry 21:52 Hold active
21:53 H317-A expired; same GBP 64 requoted Old hold unusable
21:54 H317-B, expiry 22:02; terms unchanged New hold active
21:56 ORDER-317 booking sent; transport timeout UNRESOLVED; no duplicate send
21:57 Status lookup: confirmed, ET17, OP17 CONFIRMED; ticket verified

Acceptance Tests for Seat Map and Booking Behavior

Run contract tests against a mock adapter containing the complete fixture, plus vendor-specific schema tests using permitted documentation examples. Integration tests must observe outbound requests so a supposedly disabled operation cannot still reach the provider. Accessibility tests should use keyboard navigation and announced labels for deck, seat, price, availability, and restrictions. Test responses arriving out of order as well as the happy path.

Required acceptance criteria with reproducible illustrative inputs
ID Given and action Expected result
AC-01 REV-1 has L2 and U2 at row 2, column 2 on decks 0 and 1 Two distinct selectable records and supplier keys; no overwrite
AC-02 Lower-deck aisle and exit cells are rendered and clicked They are announced as static, cannot be selected, priced, or booked
AC-03 Inject a two-cell sleeper, then overlapping or out-of-bounds geometry Single sleeper selection; invalid layout rejected with diagnostic
AC-04 Select P-A/L2 and P-B/U2 on REV-1 GBP 28 + GBP 34 = GBP 62; base GBP 55, tax GBP 3, charges GBP 4
AC-05 Apply REV-2 removing U2 P-B becomes unassigned; stale U2 cannot enter hold payload
AC-06 Offer U3 at GBP 36 and choose it without approving GBP 64 shown; hold and booking remain disabled
AC-07 Accept APPROVAL-317 for L2/U3 and GBP 64 Approval tied to revision, traveler pairs, points, and total
AC-08 Serialize P-A and P-B after approval Exactly two unique supplier seats and two traveler mappings, no duplicates
AC-09 Render BOARD-7 23:35 and DROP-2 06:10 Bay C shown; drop date is 9 December, not 8 December
AC-10 Advance server clock beyond H317-A expiry Old hold rejected, fresh inventory and hold required
AC-11 Timeout after sending booking against H317-B Order unresolved; no second purchase request on refresh
AC-12 Lookup returns confirmed references ET17 and OP17 Match all booking facts, confirm once, persist both references
AC-13 Lookup remains pending or returns a mismatched seat or total No confirmation; controlled retries or manual escalation
AC-14 Switch to TBO or eTravelSmart serializer Only that vendor's documented fields and identification method are used

Operational Controls and Supplier-Specific Verification

Request Correlation and Secure Handling

Log supplier name, operation, normalized order, journey reference, revision, seat keys, hold reference, correlation ID, elapsed time, and response category. Exclude passwords, authentication tokens, full identity numbers, and raw payment credentials. Store necessary passenger data under retention and access controls appropriate to the deployed business. Separate retriable transport faults from definitive supplier denials and schema-validation failures; metrics should show unresolved bookings aging over time.

eTravelSmart documents Digest Authentication, approved source IP addresses, and provider-specific endpoints; those details belong to its adapter configuration. TBO documents token, trace, end-user IP, and result-index request fields for seat layout. Validate authentication and IP routing in the appropriate integration environment rather than embedding secrets in client-side seat-map code. The client should call a controlled backend that performs authorization and preserves audit evidence.

Concrete Verification and Handoff Checklist

The implementation is ready for handoff only when a reviewer can reproduce the entire COACH-317 journey using committed test fixtures and confirm the following evidence. All example values below remain illustrative, never production tickets or customer history.

  1. Verify the adapter contract references the three official documents linked above, keeps eTravelSmart and TBO field mappings separate, and records unsupported supplier features as unknown rather than fabricated.
  2. Open both decks and verify L2 and U2 share coordinates but not supplier identity; static aisle and exit cells are non-bookable, and sleeper footprints occupy the expected cells without creating extra inventory.
  3. Export the first quote with GBP 25 plus 1 plus 2 for L2, GBP 30 plus 2 plus 2 for U2, and exactly GBP 62 for two travelers.
  4. Apply REV-2; show the U2 removal, unassign P-B, offer U3 at GBP 36, and capture explicit approval for GBP 64 before allowing a hold.
  5. Inspect the final manifest: P-A/L2, P-B/U3, BOARD-7 Bay C at 23:35 on 8 December, and DROP-2 at 06:10 on 9 December in the specified time zone.
  6. Expire H317-A, verify it cannot be booked, refresh the unchanged approved terms, and confirm that H317-B has its own supplier-reported deadline without assuming a universal hold duration.
  7. Inject the lost booking response, verify ORDER-317 remains unresolved without a duplicate purchase, then reconcile a confirmed outcome bearing ET17 and OP17.
  8. Attach passing test results for AC-01 through AC-14, payload redactions, source-to-normalized field crosswalks, approval record, hold history, audit trail, and a named operational owner for pending or conflicting bookings.

Handoff is blocked if any identifier is inferred from screen position, any replaced seat is auto-approved, any expired hold is reused, or any ambiguous purchase is blindly repeated. The delivered artifact is a verifiable seat-to-passenger booking workflow: two valid seats, two assigned travelers, a reconciled GBP 64 payment, correct overnight points, and exactly one confirmed ticket outcome.