The Travel Corporation API

V4

Overview

This API allows partners to sell Travel Corporation products on their websites.

Get started by requesting access here.

Current Version

By default, all requests to https://api.ttc.com receive the v4 version of the REST API.

We encourage you to explicitly request this version via the Accept header:

Accept: application/vnd.ttc.v4+json

Schema

All API access is over HTTPS, and accessed from the https://api.ttc.com. All data is sent and received as JSON.

All timestamps return in ISO 8601 format. For example:

2018-04-09T08:00:00+0300

Authentication

Access to this API requires authentication. Requesting any endpoint with incorrect or wrong credentials will result in 401 Unauthorized.

The authentication method is HTTP Basic Authentication where username is token and password is your API_TOKEN. For example, here is how to make an authenticated request with curl command (replace API_TOKEN with your api token):

$ curl https://token:API_TOKEN@api.ttc.com/brands/trafalgar/tours/1/options/1/availability?regions=nz

Rate Limiting

The returned HTTP headers of any API request show your current rate limit status:

$ curl https://token:API_TOKEN@api.ttc.com/countries
HTTP/1.1 200 OK
...
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
...

Once the limit is reached, it will start returning 429 Too Many Requests and an extra header - Retry-After - indicating how long to wait (in milliseconds) before making a new request:

$ curl https://token:API_TOKEN@api.ttc.com/countries
HTTP/1.1 429 Too Many Requests
...
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
Retry-After: 5000
...