API

Sections

Theme switcher

Passenger Types

Distribusion also makes it easier to integrate a large variety of carriers by harmonizing all available passenger types into standardized codes.

Codes

Carriers will support at least one of these 5 codes:

  • PINT: Infant
  • PCIL: Child
  • PYPO: Youth
  • PNOS: Adult
  • PSOE: Senior

Some carriers even support other passenger codes such as PSAD, PAOV, PCUU or PCUN, each with their own definition of age ranges.

To start selling Distribusion inventory, at minimum the passenger type Adult (PNOS) must be integrated. We recommend integrating all passenger types in order to be able to provide full parity on discounts to your customers, where available.

Age Range

The availability and age range of each passenger type is dependent upon the respective marketing carrier’s policies. This information can be found in the /marketing_carriers/{marketing_carrier_id} endpoint. The response displays the available passenger types for the respective carrier and details the age brackets associated with each available passenger type.

We recommend that you cache this information regularly (once a week for example) and use it for the ages of passengers to the passenger types supported by the carrier.

JSON
{
"id": "PNOS",
"type": "passenger_types",
"attributes": {
"code": "PNOS",
"name": "Adult",
"description": "",
"min_age": 30,
"max_age": 64
}
},
{
"id": "PCIL",
"type": "passenger_types",
"attributes": {
"code": "PCIL",
"name": "Child",
"description": "",
"min_age": 0,
"max_age": 13
}
},
{
"id": "PYPO",
"type": "passenger_types",
"attributes": {
"code": "PYPO",
"name": "Youth",
"description": "",
"min_age": 14,
"max_age": 29
}
},
{
"id": "PSOE",
"type": "passenger_types",
"attributes": {
"code": "PSOE",
"name": "Senior",
"description": "",
"min_age": 65,
"max_age": 99
}
}

Infant Seats

Carriers handles infant tickets in two forms.

Free Infant Without Seat

Some carriers don't require a ticket at all for infants as long as they don't need a seat. In this scenario there is no passenger type and there is a gap in ages you get from /marketing_carriers/{marketing_carrier_id} endpoint.

For example PCIL (4-16) and PNOS (17-99). This indicates that infants (0-3) travel free and don't need to be booked, but also do not get a seat. In this case, if the pax wants a seat a ticket has to be booked as PCIL or PNOS.

Free/Paid Infant With Seats

Some carriers have the passenger type PINT (Infant) with 100% discount or some discount. In this case, the pax gets a seat.

Passenger Restrictions

Some passenger types, like children and infants, are not allowed to travel alone and must be accompanied by an adult. These requirements are defined by carriers using passenger_group_rule_parameters, which can be retrieved from the /marketing_carriers/{marketing_carrier_id} endpoint.

In the example below, the carrier lists these requirements:

  1. Group Size Limit: You can book for up to 9 people at once.
  2. Adults Required: If your group includes children (PCIL) or infants (PINT), there must be at least one adult (PNOS) traveling with them. Kids and infants can’t travel alone.
  3. Infant Rule: For every infant (PINT) in the group, there must be at least one adult (PNOS). So, 2 infants need at least 2 adults, and so on.
Plain text

API Workflow

  1. Let's assume the pax group consists of one person aged 40, two people aged 16, and one person aged 10.
  2. Perform the /connections/find request specifying the exact (or max) age of each passenger. For instance, in this case the request would include the parameters passengers[][pax]=1&passengers[][max_age]=40&passengers[][pax]=2&passengers[][max_age]=16&passengers[][pax]=1&passengers[][max_age]=10.
  3. Map the ages of passengers to the passenger types supported by the carrier selected by the user. This can be done using the /marketing_carriers/{marketing_carrier_id} endpoint as explained in the ‘Age Range’ section above.
  4. For Italo for example, passenger types are PCIL (0–13), PYPO (14–29), PNOS (30–64), and PSOE (65–99). Given 1 pax (40 y/o), 2 pax (16 y/o), and 1 pax (10 y/o), the breakdown is: 1 PCIL, 2 PYPO, 1 PNOS.
  5. Perform the /connections/vacancy request using the passenger type codes as passengers[][pax]=1&type=PNOS&passengers[][pax]=2&type=PCIL&passengers[][pax]=1&type=PYPO.
  6. In the /reservations/create request include the passenger detals as in the example below. The /reservations/confirm request should be structured in a similar way.
JSON
{ "marketing_carrier": "ITAL", "departure_station": "ITROMRAE", "arrival_station": "ITMILMRE", "departure_time": "2024-11-26T05:40", "arrival_time": "2024-11-26T09:08", "retailer_partner_number": "{{rpn}}", "fare_class": "FARE-4", "locale": "en", "currency": "EUR", "passengers": [ { "type": "PNOS" }, { "type": "PYPO" }, { "type": "PYPO" }, { "type": "PCIL" } ]
}
}
Was this section helpful?

What made this section unhelpful for you?

On this page
  • Passenger Types
View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot