Guides

Seating manager handles seating offers and seat reservations. A seating offer contains data for the seats in the material used on a dated service journey.

Authentication

The Seating manager requires a Bearer Token in the Authorization header created by the Entur Authentication server to be passed for every request.

Table of Contents

  1. Create reservations
    1. Create a reservation and reserve seats by seating properties
    2. Create a reservation with a specific seat and/or compartment
  2. Altering a seat reservation

Create reservations

There are two different ways to create reservations depending on your use case.

  1. Create a reservation and reserve seats by SeatingProperties
  2. Create a reservation with a specific seat

Create a reservation and reserve seats by seating properties

POST /v1-beta/reservations/allocate

Create a DRAFT reservation and reserve seat and compartment by seating properties

The following example shows how to reserve a single seating standard seat, and in the same request reserve a sleeper compartment on the same journey. The reservation is from Oslo to Stavanger on the 12th of December 2023. Two reservation lines connected to the same reservation will be generated based on the following seating properties requests. The first seating properties request indicates that the seating properties to reserve is STANDARD fareClass and seating accommodation facility SEATING (read more about SeatingProperties). The second seating properties request indicates that the seating properties to reserve is PREMIUM_CLASS fareClass and seating accommodation facility SLEEPER. For the compartment reservation line to be valid one must supply the mustReserveWholeCompartment flag as true. In the following example, the reservation is created as a DRAFT reservation and marked as connected to a orderId(A1B2C3D4) in an external sales system.

Create a reservation with a specific seat and/or compartment

The case here is that you have the seat number and element carriage number of a specific seat and/or compartment belonging to a specific dated service journey and want to create a reservation for that seat and/or compartment. A common use case is that the traveler is provided with a seat map and selects a seat and then the client generate a reservation request based on that seat. The following example shows how to create a single seating standard seat reservation and reserve a specific seat with seat number 21 and element carriage number 7 and a couchette compartment on the dated service journey VYG:DatedServiceJourney:606_BRG-OSL_23-12-10 on the 12th of Desember in 2023. The travelers wants to travel from Bergen rail station to Oslo S. The reservation reference and reservation line reference will both be generated by Seating Manager.

POST /v1-beta/reservations/

Altering a seat reservation

Reservations in seating manager can be changed by using the API.

Creating and altering a reservation

When a reservation is first created it will have status=DRAFT. Seats are reserved by adding reservation lines, e.g. we can make a SingleSeatReservationLine that occupies SeatNumber 1 in carriage number 1. Changes to reservation lines in a DRAFT reservation is effectuated immediately and the reservation will remain in DRAFT state. For instance, we can send a PUT request that reserves SeatNumber 2. SeatNumber 1 will then be freed up and available for other customers.

Altering a confirmed reservation

When a reservation is in CONFIRMED state, all changes to the reservation will result in a new version of the reservation. The old version will still be CONFIRMED, and a new DRAFT version will be returned to the client (with the version-field incremented by 1). Seats that was reserved in the CONFIRMED state, but are no longer present in the DRAFT reservation is not yet released, thus the CONFIRMED version can still occupy seats. They are not released until the DRAFT version is CONFIRMED. Confirmation of a DRAFT reservation is thus analogous to a commit in a version control system like git. Upon confirmation, the previous CONFIRMED version gets status DEPRECATED and is only relevant for historical purposes.

When a reservation is in CANCELLED state, it cannot be changed anymore.

Seating manager API Reference

See the API reference on Swagger Petstore