File: qpxExpress_v1.trips.html

package info (click to toggle)
python-googleapi 1.7.11-4
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 110,952 kB
  • sloc: python: 7,784; javascript: 249; makefile: 59; sh: 53; xml: 5
file content (305 lines) | stat: -rw-r--r-- 23,755 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="qpxExpress_v1.html">QPX Express API</a> . <a href="qpxExpress_v1.trips.html">trips</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#search">search(body)</a></code></p>
<p class="firstline">Returns a list of flights.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="search">search(body)</code>
  <pre>Returns a list of flights.

Args:
  body: object, The request body. (required)
    The object takes the form of:

{ # A QPX Express search request.
    "request": { # A QPX Express search request, which will yield one or more solutions. # A QPX Express search request. Required values are at least one adult or senior passenger, an origin, a destination, and a date.
      "passengers": { # The number and type of passengers. Unfortunately the definition of an infant, child, adult, and senior citizen varies across carriers and reservation systems. # Counts for each passenger type in the request.
        "kind": "qpxexpress#passengerCounts", # Identifies this as a passenger count object, representing the number of passengers. Value: the fixed string qpxexpress#passengerCounts.
        "infantInLapCount": 42, # The number of passengers that are infants travelling in the lap of an adult.
        "seniorCount": 42, # The number of passengers that are senior citizens.
        "infantInSeatCount": 42, # The number of passengers that are infants each assigned a seat.
        "childCount": 42, # The number of passengers that are children.
        "adultCount": 42, # The number of passengers that are adults.
      },
      "slice": [ # The slices that make up the itinerary of this trip. A slice represents a traveler's intent, the portion of a low-fare search corresponding to a traveler's request to get between two points. One-way journeys are generally expressed using one slice, round-trips using two. An example of a one slice trip with three segments might be BOS-SYD, SYD-LAX, LAX-BOS if the traveler only stopped in SYD and LAX just long enough to change planes.
        { # Criteria a desired slice must satisfy.
          "origin": "A String", # Airport or city IATA designator of the origin.
          "preferredCabin": "A String", # Prefer solutions that book in this cabin for this slice. Allowed values are COACH, PREMIUM_COACH, BUSINESS, and FIRST.
          "kind": "qpxexpress#sliceInput", # Identifies this as a slice input object, representing the criteria a desired slice must satisfy. Value: the fixed string qpxexpress#sliceInput.
          "alliance": "A String", # Slices with only the carriers in this alliance should be returned; do not use this field with permittedCarrier. Allowed values are ONEWORLD, SKYTEAM, and STAR.
          "destination": "A String", # Airport or city IATA designator of the destination.
          "maxStops": 42, # The maximum number of stops you are willing to accept in this slice.
          "permittedDepartureTime": { # Two times in a single day defining a time range. # Slices must depart in this time of day range, local to the point of departure.
            "latestTime": "A String", # The latest time of day in HH:MM format.
            "kind": "qpxexpress#timeOfDayRange", # Identifies this as a time of day range object, representing two times in a single day defining a time range. Value: the fixed string qpxexpress#timeOfDayRange.
            "earliestTime": "A String", # The earliest time of day in HH:MM format.
          },
          "permittedCarrier": [ # A list of 2-letter IATA airline designators. Slices with only these carriers should be returned.
            "A String",
          ],
          "maxConnectionDuration": 42, # The longest connection between two legs, in minutes, you are willing to accept.
          "date": "A String", # Departure date in YYYY-MM-DD format.
          "prohibitedCarrier": [ # A list of 2-letter IATA airline designators. Exclude slices that use these carriers.
            "A String",
          ],
        },
      ],
      "saleCountry": "A String", # IATA country code representing the point of sale. This determines the "equivalent amount paid" currency for the ticket.
      "maxPrice": "A String", # Do not return solutions that cost more than this price. The alphabetical part of the price is in ISO 4217. The format, in regex, is [A-Z]{3}\d+(\.\d+)? Example: $102.07
      "ticketingCountry": "A String", # IATA country code representing the point of ticketing.
      "solutions": 42, # The number of solutions to return, maximum 500.
      "refundable": True or False, # Return only solutions with refundable fares.
    },
  }


Returns:
  An object of the form:

    { # A QPX Express search response.
    "kind": "qpxExpress#tripsSearch", # Identifies this as a QPX Express API search response resource. Value: the fixed string qpxExpress#tripsSearch.
    "trips": { # A QPX Express search response. # All possible solutions to the QPX Express search request.
      "tripOption": [ # A list of priced itinerary solutions to the QPX Express query.
        { # Trip information.
          "saleTotal": "A String", # The total price for all passengers on the trip, in the form of a currency followed by an amount, e.g. USD253.35.
          "kind": "qpxexpress#tripOption", # Identifies this as a trip information object. Value: the fixed string qpxexpress#tripOption.
          "slice": [ # The slices that make up this trip's itinerary.
            { # Information about a slice. A slice represents a traveller's intent, the portion of a low-fare search corresponding to a traveler's request to get between two points. One-way journeys are generally expressed using 1 slice, round-trips using 2. For example, if a traveler specifies the following trip in a user interface:
                # | Origin | Destination | Departure Date | | BOS | LAX | March 10, 2007 | | LAX | SYD | March 17, 2007 | | SYD | BOS | March 22, 2007 |
                # then this is a three slice trip.
              "duration": 42, # The duration of the slice in minutes.
              "kind": "qpxexpress#sliceInfo", # Identifies this as a slice object. A slice represents a traveller's intent, the portion of a low-fare search corresponding to a traveler's request to get between two points. One-way journeys are generally expressed using 1 slice, round-trips using 2. Value: the fixed string qpxexpress#sliceInfo.
              "segment": [ # The segment(s) constituting the slice.
                { # Details of a segment of a flight; a segment is one or more consecutive legs on the same flight. For example a hypothetical flight ZZ001, from DFW to OGG, would have one segment with two legs: DFW to HNL (leg 1), HNL to OGG (leg 2), and DFW to OGG (legs 1 and 2).
                  "kind": "qpxexpress#segmentInfo", # Identifies this as a segment object. A segment is one or more consecutive legs on the same flight. For example a hypothetical flight ZZ001, from DFW to OGG, could have one segment with two legs: DFW to HNL (leg 1), HNL to OGG (leg 2). Value: the fixed string qpxexpress#segmentInfo.
                  "bookingCodeCount": 42, # The number of seats available in this booking code on this segment.
                  "flight": { # A flight is a sequence of legs with the same airline carrier and flight number. (A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number.) The naive view is that a flight is scheduled travel of an aircraft between two points, with possibly intermediate stops, but carriers will frequently list flights that require a change of aircraft between legs. # The flight this is a segment of.
                    "carrier": "A String",
                    "number": "A String", # The flight number.
                  },
                  "leg": [ # The legs composing this segment.
                    { # Information about a leg. (A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number.)
                      "origin": "A String", # The leg origin as a city and airport.
                      "originTerminal": "A String", # The terminal the flight is scheduled to depart from.
                      "departureTime": "A String", # The scheduled departure time of the leg, local to the point of departure.
                      "destinationTerminal": "A String", # The terminal the flight is scheduled to arrive at.
                      "secure": True or False, # Whether passenger information must be furnished to the United States Transportation Security Administration (TSA) prior to departure.
                      "connectionDuration": 42, # Duration of a connection following this leg, in minutes.
                      "destination": "A String", # The leg destination as a city and airport.
                      "kind": "qpxexpress#legInfo", # Identifies this as a leg object. A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number. Value: the fixed string qpxexpress#legInfo.
                      "meal": "A String", # A simple, general description of the meal(s) served on the flight, for example: "Hot meal".
                      "aircraft": "A String", # The aircraft (or bus, ferry, railcar, etc) travelling between the two points of this leg.
                      "mileage": 42, # The number of miles in this leg.
                      "changePlane": True or False, # Whether you have to change planes following this leg. Only applies to the next leg.
                      "arrivalTime": "A String", # The scheduled time of arrival at the destination of the leg, local to the point of arrival.
                      "duration": 42, # The scheduled travelling time from the origin to the destination.
                      "operatingDisclosure": "A String", # Department of Transportation disclosure information on the actual operator of a flight in a code share. (A code share refers to a marketing agreement between two carriers, where one carrier will list in its schedules (and take bookings for) flights that are actually operated by another carrier.)
                      "onTimePerformance": 42, # In percent, the published on time performance on this leg.
                      "id": "A String", # An identifier that uniquely identifies this leg in the solution.
                    },
                  ],
                  "subjectToGovernmentApproval": True or False, # Whether the operation of this segment remains subject to government approval.
                  "connectionDuration": 42, # In minutes, the duration of the connection following this segment.
                  "bookingCode": "A String", # The booking code or class for this segment.
                  "duration": 42, # The duration of the flight segment in minutes.
                  "id": "A String", # An id uniquely identifying the segment in the solution.
                  "cabin": "A String", # The cabin booked for this segment.
                  "marriedSegmentGroup": "A String", # The solution-based index of a segment in a married segment group. Married segments can only be booked together. For example, an airline might report a certain booking code as sold out from Boston to Pittsburgh, but as available as part of two married segments Boston to Chicago connecting through Pittsburgh. For example content of this field, consider the round-trip flight ZZ1 PHX-PHL ZZ2 PHL-CLT ZZ3 CLT-PHX. This has three segments, with the two outbound ones (ZZ1 ZZ2) married. In this case, the two outbound segments belong to married segment group 0, and the return segment belongs to married segment group 1.
                },
              ],
            },
          ],
          "id": "A String", # Identifier uniquely identifying this trip in a response.
          "pricing": [ # Per passenger pricing information.
            { # The price of one or more travel segments. The currency used to purchase tickets is usually determined by the sale/ticketing city or the sale/ticketing country, unless none are specified, in which case it defaults to that of the journey origin country.
              "fare": [ # The fare used to price one or more segments.
                { # Complete information about a fare used in the solution to a low-fare search query. In the airline industry a fare is a price an airline charges for one-way travel between two points. A fare typically contains a carrier code, two city codes, a price, and a fare basis. (A fare basis is a one-to-eight character alphanumeric code used to identify a fare.)
                  "basisCode": "A String",
                  "origin": "A String", # The city code of the city the trip begins at.
                  "kind": "qpxexpress#fareInfo", # Identifies this as a fare object. Value: the fixed string qpxexpress#fareInfo.
                  "destination": "A String", # The city code of the city the trip ends at.
                  "private": True or False, # Whether this is a private fare, for example one offered only to select customers rather than the general public.
                  "carrier": "A String", # The carrier of the aircraft or other vehicle commuting between two points.
                  "id": "A String", # A unique identifier of the fare.
                },
              ],
              "fareCalculation": "A String", # The horizontal fare calculation. This is a field on a ticket that displays all of the relevant items that go into the calculation of the fare.
              "kind": "qpxexpress#pricingInfo", # Identifies this as a pricing object, representing the price of one or more travel segments. Value: the fixed string qpxexpress#pricingInfo.
              "segmentPricing": [ # The per-segment price and baggage information.
                { # The price of this segment.
                  "kind": "qpxexpress#segmentPricing", # Identifies this as a segment pricing object, representing the price of this segment. Value: the fixed string qpxexpress#segmentPricing.
                  "fareId": "A String", # A segment identifier unique within a single solution. It is used to refer to different parts of the same solution.
                  "freeBaggageOption": [ # Details of the free baggage allowance on this segment.
                    { # Information about free baggage allowed on one segment of a trip.
                      "kilosPerPiece": 42, # The maximum number of kilos any one piece of baggage may weigh.
                      "pounds": 42, # The number of pounds of free baggage allowed.
                      "kind": "qpxexpress#freeBaggageAllowance", # Identifies this as free baggage object, allowed on one segment of a trip. Value: the fixed string qpxexpress#freeBaggageAllowance.
                      "pieces": 42, # The number of free pieces of baggage allowed.
                      "bagDescriptor": [ # A representation of a type of bag, such as an ATPCo subcode, Commercial Name, or other description.
                        { # Information about an item of baggage.
                          "count": 42, # How many of this type of bag will be checked on this flight.
                          "subcode": "A String", # The standard IATA subcode used to identify this optional service.
                          "kind": "qpxexpress#bagDescriptor", # Identifies this as a baggage object. Value: the fixed string qpxexpress#bagDescriptor.
                          "commercialName": "A String", # Provides the commercial name for an optional service.
                          "description": [ # A description of the baggage.
                            "A String",
                          ],
                        },
                      ],
                      "kilos": 42, # The maximum number of kilos all the free baggage together may weigh.
                    },
                  ],
                  "segmentId": "A String", # Unique identifier in the response of this segment.
                },
              ],
              "saleTotal": "A String", # Total per-passenger price (fare and tax) in the sale or equivalent currency.
              "passengers": { # The number and type of passengers. Unfortunately the definition of an infant, child, adult, and senior citizen varies across carriers and reservation systems. # The number of passengers to which this price applies.
                "kind": "qpxexpress#passengerCounts", # Identifies this as a passenger count object, representing the number of passengers. Value: the fixed string qpxexpress#passengerCounts.
                "infantInLapCount": 42, # The number of passengers that are infants travelling in the lap of an adult.
                "seniorCount": 42, # The number of passengers that are senior citizens.
                "infantInSeatCount": 42, # The number of passengers that are infants each assigned a seat.
                "childCount": 42, # The number of passengers that are children.
                "adultCount": 42, # The number of passengers that are adults.
              },
              "tax": [ # The taxes used to calculate the tax total per ticket.
                { # Tax information.
                  "kind": "qpxexpress#taxInfo", # Identifies this as a tax information object. Value: the fixed string qpxexpress#taxInfo.
                  "code": "A String", # The code to enter in the ticket's tax box.
                  "country": "A String", # For government charges, the country levying the charge.
                  "salePrice": "A String", # The price of the tax in the sales or equivalent currency.
                  "chargeType": "A String", # Whether this is a government charge or a carrier surcharge.
                  "id": "A String", # Identifier uniquely identifying this tax in a response. Not present for unnamed carrier surcharges.
                },
              ],
              "ptc": "A String", # The passenger type code for this pricing. An alphanumeric code used by a carrier to restrict fares to certain categories of passenger. For instance, a fare might be valid only for senior citizens.
              "saleFareTotal": "A String", # The total fare in the sale or equivalent currency.
              "baseFareTotal": "A String", # The total fare in the base fare currency (the currency of the country of origin). This element is only present when the sales currency and the currency of the country of commencement are different.
              "refundable": True or False, # Whether the fares on this pricing are refundable.
              "saleTaxTotal": "A String", # The taxes in the sale or equivalent currency.
              "latestTicketingTime": "A String", # The latest ticketing time for this pricing assuming the reservation occurs at ticketing time and there is no change in fares/rules. The time is local to the point of sale (POS).
            },
          ],
        },
      ],
      "kind": "qpxexpress#tripOptions", # Identifies this as a QPX Express trip response object, which consists of zero or more solutions. Value: the fixed string qpxexpress#tripOptions.
      "data": { # Detailed information about components found in the solutions of this response, including a trip's airport, city, taxes, airline, and aircraft. # Informational data global to list of solutions.
        "city": [ # The city that is either the origin or destination of part of a trip.
          { # Information about a city that might be useful to an end-user; typically the city of an airport.
            "country": "A String", # The two-character country code of the country the city is located in. For example, US for the United States of America.
            "kind": "qpxexpress#cityData", # Identifies this as a city, typically with one or more airports. Value: the fixed string qpxexpress#cityData.
            "code": "A String", # The IATA character ID of a city. For example, for Boston this is BOS.
            "name": "A String", # The full name of a city. An example would be: New York.
          },
        ],
        "kind": "qpxexpress#data", # Identifies this as QPX Express response resource, including a trip's airport, city, taxes, airline, and aircraft. Value: the fixed string qpxexpress#data.
        "tax": [ # The taxes due for flying between an origin and a destination.
          { # Tax data.
            "kind": "qpxexpress#taxData", # Identifies this as a tax data object, representing some tax. Value: the fixed string qpxexpress#taxData.
            "id": "A String", # An identifier uniquely identifying a tax in a response.
            "name": "A String", # The name of a tax.
          },
        ],
        "airport": [ # The airport of an origin or destination.
          { # An airport.
            "city": "A String", # The city code an airport is located in. For example, for JFK airport, this is NYC.
            "kind": "qpxexpress#airportData", # Identifies this as an airport object. Value: the fixed string qpxexpress#airportData.
            "code": "A String", # An airport's code. For example, for Boston Logan airport, this is BOS.
            "name": "A String", # The name of an airport. For example, for airport BOS the name is "Boston Logan International".
          },
        ],
        "aircraft": [ # The aircraft that is flying between an origin and destination.
          { # The make, model, and type of an aircraft.
            "kind": "qpxexpress#aircraftData", # Identifies this as an aircraftData object. Value: the fixed string qpxexpress#aircraftData
            "code": "A String", # The aircraft code. For example, for a Boeing 777 the code would be 777.
            "name": "A String", # The name of an aircraft, for example Boeing 777.
          },
        ],
        "carrier": [ # The airline carrier of the aircraft flying between an origin and destination. Allowed values are IATA carrier codes.
          { # Information about a carrier (ie. an airline, bus line, railroad, etc) that might be useful to display to an end-user.
            "kind": "qpxexpress#carrierData", # Identifies this as a kind of carrier (ie. an airline, bus line, railroad, etc). Value: the fixed string qpxexpress#carrierData.
            "code": "A String", # The IATA designator of a carrier (airline, etc). For example, for American Airlines, the code is AA.
            "name": "A String", # The long, full name of a carrier. For example: American Airlines.
          },
        ],
      },
      "requestId": "A String", # An identifier uniquely identifying this response.
    },
  }</pre>
</div>

</body></html>