Skip to main content

Cards

Riftseer separates a card's rules identity from its physical editions:

  • An oracle is the rules object: name, type line, stats, rules text, keywords, tags, domains, and relationships. Its id is a UUID.
  • A printing is one physical card: set, collector number, rarity, art, artist, flavour text, finishes, prices, purchase links, and printing flags. Its id is a RiftCodex MongoDB ObjectId.

A search or random-card response is normally oracle-shaped and embeds the edition to display as preferred_printing. Endpoints that identify a physical edition return a printing directly or return it beside its oracle.


Endpoints at a glance​

MethodPathDescription
GET/api/v1/cardsSearch or browse oracles and printings — see Search.
GET/api/v1/cards/randomRandom oracle with its preferred printing.
GET/api/v1/cards/detailComplete oracle page payload, viewed through one printing.
GET/api/v1/cards/:idOracle by UUID, lookup key, or single-segment slug.
GET/api/v1/cards/:id/textPlain-text oracle summary.
GET/api/v1/cards/by-slug/*Oracle by oracle slug or printing slug.
POST/api/v1/cards/resolveBatch-resolve names to oracle-plus-printing pairs.
GET/api/v1/printings/:idOne physical printing by ObjectId.

Oracle object​

Oracle responses have object: "oracle". Important fields:

FieldTypeNotes
idstringStable oracle UUID and the card's identity.
oracle_keystringStable name-derived lookup key. It is not identity.
slugstringOracle-level public slug, for example sun-disc.
name, name_normalizedstringDisplay and normalized search names.
card_typestring | undefinedBase type, for example Unit, Gear, or Spell.
supertypestring | null | undefinedOptional type modifier, for example Champion.
is_tokenbooleanToken status, independent of card_type.
energy, might, powernumber | null | undefinedOracle-level play stats.
might_bonusnumber | null | undefined[Equip] bonus. 0 is a real value; test presence, not truthiness.
text.rich, text.plainstring | undefinedRules text with symbol tokens or readable plain text.
text.equipmentstring | undefinedEffect granted by an [Equip] gear.
keywordsstring[]Normalized keyword base keys, for example deflect.
tags, domains, meta_flagsstring[]Oracle classification and searchable metadata.
relationshipsobject | undefinedOracle-to-oracle relationship arrays; populated on detail reads.
preferred_printingPrinting | undefinedThe edition to display. Search embeds the edition that matched.
printingsPrinting[] | undefinedAll editions when a read includes them.
sourcestring | undefinedriftcodex or manual.
riftseer_uristring | undefinedAbsolute oracle page URL, computed when SITE_ORIGIN is configured.

relationships contains four arrays:

FieldMeaning
makes_tokensToken oracles created by this card.
used_byCards that create this token; the reverse of makes_tokens.
charactersOther oracle roles for the same character, such as legend ↔ champion.
signaturesSignature cards and their linked legend/champion oracles.

Each entry is an OracleRef: { object: "oracle_ref", id, name, slug, uri?, riftseer_uri?, image_small? }. Relationships are oracle-level edges and are not overridden per printing.


Printing object​

Printing responses have object: "printing". Important fields:

FieldTypeNotes
idstringStable RiftCodex MongoDB ObjectId. Existing deck encodings depend on it.
oracle_idstringUUID of the rules object this edition prints.
setobject | undefinedset_code, set_name, IDs, links, publication date, count, and promo status.
collector_numberstring | undefinedRaw printed number, including prefixes such as T03, SP3, or R01.
collector_labelstring | undefinedDisplay label, including a variant marker when applicable.
raritystring | undefinedPrinting-level. Alternate or showcase editions can disagree with the base printing.
released_atstring | undefinedPrinting release date.
artist, flavour_textstring | undefinedPhysical-edition credits and flavour copy.
finishesstring[]Available finishes, for example Normal and Foil.
signature, alternate_art, overnumbered, special_collectionbooleanPrinting flags.
imageobject | undefinedsmall, normal, large, and original image URLs.
image_orientation, image_alt_textstring | undefinedDisplay metadata for the art.
pricesobject | undefinedOpt-in marketplace prices.
purchase_urisobject | undefinedTCGPlayer and Cardmarket links when available.
external_idsobject | undefinedRiftCodex, Riftbound, TCGPlayer, and Cardmarket identifiers.
public_slugstringPinned printing URL path, for example ogn/12a/signature/sun-disc.
riftseer_uristring | undefinedAbsolute printing page URL. Prefer this over constructing a URL.
differs_from_oracleboolean | undefinedThis printing has a rules delta; returned oracle fields are already resolved.

GET /api/v1/cards​

Search returns one row per oracle by default:

{
"unique": "oracle",
"count": 1,
"total": 1,
"offset": 0,
"limit": 10,
"cards": [
{
"object": "oracle",
"name": "Sun Disc",
"preferred_printing": { "object": "printing", "rarity": "Rare" }
}
],
"printings": []
}

Pass unique=prints to populate printings instead. The matching printing is always preserved: in oracle mode it becomes preferred_printing; in print mode it is the result row. See Search for the full query language and parameters.


GET /api/v1/cards/random​

Returns one random oracle with preferred_printing populated.

ParameterTypeNotes
includestring (optional)Pass prices to include prices on the preferred printing.
GET /api/v1/cards/random
GET /api/v1/cards/random?include=prices

GET /api/v1/cards/detail​

Returns the complete public card-page model. Provide exactly one lookup parameter:

ParameterTypeNotes
oraclestring (optional)Oracle UUID.
printingstring (optional)Printing ObjectId; views its oracle through this edition.
slugstring (optional)Oracle slug (sun-disc) or printing slug (ogn/12a/signature/sun-disc).
includestring (optional)Pass prices to include prices across returned printings.
GET /api/v1/cards/detail?oracle=3d8f2da9-9d2b-4a2c-a34d-6f08b54c9571
GET /api/v1/cards/detail?printing=67f4064886be8495f7165dd7
GET /api/v1/cards/detail?slug=ogn/21/sun-disc&include=prices

Response fields:

FieldTypeNotes
object"oracle_detail"
oracleOracleRules object with relationships populated.
printingPrintingRequested edition, or the oracle's preferred edition.
printingsPrinting[]Every edition of the oracle, oldest set first.
tokensOracleRef[]Tokens this oracle creates.
used_byOracleRef[]Oracles that create this token.
charactersOracleRef[]Other roles for the same character.
signaturesOracleRef[]Linked signature cards or owners.
purchaseobjectResolved TCGPlayer/Cardmarket links with search fallbacks.
rulingsCardRuling[]Printing-, oracle-, and query-rule-scoped entries, oldest first.
legalitiesCardLegality[]One resolved entry per active format.

Each CardRuling is { object, id, type, text, dated?, source?, scope?, created_at?, updated_at? }. Its scope is printing, oracle, or rule.

Each CardLegality is { object, format_id, format_code, format_name, status, scope, note?, updated_at? }. Status is legal, restricted, not_legal, or banned; scope is printing, oracle, or default. Resolution precedence is printing row → oracle row → legal by default, and note is the admin's explanation from whichever row decided the status.

The endpoint returns 400 unless exactly one lookup parameter is supplied, 404 when the oracle does not exist, and 404 when it has no printing.


GET /api/v1/cards/:id​

Fetches one oracle by UUID, oracle_key, or single-segment oracle slug. This endpoint does not accept a printing ID.

ParameterTypeNotes
includestring (optional)Pass prices to include prices on embedded printings.
GET /api/v1/cards/3d8f2da9-9d2b-4a2c-a34d-6f08b54c9571
GET /api/v1/cards/sun-disc

Returns 404 when no oracle matches the supplied handle.


GET /api/v1/cards/:id/text​

Returns a text/plain summary of an oracle: name, type line, then rules text.

GET /api/v1/cards/3d8f2da9-9d2b-4a2c-a34d-6f08b54c9571/text
Sun Disc
Gear

Equipped Champion gains +2 Power and +2 Might.

GET /api/v1/cards/by-slug/*​

The wildcard accepts either an oracle slug or a multi-segment printing slug:

GET /api/v1/cards/by-slug/sun-disc
GET /api/v1/cards/by-slug/ogn/12a/signature/sun-disc?include=prices

Both forms return an oracle. A printing slug places that edition in preferred_printing; an oracle slug uses the oracle's preferred edition.

ParameterTypeNotes
* (path)stringOracle or printing slug without a leading slash.
includestring (optional)Pass prices to include printing prices.

Returns 404 when neither slug exists.


GET /api/v1/printings/:id​

Returns one physical printing by its ObjectId. Use /api/v1/cards/:id for the oracle rules object.

ParameterTypeNotes
includestring (optional)Pass prices to include prices.
GET /api/v1/printings/67f4064886be8495f7165dd7?include=prices

Returns 404 when the printing does not exist.


POST /api/v1/cards/resolve​

Batch-resolves up to 20 request strings. Each lookup identifies an oracle and chooses the requested printing, or the oracle's preferred printing when no edition was specified.

POST /api/v1/cards/resolve
{
"requests": ["Sun Disc", "Bard|OGN-001", "Card Name|VEN-SP3"],
"include": "prices"
}

Request strings use the content inside a card token: Name, Name|SET, or Name|SET-collector. Collector prefixes such as T03, SP3, and R01 are supported. The Discord and Reddit bots pass the inner text parsed from [[Name|SET-collector]] mentions.

Each result contains:

FieldTypeNotes
requestCardRequestParsed raw, name, optional set, and optional collector.
oracleOracle | nullMatched rules object.
printingPrinting | nullRequested or preferred physical edition.
matchTypestringexact, fuzzy, or not-found.
scorenumber | undefinedRelevance score for a fuzzy match.

The response is { count, results }. More than 20 entries returns HTTP 400 with code: "TOO_MANY_REQUESTS".


Prices​

Prices are printing-level and opt-in. Pass ?include=prices, or "include": "prices" in a resolve body. Without it, prices is omitted. purchase_uris remains available when known.

{
"prices": {
"tcgplayer": {
"normal": 1.25,
"foil": 4.99,
"low_normal": 1.1,
"low_foil": null
},
"cardmarket": {
"normal": null,
"foil": null,
"low_normal": null,
"low_foil": null
}
},
"purchase_uris": {
"tcgplayer": "https://www.tcgplayer.com/...",
"cardmarket": "https://www.cardmarket.com/..."
}
}

Every nested price is nullable. Price data comes from TCGPlayer through TCGCSV enrichment and does not affect oracle identity or rules.