Skip to main content

Data Models

This page describes the data models used by the Trading Card API.

Card​

A trading card resource following JSON:API specification

Properties​

PropertyTypeNullableExampleDescription
typestringNo"cards"Resource type
idstring (uuid)No"123e4567-e89b-12d3-a456-426614174000"Unique identifier
attributesobjectNo
attributes.namestringNo"Michael Jordan"Auto-generated card name
attributes.numberstringNo"23"Card number within the set
attributes.serial_numberstringYes"001/100"Serial number for limited cards
attributes.image_uuidstring (uuid)Yes"550e8400-e29b-41d4-a716-446655440000"UUID reference for card image
attributes.titlestringYes"Rookie Card"Special title or designation
attributes.notesstringYesAdditional notes about the card
attributes.has_playerbooleanNotrueTrue if the card has an associated player or player/team. Always present on card responses; computed in bulk only by the set checklist endpoint. On other endpoints the flag is not computed and defaults to false, so outside the set checklist endpoint a value of false means "not computed" rather than "no player relationship" — do not rely on it being authoritative there.
attributes.has_teambooleanNotrueTrue if the card has an associated team or player/team. Always present on card responses; computed in bulk only by the set checklist endpoint. On other endpoints the flag is not computed and defaults to false, so outside the set checklist endpoint a value of false means "not computed" rather than "no team relationship" — do not rely on it being authoritative there.
attributes.created_atstring (date-time)NoCreation timestamp
attributes.updated_atstring (date-time)NoLast update timestamp
attributes.urlstring (uri)NoAPI URL for this card resource
relationshipsobjectNo
relationships.setobjectNo
relationships.set.dataobjectNo
relationships.set.data.typestringNo"sets"
relationships.set.data.idstring (uuid)No
relationships.oncardobjectNo
relationships.oncard.dataarray of objectNo
relationships.oncard.data[].typestringNo
relationships.oncard.data[].idstring (uuid)No
relationships.attributesobjectNo
relationships.attributes.dataarray of objectNo
relationships.attributes.data[].typestringNo"attributes"
relationships.attributes.data[].idstring (uuid)No
relationships.imagesobjectNo
relationships.images.dataarray of objectNo
relationships.images.data[].typestringNo"card_images"
relationships.images.data[].idstring (uuid)No

Set​

A trading card set resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"sets"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"1989 Topps Baseball"
attributes.titlestringYes"Series 1"
attributes.descriptionstringYes
attributes.card_countintegerYes792
attributes.current_card_countintegerNo792
attributes.is_parallelbooleanNofalse
attributes.is_insertbooleanNofalse
attributes.is_autographbooleanNofalse
attributes.is_relicbooleanNofalse
attributes.is_variationbooleanNofalseIndicates a variation set with same card numbering but different visual treatment
attributes.serialintegerYes250
attributes.number_prefixstringYes
attributes.parent_setstring (uuid)Yes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No
relationshipsobjectNoRelated resources. The genre, manufacturer, brand, and year relationships replace the previously flat FK attributes and are only populated when explicitly requested via ?include=genre,manufacturer,brand,year.
relationships.sourcesobjectNo
relationships.sources.dataarray of objectNo
relationships.sources.data[].typestringNo"set_sources"
relationships.sources.data[].idstring (uuid)No
relationships.genreobjectNoIncluded with ?include=genre.
relationships.genre.dataobjectYes
relationships.genre.data.typestringNo"genres"
relationships.genre.data.idstring (uuid)No
relationships.manufacturerobjectNoIncluded with ?include=manufacturer.
relationships.manufacturer.dataobjectYes
relationships.manufacturer.data.typestringNo"manufacturers"
relationships.manufacturer.data.idstring (uuid)No
relationships.brandobjectNoIncluded with ?include=brand.
relationships.brand.dataobjectYes
relationships.brand.data.typestringNo"brands"
relationships.brand.data.idstring (uuid)No
relationships.yearobjectNoIncluded with ?include=year.
relationships.year.dataobjectYes
relationships.year.data.typestringNo"years"
relationships.year.data.idstring (uuid)No

Player​

A player resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"players"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"Michael Jordan"
attributes.first_namestringNo"Michael"
attributes.last_namestringNo"Jordan"
attributes.positionstringYes"Shooting Guard"
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

Team​

A team resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"teams"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"Chicago Bulls"
attributes.citystringYes"Chicago"
attributes.abbreviationstringYes"CHI"
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

JSON:API pagination links

Properties​

PropertyTypeNullableExampleDescription
firststring (uri)Yes
laststring (uri)Yes
prevstring (uri)Yes
nextstring (uri)Yes

PaginationMeta​

JSON:API pagination metadata

Properties​

PropertyTypeNullableExampleDescription
current_pageintegerNo1
fromintegerNo1
tointegerNo25
per_pageintegerNo25
totalintegerNo100
last_pageintegerNo4

ListingScopeMeta​

Names the row scope a listing applied, so a scoped total is not misread as a count of the whole catalog.

Properties​

PropertyTypeNullableExampleDescription
appliedstringNo"root_sets_only"Identifier of the scope the listing applied.
descriptionstringNo"Only sets without a parent are listed, so parallels, inserts, autograph subsets and variations are omitted. This is a default scope, not a limit on your account. Add ?scope=all to list every set, or ?parent_id=\{id\} to list one set's children."Human-readable explanation of the applied scope, including how to widen it.

ErrorResponse​

JSON:API error response format

Properties​

PropertyTypeNullableExampleDescription
errorsarray of objectNo
errors[].idstringNoUnique error identifier
errors[].statusstringNoHTTP status code
errors[].codestringNoApplication-specific error code
errors[].titlestringNoShort error summary
errors[].detailstringNoDetailed error description
errors[].sourceobjectNo
errors[].source.pointerstringNoJSON pointer to error source
errors[].source.parameterstringNoParameter causing the error

Attribute​

An attribute definition resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"attributes"
idstring (uuid)No
attributesobjectNo
attributes.attributestringNo"Autograph"
attributes.namestringNo"Autograph"
attributes.descriptionstringYes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

Brand​

A brand resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"brands"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"Topps"
attributes.descriptionstringYes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

Manufacturer​

A manufacturer resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"manufacturers"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"Topps Company"
attributes.descriptionstringYes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

Year​

A year resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"years"
idstring (uuid)No
attributesobjectNo
attributes.yearstringNo"1989"
attributes.descriptionstringYes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

Genre​

A genre resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"genres"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"Baseball"
attributes.descriptionstringYes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

ObjectAttribute​

An object attribute instance resource linking an attribute to a specific object

Properties​

PropertyTypeNullableExampleDescription
typestringNo"object-attributes"
idstring (uuid)No
attributesobjectNo
attributes.attribute_idstring (uuid)No
attributes.attribute_valuestringNo"Authenticated"
attributes.object_typestringNo"App\\Models\\Card"
attributes.object_idstring (uuid)No
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

PlayerTeam​

A player-team relationship resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"playerteams"
idstring (uuid)No
attributesobjectNo
attributes.namestringNo"Michael Jordan - Chicago Bulls"
attributes.player_idstring (uuid)No
attributes.team_idstring (uuid)No
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

SetSource​

A set source tracking resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"set_sources"
idstring (uuid)No
attributesobjectNo
attributes.source_urlstring (url)No"https://example.com/checklist"
attributes.source_namestringYes"CardboardConnection"
attributes.source_typestringNo"checklist"
attributes.verified_atstring (date-time)Yes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No
attributes.urlstring (uri)No

SetTodo​

A workflow step todo resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"set_todos"
idstring (uuid)No
attributesobjectNo
attributes.stepstringNo"fetch"Workflow step identifier; see WorkflowStep enum for valid values.
attributes.statusstringNo"in_progress"
attributes.sort_orderintegerNo1
attributes.started_atstring (date-time)Yes
attributes.completed_atstring (date-time)Yes
attributes.completed_bystringYes"admin"
attributes.notesstringYes
attributes.created_atstring (date-time)No
attributes.updated_atstring (date-time)No

AuditLog​

An audit log event resource

Properties​

PropertyTypeNullableExampleDescription
typestringNo"audit_logs"
idintegerNo12345
attributesobjectNo
attributes.event_typestringNo"agent_spawned"
attributes.auditable_typestringYes"set"
attributes.auditable_idstring (uuid)Yes
attributes.agent_idstringYes"agent-abc-123"
attributes.dataobjectYes
attributes.created_atstring (date-time)No