Inventory Status API

Learn to use Ticketmaster's Inventory Status API.

A ticketing service must provide information about the availability of tickets. Ticketmaster provides an Inventory Status API that we can use for this exact purpose.

Inventory status details

The Inventory Status API has a single endpoint—the availability endpoint—through which we can retrieve the status of the inventory for specified events.

The URL for this endpoint is:

https://app.ticketmaster.com/inventory-status/v1/availability

This endpoint takes a single query parameter, the details of which are as follows:

Parameter

Type

Category

Description

events

array[string]

required

An array of event IDs that we want the inventory status for.

The response of an API call to this endpoint is in the form of an array of JSON objects, with each object corresponding to an event from the input events. The structure of a single object is as follows:

Property

Type

Description

eventId

string

The ID of the event.

status

string

The status of the inventory for the event. It can take the following values: TICKETS_AVAILABLE, FEW_TICKETS_LEFT, TICKETS_NOT_AVAILABLE, and UNKNOWN.

resaleStatus

string

The status of the inventory for ticket resales. It can take the following values: TICKETS_AVAILABLE, TICKETS_NOT_AVAILABLE, and UNKNOWN.

The different values for the statuses are pretty self-explanatory, but let's take a look at their descriptions nonetheless:

  • TICKETS_AVAILABLE: This status indicates that the inventory is available for purchase through primary channels.
  • FEW_TICKETS_LEFT: This status indicates that the inventory is limited.
  • TICKETS_NOT_AVAILABLE: This status indicates that the inventory is not available for purchase through primary channels.
  • UNKNOWN: This status indicates that the event ID is invalid or the inventory status is not available for the corresponding event.

Retrieve the inventory status

Let's make a call to this endpoint, once again using the event ID we've been using in previous lessons. You can try adding more event IDs in the events list on line 5—just ensure that they are valid IDs!

Press + to interact
import json
import requests
apikey = '{{API_KEY}}'
events = ['{{EVENT_ID}}']
response = requests.get('https://app.ticketmaster.com/inventory-status/v1/availability',
params = {
'apikey' : apikey,
'events' : events
}).json()
print(json.dumps(response, indent=4))

The length of the response array is the same as the length of the events list—each element of the response array corresponds to an input ID. We can match the outputs to the corresponding inputs using the eventId property in the response objects.