FAQs & Best Practices

The following frequently asked questions (FAQs) about the Travelport JSON Air APIs will be expanded as additional customer input is received.

In this topic:

  • Best Practices
  •  Authorization
    • How long is the authorization token valid?
    • How do I verify which version of the API to request? (Authorization Failed Error)
  • Booking
    • How long is a search kept in cache for booking?
    • How long does a workbench session persist?

Best Practices

The attributes and values in all JSON requests are case-sensitive and must be sent in the formats specified in the online help API references and verified with the Swagger files available for download as part of the developer toolkits. If your requests do not follow these formats you will not receive the expected response.

Travelport recommends using a custom trace ID in the request of all APIs that support it. This is a best practice for future troubleshooting if necessary. See the Trace and Transaction IDs topic in the relevant version of the online help.

Validate that all modifiers are supported for the version of the JSON API being consumed.

Verify that object values make sense. For example, for Air searches, if you specify a permitted airline, that same airline cannot also be sent in the prohibited list.

Validate that object structure such as lists and hierarchies or parent and child objects are used properly.

If the API uses query parameters, verify they are sent correctly per the API reference for that request.

Verify that API response messages always return a unique E2ETrackingID in the header of the response.

See the Travelport Service Now Knowledge Base article "Travelport Polymorphism Best Practices". (You need a Travelport Service Now login and password for access.) This article discusses polymorphism and inheritance with the JSON APIs and guidelines on using @type in your code.

Authorization

See Authorization for details.

How long is the authorization token valid?

24 hours.

How do I verify which version of the API to request? (Authorization Failed Error)

You must send your request to the correct version of the API you are using – check the version in the URL of the endpoint, and make sure it matches the version indicated in your message headers.

For example, if you send a search request to https://api.travelport.com/9/air/search/catalogofferings, you must be provisioned on model 9 for search, and both Accept-Version and Content-Version in the header must set to 9.

If you receive the error below, you may be using the wrong endpoint or have incorrect information in your headers. If those look correct and you still receive this error, contact your Travelport account representative. You may not be set up for access to the API, or you may need to upgrade to a newer version of the API or a specific domain service.

{
    "faultcode": "Server",
    "faultstring": "Authorization Failed"
}

Booking

How long is a search kept in cache for booking?

Travelport retains a search in cache for 12 minutes so it can be added as an offer to the workbench.

How long does a workbench session persist?

Any workbench, either before booking or after booking (post-reservation) is valid for 30 minutes and must be committed within that time window or it expires. This time is the same for GDS or NDC, and for production and test systems.