Switch to dark mode

Accessibility Needs

A passenger who travels in their own wheelchair needs a wheelchair space on board. State it as one of the passenger's PRM needs (needs of a passenger with reduced mobility) when you get offers. We pass the need on to the operators. An operator that reserves wheelchair spaces returns only offers that come with one, and holds a space for the passenger when the order pre-books the tickets. Other operators return their usual offers.

WHEELCHAIR is the only need today. More may be added.

A space, not assistance

A wheelchair space is a place on the train. It does not book help with boarding, getting off or changing trains: the passenger arranges that with the operator.

Stating a need

Add prmNeeds to the passenger in PassengerPlaceholderInput when you price the journey with journeyOffer or combinedJourneyOffer. Leaving it out, or sending an empty list, states no need.

A need belongs to one passenger, and the people traveling with them don't state it. It can still change what the whole party is offered. SJ, for example, has wheelchair spaces in second class only and outside its quiet coach, so a search with a wheelchair user gets no SJ first class or quiet coach tickets for anyone in the party.

Example: Get offers for a wheelchair user and a companion

subscription GetJourneyOffer {
  journeyOffer(
    journeyId: "af6f8ccb-0a4f-4fec-a21c-6f20c30bf2af"
    passengers: [{ type: ADULT, prmNeeds: [WHEELCHAIR] }, { type: ADULT }]
  ) {
    status
    itinerary {
      ... on SegmentCollection {
        offers {
          id
          price {
            amount
            currency
          }
          unconfirmedPrmNeeds
        }
      }
    }
  }
}
{
  "data": {
    "journeyOffer": {
      "status": "SUCCESS",
      "itinerary": [
        {
          "offers": [
            {
              "id": "offer_s1p0j7q0j7q18624v5j6n15751",
              "price": { "amount": 79800, "currency": "SEK" },
              "unconfirmedPrmNeeds": []
            }
          ]
        }
      ]
    }
  }
}

Unconfirmed needs

Not every operator can be told a need. Each Offer has unconfirmedPrmNeeds, the stated needs the operator selling that offer could not be told:

  • Empty: The operator was told every stated need. This is not proof of a space: an operator that doesn't reserve wheelchair spaces returns its usual offers. The place held says whether the passenger got one.
  • [WHEELCHAIR]: The operator could not be told about the wheelchair. The offer can still be bought, but nothing guarantees a space on board, so buying it is at the passenger's own risk. Tell the passenger so before they buy.

Read the field on each offer: one journey can mix offers whose operator was told with offers whose operator wasn't.

Creating the booking

A booking takes its passengers' needs from the offers it is created from. At createBooking, leave prmNeeds out, or send the needs you priced with. Different needs are refused.

The place held

Once createOrder has pre-booked the tickets, the place each passenger holds is in the placeAssignments of the booking's reservation parts. Read it before the passenger pays. Each PlaceAssignment has prmNeeds: the passenger's needs that the place meets, read from the place the operator holds. WHEELCHAIR there means it is a wheelchair space. A need the passenger stated that is missing there was not met. Before the order is created the list is empty, as no place is held yet.

Example: Read the place held

query Booking($id: ID!) {
  node(id: $id) {
    ... on Booking {
      passengers {
        id
        prmNeeds
      }
      selections {
        ... on JourneyOfferSelection {
          offers {
            parts {
              ... on ReservationPart {
                placeAssignments {
                  passenger {
                    id
                  }
                  prmNeeds
                  ... on SeatAssignment {
                    coachIdentifier
                    seatIdentifier
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
{
  "data": {
    "node": {
      "passengers": [
        { "id": "pax_01kb3m4q7fe0b9t2wq5x8r6n1c", "prmNeeds": ["WHEELCHAIR"] },
        { "id": "pax_01kb3m4q7fe0b9t2wq5x8r6n1d", "prmNeeds": [] }
      ],
      "selections": [
        {
          "offers": [
            {
              "parts": [
                {
                  "placeAssignments": [
                    {
                      "passenger": { "id": "pax_01kb3m4q7fe0b9t2wq5x8r6n1c" },
                      "prmNeeds": ["WHEELCHAIR"],
                      "coachIdentifier": "7",
                      "seatIdentifier": "80"
                    },
                    {
                      "passenger": { "id": "pax_01kb3m4q7fe0b9t2wq5x8r6n1d" },
                      "prmNeeds": [],
                      "coachIdentifier": "7",
                      "seatIdentifier": "2"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Needs are fixed at creation

Every Passenger on a booking or an order has prmNeeds, the needs it was priced and booked with, and an empty list when it has none.

A need decides which offers come back, so it can't change once the booking exists, and updateBooking takes no prmNeeds. A passenger who forgot to state a need, or stated one by mistake, has to get offers again and create a new booking. Make that clear before your users search.

Next steps

Getting Offers
How offers and passengers work in general.
Booking Tickets
From offers to issued tickets.