Consolidated Routehappy Endpoint

The Consolidated Routehappy endpoint provides access to all Routehappy Content types - Amenities, UPAs, and UTAs - from a single request, with a new schema and new functionality compared with the previous Routehappy Rich Content APIs.

Request parameters

The top-level parameters in a request to the Consolidated Routehappy endpoint are req_id, acct_code, control, currency, data, pcc, travel_agency_id, and office_id. Much of the definition of your request will fall within the control and data parameters.

Field Name Description Type Values
req_id (optional) Request identifier that you can set (up to 50 characters). You will receive the same identifier in the response. String
acct_code (optional) Needed for corporate fares String
control (optional) Wrapper for the specifications of the types of Routehappy content to be included in the response Object
currency (optional) The type of currency for which the ticket was purchased String currency codes
data Wrapper for the specifications of the requested tickets/reservations Object
pcc (optional) A pseudo city code. This code is used in ATPCO fare filings to determine if the sales channel has access to this data String
travel_agency_id (optional) A Travel Agency ID code. This code is used in ATPCO fare filings to determine if the sales channel has access to this data String
office_id (optional) An Office ID code. The first 3 characters represent the office location IATA city code, and the rest of the characters represent the office ID. The office location and ID codes are used in ATPCO fare filings to determine if the sales channel has access to this data String

Channels that provide security codes need to use just one of pcc, travel_agency_id or office_id, they are not required to pass all three at the same time. In case more than one of the fields are provided at the same time, pcc will take precedence over travel_agency_id, and travel_agency_id will take precedence over office_id.

Request identifier

Use the req_id parameter when you need to tie any request to its response with your own string. The response returns a field with the same value as passed in the request. Please note that the uniqueness of this value is your responsibility.

Example

To receive a response to this request containing your unique string, include the req_id field in the request as such:

Copy
Copied
{
    "req_id": "some_unique_string",
    "data": {
        "itineraries": [
            {
                "segments": [
                    {
                        "arr": "TPE",
                        "cabin": 3,
                        "cxr": "BR",
                        "date": "2022-09-08",
                        "dep": "CDG",
                        "fltno": 88,
                        "rbd": "C"
                    }
                ]
            }
        ]
    }
}

In return, you'd get something similar to:

Copy
Copied
{
    "req_id": "some_unique_string",
    "data": {
        "advance_change": [],
        "amenity": {
            "aircrafts": [
                {
                    "cabin_pressure": "normal",
                    "display_text": "777 (widebody)",
                    "id": "3",
                    "model": "777",
                    "quality": "standard",
                    "type": "widebody",
                    "updated_at": "2016-05-31T10:00:47Z",
                    "window_size": "standard"
                }
            ],
    // ...

Control parameters

Control parameters are all specified within a control object in the request body and describe the specifications of the types of Routehappy Content to be included in the response.

Copy
Copied
{
	"control" : {
		// control parameters go here
	},
	// ...
}
Field Name Description Type Values
includes (optional) Specifies which Routehappy Content types to include in the response Array amenity, upa, uta
include_rq (optional) Use if you would like to include the segment/flight information in the response. This is important if you want to map back to flight segments but the request data is not available. Boolean true, false

Amenities control

Field Name Description Type Values
amenity_categories_filter (optional) Specifies which amenities categories and summaries should be in the response Array aircraft, beverage, entertainment, fresh_food, layout, power, seat, wifi, aircraft_summary, entertainment_summary, fresh_food_summary, layout_summary, power_summary, seat_summary, wifi_summary

UPAs control

Field Name Description Type Values
upa_categories_filter (optional) Specifies which UPA categories should be in the response Array seat, wi-fi, meals, lounge, and others (more information coming soon)
upa_sources_filter (optional) Specifies which UPAs should be in the response, based on their source Array ATPCO, airline
disable_upa_photo (optional) Specifies whether photos should be ommitted from the response Boolean true, false
disable_upa_tour (optional) Specifies whether tours should be ommitted from the response Boolean true, false
disable_upa_video (optional) Specifies whether videos should be ommitted from the response Boolean true, false
disable_upa_infographics (optional) Specifies whether infographic should be ommitted from the response Boolean true, false
disable_upa_marketing_graphics (optional) Specifies whether marketing graphics should be ommitted from the response Boolean true, false

Segments Control

Field Name Description Type Values
disable_technical_stops (optional) Specifies whether technical stops (hidden segments) should be omitted from the response. Setting this to true will show each segment in the response as it was passed in the request without expanding it to include technical stops. Boolean true, false

UTAs control

Field Name Description Type Values
ticket_attributes_filter (optional) Specifies which UTA categories should be in the response Array advance_change, boarding_priority, brand, cancellation, carry_on_baggage, checked_baggage, check_in_priority, lounge_access, same_day_change, seat_selection, upgrade_eligibility
os_override (optional) Specifies which types of data the Routehappy API should process using data from branded fares instead of baggage engine Array advance_change, cancellation, carry_on_baggage, checked_baggage

Data parameters

Data parameters are all specified within a data object in the request body and describe the specifications of the requested tickets/reservations.

Copy
Copied
{
	// ...
	"data" : {
		// control parameters go here
	},
	// ...
}
Field Name Description Type Values
tkt_date (optional) Ticketing date Date-formatted string YYYY-MM-DD
res_date (optional) Date that the reservation was made Date-formatted string YYYY-MM-DD
itineraries List of itineraries (objects) in the request Array

Itinerary parameters

Itinerary parameters reside within the itineraries array and describe the specification of single itinerary.

Field Name Description Type Values
pos (optional) Point of sale of the ticket. Can be a city, country, or airport (2-3 letter code) String IATA codes
psgrs (optional*) List containing a single passenger type (string). Include one type of passenger on the ticket and the passenger type will be mapped to data.

* psgrs defaults to ADT if not included when when requesting UPAs or UTAs
Array ADT, CNN, and others
src (optional*) Where the pricing/fare came from String
segments List of flight segments (objects) Array

Segment parameters

Segment parameters reside within the segments array and describe the specification of a single segment.

Field Name Description Type Values
arr Arrival airport for the itinerary segment String IATA codes
cabin Cabin of the fare where 1=economy, 2=premium economy, 3=business, 4=first integer 1-4
cxr Carrier for the itinerary segment String IATA codes
date Departure date for the itinerary segment Date-formatted string YYYY-MM-DD
dep Departure airport for the itinerary segment String IATA codes
fbc (optional) Fare basis code. This field is required when fare-related/brand information is requested (for example, UPAs or UTAs) String
fltno Flight number for the itinerary segment integer 1-9999
rbd (optional) Reservation booking designator for the itinerary segment upper-case character A-Z

Header controls

Some settings are controlled by the headers, which are for general usage and not tightly related to the itineraries.

Header Name Value Type Values
Accept-Language A valid ISO-639 2-alpha code language (for example, us) or 2-alpha code language with region-specific code (for example, en-UK). This changes the language in the response wherever applicable. Priority input in all the languages is supported. The default language is en. String ATPCO supported languages
x-seller-id A custom designator that marks the ID of a seller on whose behalf you are making the request. integer 8 characters

Example of using both headers in a request:

Copy
Copied
curl --location --request POST 'https://retailing.apis.atpco.net/retailing/consolidated' \
--header 'Content-Type: application/json' \
--header 'x-seller-id: 12345678' \
--header 'Accept-Language: en-UK' \
--header 'Authorization: Bearer token'\
--data-raw '{
    "data": {
        "itineraries": [
            {
                "segments": [
                    {
                        "dep": "IAD",
                        "arr": "MUC",
                        "cxr": "UA",
                        "fltno": 106,
                        "date": "2022-06-17",
                        "cabin": 1,
                        "fbc": "HH346LGT",
                        "rbd": "H"
                    }
                ]
            }
        ]
    }
}'