Catapult Developer Platform

Expansions

Most objects refer to other objects by id: a league names its sportId, a clip names its categoryId, a source-angle binding names its angleId. Following those ids means a second request. The expand query parameter lets you ask for those related objects in the same response instead.

GET /clips?expand=category,angles.angle
GET /sources/{id}/source-angles?expand=angle
GET /lists/{id}/items?expand=clip.drawings
GET /fixtures/{id}?expand=season,venue,teams.teamSeason

Responses without expand include no related objects. Nothing is included unless you ask for it, so the size of a page and the time it takes are yours to trade off.

How names work

An expansion name is the name of the field the object appears under. When that field sits inside a nested array or object, the name is prefixed with the path to it. category on a clip puts a category object beside categoryId. angles.angle puts an angle object inside each entry of the clip's angles array. clip.trims.angle on a list item puts an angle inside each trim of the item's clip. teams.persons.person on a fixture puts a person inside each entry of each team's persons. The three person expansions on a fixture are requested separately, so you can expand officials without expanding line-ups. Names are fixed per endpoint and listed on that endpoint in the API reference.

List several values in one expand parameter separated by commas, for example expand=category,clipOrigin. Order and repeated values do not matter. Sending expand more than once in the same URL is rejected.

The id field is still there, and the expanded object appears beside it under the last segment of the expansion name. category sits beside categoryId; clip.clip on a list item sits beside the item's referenceId, because that is the field that names the clip. The expanded object is shaped exactly like the object its own endpoint returns. A few expansions add a collection rather than a single object: clip.drawings adds a drawings array holding the list item's own drawings. A requested collection is always present, empty when there is nothing in it. Others expand a list of ids into the matching objects in the same order, such as labelTypes on a label type group.

Requesting GET /lists/{id}/items?expand=clip.clip,clip.drawings gives each list item that references a clip this shape:

{
  "id": "0192a…",
  "referenceType": "CLIP",
  "childIds": [],
  "clip": {
    "referenceId": "0191f…",
    "clip": { "id": "0191f…", "name": "Second-half press", "sourceId": "0190c…", "angles": [] },
    "angleSequenceId": "01918…",
    "drawings": []
  }
}

expand is accepted on GET requests only.

One hop only

An expanded object never carries expansions of its own. A clip expanded with category includes the category and its asset, because that is what /categories/{id} returns, but nothing deeper. A fixture expanded with teams.teamSeason includes each team season but not that team season's own season or team. This keeps the largest possible response bounded.

What you can expand

Endpoint Expansions
/leagues, /leagues/{id} sport, groups, providerIdentifiers.provider
/league-groups, /league-groups/{id} sport, providerIdentifiers.provider
/seasons, /seasons/{id} league, groups
/season-groups, /season-groups/{id} sport
/teams, /teams/{id} sport, groups, properties.venue, properties.providerIdentifiers.provider
/team-groups, /team-groups/{id} sport
/team-seasons, /team-seasons/{id} season, team, properties.venue, properties.providerIdentifiers.provider
/venues, /venues/{id} configurations.sport, providerIdentifiers.provider
/persons, /persons/{id} teamAffiliations, leagueAffiliations, providerIdentifiers.provider
/fixtures, /fixtures/{id} season, venue, teams.teamSeason, teams.persons.person, teams.result.personResults.person, officials.person, providerIdentifiers.provider
/league-affiliations, /league-affiliations/{id} league
/team-affiliations, /team-affiliations/{id} team
/angle-sequences, /angle-sequences/{id} angles
/clips, /clips/{id} category, clipOrigin, angles.angle, providerIdentifiers.provider
/label-types, /label-types/{id} valueFormats
/label-type-groups, /label-type-groups/{id} labelTypes
/lists, /lists/{id} angleSequence, labelTypeGroup, flagTemplate
/lists/{id}/items clip.clip, clip.angleSequence, clip.trims.angle, clip.drawings
/sources, /sources/{id} sourceAngles, markers, fixture, providerIdentifiers.provider
/sources/{id}/source-angles, /sources/{id}/source-angles/{angleId} angle

Media asset objects are not expansions. They are included wherever they appear whenever your licence covers media, as described under Feature gating. Sports, providers, leagues, teams and persons carry an asset as well, including when they are expanded into another object.

Licensing and errors

An expansion is served by the same licence feature as the endpoint that owns the object. Expanding category on /clips needs the feature that covers /categories. Asking for one your licence does not cover is refused with 403, exactly as calling that endpoint directly would be. The response does not say which expansion was refused; check the values you sent against the feature table on the Feature gating page.

Situation Response
A value is not one the endpoint accepts 400, and the message lists the accepted values
pageSize above 100 together with any expand value 400, asking for a page of 100 or fewer
Your licence does not cover the expanded object's endpoint 403
The referenced object no longer exists 200, with the expanded field absent
An id inside an expanded list no longer resolves 200, with that entry omitted; match entries to ids by each object's id, not by position
A collection expansion would return more rows than the endpoint allows for the page 400, asking you to request a smaller page. Most collections allow 10,000 rows per page; markers allows 50,000
An expansion of a list of ids would produce more than 10,000 expanded entries across the page 400, asking you to request a smaller page

Each distinct value in expand adds one to the request's rate-limit cost, so a request with three expansions consumes four units. Expanded pages are limited to 100 rows: pageSize above 100 together with expand is refused with 400.