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

PropertyTypeDescription
typestringResource type
idstringUnique identifier
attributesobject
relationshipsobject

Set

A trading card set resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject
relationshipsobjectRelated 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.

Player

A player resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

Team

A team resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

JSON:API pagination links

Properties

PropertyTypeDescription
firststring
laststring
prevstring
nextstring

PaginationMeta

JSON:API pagination metadata

Properties

PropertyTypeDescription
current_pageinteger
frominteger
tointeger
per_pageinteger
totalinteger
last_pageinteger

ErrorResponse

JSON:API error response format

Properties

PropertyTypeDescription
errorsarray

Attribute

An attribute definition resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

Brand

A brand resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

Manufacturer

A manufacturer resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

Year

A year resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

Genre

A genre resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

ObjectAttribute

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

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

PlayerTeam

A player-team relationship resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

SetSource

A set source tracking resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

SetTodo

A workflow step todo resource

Properties

PropertyTypeDescription
typestring
idstring
attributesobject

AuditLog

An audit log event resource

Properties

PropertyTypeDescription
typestring
idinteger
attributesobject