Common Headers

All Air APIs require specific information to be sent in the header of every request. Some requests require additional information.

In this topic:

Required Header Fields for all Air APIs

Travelport recommends as best practice that all the following header fields be sent with all requests:

  • Accept-Encoding: gzip, deflate
  • Cache-Control: no-cache
  • Accept: application/json
  • Content-Type: application/json
  • Authorization: Bearer token from the generated Oauth token.
  • XAUTH_TRAVELPORT_ACCESSGROUP: Each PCC is associated with a unique access group. Your PCC and access group are included in the welcome letter sent when you are provisioned for any Travelport JSON APIs.

The following headers are required in only some functions; refer to Additional Header Fields below.

  • Accept-Version: Version number of the API, e.g., 9, 9_1
  • Content-Version: Version number of the API, e.g., 9, 9_1

The following example shows the data required for version 9; substitute the version number of the APIs you are provisioned for:

Accept: application/json
Content-Type: application/json
XAUTH_TRAVELPORT_ACCESSGROUP: PCCAccessGroup123ABC
Accept-Version: 9
Content-Version: 9
Authorization: Bearer eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwianRpIjoiOGc5OTY4bWR2NGVrIn0..DP1oBM-nztJRWZm1Mni88g

Note that the following fields are returned by the Air APIs in the response headers. No customer action with these is necessary:

  • Date: Returned in GMT
  • Content-Type: application/json
  • E2ETrackingId: Unique identifier returned for every transaction
  • Content-version: 9, 9_1(version number of the API)
  • Vary: accept-encoding
  • Content-Encoding: gzip
  • Transfer-Encoding: chunked

Additional Header Fields for Specific Air APIs

In addition to the header fields above, the Accept-Version and Content-Version header fields are required only for the following API functions and resources as marked with X. If a column is blank that indicates the field does not need to be populated.

To assist with troubleshooting, most of the JSON APIs return a unique, system-generated transaction ID in the response. You can also send an optional custom trace ID in the message request header, which is also returned in the response. See Trace and Transaction IDs.
API Function API Resource Message Type Accept-Version Content-Version
Air Search TripServices-AirSearch PP POST X X
FareFamily Search (deprecated) FareFamilyAirSearch Domain PP POST X X
FareFamily Search (deprecated) FareFamilyAirSearch Domain PP GET X X
Air Price AirPriceOfferResource-PreProd POST X X
Air Price AirPriceOfferResource-PreProd POST X X
Air Price AirPriceOfferResource-PreProd POST X X
Air Price Fare Family (deprecated) AirPriceFareFamilyResource-PreProd POST X X
Air Reservation and Book Airbook-RemarksDomain-PP POST   X
Air Reservation and Book AirBook-OfferDomain-PP POST   X
Air Reservation and Book AirBook-OfferDomain-PP POST   X
Air Reservation and Book AirBook-OfferDomain-PP POST   X
Air Reservation and Book AirBook-SessionDomain-PP POST   X
Air Reservation and Book AirBook-ReservationDomain-PP POST   X
Air Reservation and Book Airbook-PrimaryContactDomain-PP POST   X
Air Reservation and Book AirBook-TravelerDomain-PP POST   X
Air Reservation and Book AirBook-BackOfficeDomain-PP POST   X
Seats AirBook - Seat Book Domain - PP POST   X
Seats AirBook - Seat Map Domain – PP GET   X
Ticket AirTicket-FOPDomain-PP POST   X
Ticket AirTicket-PaymentDomain-PP POST   X
Ticket AirTicket-ReceiptDomain-PP POST