A group travel enquiry can arrive as one long message:

“Twelve passengers, leaving Ahmedabad on Friday, returning Sunday, with two pickup points and several suitcases.”

A person can interpret that message, but a booking application needs a consistent structure.

This article proposes a small JSON model for collecting trip requirements. It is an illustrative design, not an implementation report or a complete booking API.

1. Model the enquiry before designing the screen

Start by identifying the information the operator needs:

  • Outward and return travel dates
  • Pickup locations and destination
  • Passenger count
  • Luggage requirements
  • Vehicle preference
  • Additional notes

Keep related fields together. This makes the payload easier to read and gives the frontend and backend a shared vocabulary.

2. Use a small, explicit request structure

Here is a fictional example:

{ "schemaVersion": 1, "trip": { "type": "round_trip", "departureDate": "2027-01-15", "returnDate": "2027-01-17", "pickupLocations": [ { "address": "Example pickup point A, Ahmedabad" }, { "address": "Example pickup point B, Ahmedabad" } ], "destination": { "address": "Example destination hotel, Gujarat" } }, "group": { "passengerCount": 12, "luggage": { "suitcases": 6, "smallBags": 4, "notes": "" } }, "preferences": { "vehicleType": "urbania" }, "notes": "Please confirm luggage space and the seating layout." } 

The passenger count is a number, not a phrase such as "around twelve".

Pickup locations form an array because a journey may involve more than one collection point.

The vehicle field records a preference. It does not reserve a vehicle or confirm that it can accommodate the group.

3. Define what empty values mean

Optional fields need documented behaviour.

For a one-way trip, you could require:

{ "type": "one_way", "returnDate": null } 

For a round trip, require a valid return date on or after departure.

Choose one convention for missing return dates and document it. Allowing null, an empty string and "not decided" interchangeably creates unnecessary work for every consumer of the API.

If undecided return travel is a supported business case, model it explicitly rather than silently treating it as one-way travel.

4. Distinguish valid JSON from valid business data

A payload can be valid JSON while containing unsuitable values.

For example:

{ "passengerCount": -3 } 

The syntax is valid. The passenger count is not.

Define validation rules for the application:

  • Passenger count must be a positive integer.
  • Luggage counts must be non-negative integers.
  • Required addresses must contain meaningful text.
  • Dates must represent real calendar dates.
  • Round-trip return dates cannot precede departure.
  • Trip type and vehicle preference must use supported values.
  • Text fields and pickup arrays need reasonable size limits.

These rules should run on the server. Browser validation can help visitors correct mistakes earlier, but it cannot replace server-side checks.

5. Keep dates distinct from timestamps

The example stores travel dates as date-only strings.

If you later collect pickup times, define their timezone explicitly. A departure date and an exact moment in time represent different requirements.

Document the expected format and validate it consistently. Do not rely on users entering a date inside a free-text notes field.

6. Keep operational decisions on the server

A visitor can request a vehicle type. They should not be able to declare their own confirmed price or booking status through the enquiry payload.

After accepting an enquiry, the server might return:

{ "enquiryId": "demo-enquiry-001", "status": "received" } 

The interface can then display:

“Your enquiry has been received. Availability and pricing still need confirmation.”

Receiving an enquiry, issuing a quotation and confirming a booking are separate events.

7. Extend the model only when necessary

A production application may also need contact information, sightseeing stops, accessibility requirements or separate return passenger counts.

Add fields when they support an actual workflow. Keep the schema documented and agree on how older clients will behave when it changes.

A clear enquiry structure helps the interface ask useful questions and lets the operator review the journey without reconstructing it from a paragraph.

References

Disclosure: This article, illustrative examples and cover image were created with AI assistance.