Skip to content
Edwin van den Belt edited this page Feb 24, 2023 · 28 revisions

Use cases Planning & Booking

For the complete list of use cases, see Use cases.

PB1

Description

The end-user has found a specific asset on the street (like a free parking spot, a bike, or shared car) or a route planner has returned all needed information to book an asset (like a tram line, bus, or train seat). This information is enough to book the asset directly.

Implementation

Type object remarks
Endpoint POST /bookings/one-stop
Process identifier booking.ONE_STOP
Process identifier booking.AUTO_COMMIT don't use this one in case you want to provide a 2-phase booking, see PB3

PB2

Description

As a TO, you want to be able to serve multiple options for a trip request. Like (PT case) serving a first-class or second-class ticket (or even day, week, or month tickets), (shared-car case) different types of cars, with or without insurance, etc.

Implementation

Type object remarks
Endpoint POST /planning/offers provides the bookable options
Endpoint POST /bookings book one of the options
Process identifier booking.NORMAL
Process identifier booking.AUTO_COMMIT don't use this one in case you want to provide a 2-phase booking, see PB3

PB3

Description

An MP or reseller often combines multiple legs together to establish one trip. Each part (legs) must be found and booked separately. In case one of the suppliers of the legs offers something, but during the booking process the offer is retracted, it cannot be confirmed. In that case, it might also be needed to roll back the other bookings. Therefore the default TOMP process provides a 2-phase booking. When you're not complying with it (and use 'AUTO_COMMIT'), the MP needs to CANCEL the booking, with possible financial consequences.

Implementation

Type object remarks
Endpoint POST /bookings/{id}/events operation: COMMIT
Clone this wiki locally