Our APIs?

Our APIs give you the chance to seamlessly access our products and sell them to your customers.

General Information

Our API is served over HTTPS from a common sub-domain (tixuk.io), on the following endpoints:

ServiceEndpointInformation
Contenthttps://content-service.tixuk.io/api/vLatestShow information and copy
Inventoryhttps://inventory-service.tixuk.io/api/vLatestInventory description and price
Paymentshttps://payment-service.tixuk.io/api/vLatestTaking payment
Checkouthttps://checkout-service.tixuk.io/api/vLatestSending customer details and receiving barcodes

Authentication

Most of our endpoints are public and don't require authentication (and authorization) - given they share data that exists in the public domain. Authentication is only required for sensitive endpoints which change state (i.e. create, delete or modify data). Any endpoints that require authentication (and authorization) are indicated as such in the API reference documentation.

Each API call requires standard headers affiliateId or x-tt-retailer which will allow you to access responses tailored to you. Talk to your account manager or follow the contact-us link to request this id.

JWT Authentication

Some endpoints on certain services require JWT authentication. To authenticate, you must first obtain a JWT by calling the /api/login endpoint of the service with your username and password. Below is an example of how to do this using cURL:

curl --location --request GET 'https://some-service.tixuk.io/api/login' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "username": "someusername",
    "password": "somepassword"
}'

Using the JWT

Once you receive the JWT, include it in the Authorization header of your requests to endpoints that require it.

API semantics

All of our APIs conform to the REST architectural style and all responses are sent back to you in JSON, a lightweight data interchange format. Responses are returned in two kinds of structure: item and list.

Items

Items are JSON objects consisting of unordered attributes–value pairs, with at least a top-level of pairs (some can contain nested objects). Curly brackets delimit them. This kind of response is used when a single object is requested. The properties are the requested field names and their corresponding values.

{
    id: 1587,
    name: "Wicked",
    type: "show",
    venue: {
        id: 138
    },
    onSale: "yes",
    bookingStarts: "2018-08-07T00:00:00+0000",
    bookingEnds: "2019-05-25T00:00:00+0000"
}

Lists

The list response type is a JSON object containing a list property. The associated value is a JSON array of items. Some other properties should be returned, like other APIs, but we've not developed this.

{
    "results": [
        {
            id: 1587,
            name: "Wicked",
            type: "show",
            venue: {
                id: 138
            },
            onSale: "yes",
            bookingStarts: "2018-08-07T00:00:00+0000",
            bookingEnds: "2019-05-25T00:00:00+0000"
        },
        {
            id: 1587,
            name: "Wicked",
            type: "show",
            venue: {
                id: 138
            },
            onSale: "yes",
            bookingStarts: "2018-08-07T00:00:00+0000",
            bookingEnds: "2019-05-25T00:00:00+0000"
        }]
}

Pagination

Many of our APIs allow paging through list endpoints in a standard way. Each endpoint support for paging is outlined in the relevant API reference as you work through it. Here's a summary below.

PropertyTypeDescription
x-total-countHeaderIf you wish to have the total record set size returned, call the endpoint with the header x-total-count, and the endpoint will respond with the header x-total-count populated with the total record set size.

Example:

curl -X GET "https://inventory-service.tixuk.io/api/v1/products" -H "accept: application/json" -H "x-total-count: 0"
pageQuery stringIf you wish to "page" through results, you can use the page and limit query string parameters to iterate through pages of data. The API will multiply Page (1-based) by Limit to calculate the number of records at the head of the result set to skip.

Example:

curl -X GET "https://inventory-service.tixuk.io/api/v1/products? page=5" -H "accept: application/json"
limitQuery stringIf you wish to return a fixed number of results, pass the total number of records to return as a limit query string parameter.

Example:

curl -X GET "https://inventory-service.tixuk.io/api/v1/products? limit=50" -H "accept: application/json"