Types and Subtypes

Learn to fetch details for types and subtypes using the Discovery API.

We'll cover the following

Type details

Alongside segments, types are also top-level classifications for entities. They represent a type or a group of people. We can use the Discovery API's types endpoint to fetch details for a specified type.

The URL for this endpoint is given below:

https://app.ticketmaster.com/discovery/v2/classifications/types/{id}

Here, {id} is the ID of the type we want to fetch details for. Apart from this URL parameter, we can provide a couple of optional query parameters. The table below gives an overview of each of these parameters:

Parameter

Type

Category

Description

id

string

required

The ID of the type we want the details for.

locale

string

optional

The locale in ISO code format. Multiple comma-separated values can be provided. When omitting the country part of the code (only en or fr) the first matching locale is used. When using *, it matches all locales. The default value is en.

domain

array[string]

optional

If provided, the results are filtered based on the domain they are available on.

The response object contains the following properties:

Property

Type

Description

_links

object

This contains a link to the current dataset.

_embedded

object

This contains details regarding the related sub-types.

id

string

The ID of the type.

primaryId

string

The primary ID of the type.

name

string

The name of the type.

locale

string

The locale in which the content is returned.

Types are further divided into related subtypes. The details of these subtypes are included in the _embedded property of the response object.

A list of a few types and their IDs is given below. Let's try make a call to this endpoint using the IDs from the following table:

Type

ID

Individual

KZAyXgnZfZ7v7la

Group

KZAyXgnZfZ7v7l1

Donation

KZAyXgnZfZ7vAvv

Replace the value of the type_id variable on line 5 with a type ID from the table above:

Press + to interact
import json
import requests
api_key = '{{API_KEY}}'
type_id = 'KZAyXgnZfZ7v7la'
response = requests.get('https://app.ticketmaster.com/discovery/v2/classifications/types/' + type_id,
params = {
'apikey' : api_key
}).json()
print(json.dumps(response, indent=4))

Subtype details

Subtypes are final-level classifications after types that further categorize an entity. The Discovery API offers a subtypes endpoint that we can use to fetch details for a specified subtype.

The URL for this endpoint is the following:

https://app.ticketmaster.com/discovery/v2/classifications/subtypes/{id}

Here, {id} is the ID of the subtype we want to fetch details for. Apart from this URL parameter, we can provide a couple of optional query parameters. The table below gives an overview of each of these parameters:

Parameter

Type

Category

Description

id

string

required

The ID of the sub-type we want the details for.

locale

string

optional

The locale in ISO code format. Multiple comma-separated values can be provided. When omitting the country part of the code (only en or fr) the first matching locale is used. When using *, it matches all locales. The default value is en.

domain

array[string]

optional

If provided, the results are filtered based on the domain they are available on.

The response object contains the following properties:

Property

Type

Description

_links

object

This contains a link to the current dataset.

id

string

The ID of the sub-type.

name

string

The name of the sub-type.

locale

string

The locale in which the content is returned.

Since subtypes are final-level classifications, they don't contain any further categories, which explains the absence of the _embedded property in the response.

The table below lists some subtypes and their IDs for the individual type. Let's make a call to this endpoint using the following IDs:

Subtype

ID

Actor

KZFzBErXgnZfZ7vAdl

Artist

KZFzBErXgnZfZ7vAdn

Comedian

KZFzBErXgnZfZ7vAdJ

Musician

KZFzBErXgnZfZ7vAd7

Try to replace the value of the subtype_id variable on line 5 with an ID from the table above:

Press + to interact
import json
import requests
api_key = '{{API_KEY}}'
subtype_id = 'KZFzBErXgnZfZ7vAdl'
response = requests.get(f'https://app.ticketmaster.com/discovery/v2/classifications/subtypes/{subtype_id}',
params = {
'apikey' : api_key
}).json()
print(json.dumps(response, indent=4))