Working with seat classes

What is a Seat Class?

A Seat Class is a level of service that is offered to passengers. An operator can configure one or more Seat Classes in the system, and passengers can choose which Seat Class they'd like to travel in whenever they make a reservation (only in product whit early seat selection). The price of the passenger's ticket will vary depending on which Seat Class they choose.

Seat classes can be used to differentiate the type of seats on a seat-map and provide different prices at the seat level. Once created you can assign a seat class to a seat on the seat-map editor. You can control prices in the Pricing section.

For example, an operator could configure two Seat Classes, named "Ejecutive" and "VIP". The "Ejecutive" class may have reduced leg room. The Premium class may have extra leg room and more comforts, in exchange for a higher price.

Not all Seat Classes will be available for all trips. The API response of GET /inventory/trips will indicate which Seat Classes are available.

Add a new Seat Class

Use the /inventory/seat-classes endpoint.

The call will create a seat class and return information about it, including the seatClassId.

When the implement of Seat Classes the response of the GET /inventory/trips endpoint change. Now, the endpoint will return the base prices array into every segment.

// Example trip search results

{
  "departures": [
   {
    ...
     "segments": [
        {
          ...
          "basePrices": [
            {
              "price": 2500000,
              "seatClassId": null,
              "fareClassId": null,
              "fares": [
                {
                  "id": "52f96daea8663b2704000017",
                  "name": "Adult",
                  "valueToDisplay": "25.00",
                  ...
                },
                  {
                  "id": "UJM96daea8663b2704000017",
                  "name": "Child",
                  "valueToDisplay": "20.00",
                  ...
                } 
              ],
            }, {
              "price": 4900000,
              "seatClassId": "ERf96daea8663b2704000012",
              "fareClassId": "JKM96daea8663b2704000012",
              "fares": [
                {
                  "id": "45676daea8663b2704000017",
                  "name": "Adult",
                  "valueToDisplay": "49.00",
                  ...
                },
                  {
                  "id": "uh23daea8663b2704000017",
                  "name": "Child",
                  "valueToDisplay": "43.00",
                  ...
                } 
              ],
            }
          ]
        }
      ]
      ...
    }
  ],
  "returns": [...]
}

Changes to the user flow

In addition to selecting the desired round trip, when the passenger selects a seat in seatmap with an assigned seat class the value of the trip will change according to the value assigned to that seat class. Note that different trips may have a different set of seat classes available.

Changes to the shopping cart

When the passenger chooses a seat with a seat class, the seat class name selected by the passenger must be provided to the POST /sales/cart endpoint. This endpoint is called when reservations are added to the user's shopping cart:

// Example request body to POST /sales/cart

{
 ...
  "items": {
    "tickets": [
      {
        ...
        "passengers": [
          {
            "firstName": "Jane",
            "lastName": "Doe",
            "fare": "Adult",
            "fareId": "52f96daea8663b2704000017",
            ...
            "seats": [
              {
                ...
                "seatClass": null,
                "seatClassName": null
              }
            ]
            
          }, {
            "firstName": "Joel",
            "lastName": "Miller",
            "fare": "Child",
            "fareId": "52f96daea8663b2704000017",
            ...
            "seats": [
              {
                ...
                "seatClass": "44frdaea8663b27045245517",
                "seatClassName": "VIP"
              }
            ]
          }
        ]
      }
    ]
  }
}

After purchasing

The passenger's purchased ticket will display the name of their selected Seat Class.