{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/valotcg/json-schema/valotcg-card-detail-schema.json",
  "title": "CardDetail",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/valotcg-data-v1-openapi.json#/components/schemas/CardDetail",
  "properties": {
    "card_id": {
      "type": "integer",
      "title": "Card Id",
      "description": "Stable Valo.Data card id."
    },
    "game": {
      "type": "string",
      "title": "Game",
      "description": "Game slug, e.g. `pokemon`, `onepiece`, `star_wars_unlimited`."
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "Printed name in the card language."
    },
    "name_en": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name En",
      "description": "English name when known."
    },
    "number": {
      "type": "string",
      "title": "Number",
      "description": "Collector number as printed, e.g. `001/102`, `OP01-012`."
    },
    "rarity": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rarity",
      "description": "Rarity label as printed on the card or as given by the source, in the card language, e.g. `Illustration spéciale rare`, `SuperRare`."
    },
    "rarity_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rarity Code",
      "description": "Canonical rarity code, shared by every language of one rarity system, e.g. `special_illustration_rare`. Japanese and Chinese Pokémon prints follow their own system (`sar`, `ur`). `null` when the rarity is unknown. Codes of a game: `GET /data/v1/games/{game}/rarities`."
    },
    "language": {
      "type": "string",
      "enum": [
        "fr",
        "en",
        "ja",
        "zh",
        "de",
        "es",
        "it",
        "pt"
      ],
      "title": "Language",
      "description": "Language of the printed card."
    },
    "edition": {
      "$ref": "#/$defs/EditionRef"
    },
    "image_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Url"
    },
    "variants": {
      "items": {
        "type": "string",
        "enum": [
          "default",
          "foil"
        ]
      },
      "type": "array",
      "title": "Variants",
      "description": "Price variants tracked for this card: `default` (main printing) and, for games pricing foils separately, `foil`."
    },
    "cardmarket_product_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cardmarket Product Id",
      "description": "Cardmarket idProduct; `null` on Sandbox and Starter."
    },
    "tcgplayer_product_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "US market product id",
      "description": "US market product id; `null` on Sandbox and Starter."
    },
    "series": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Series",
      "description": "Series or block of the edition."
    },
    "illustrator": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Illustrator"
    },
    "category": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Category",
      "description": "Main card category, e.g. Pokémon, Trainer, Leader."
    },
    "card_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Card Type"
    },
    "cardmarket_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cardmarket Url",
      "description": "Cardmarket product page; `null` on Sandbox and Starter."
    },
    "tcgplayer_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "US market URL",
      "description": "US market product page; `null` on Sandbox and Starter."
    }
  },
  "type": "object",
  "required": [
    "card_id",
    "game",
    "name",
    "number",
    "language",
    "edition",
    "variants"
  ],
  "$defs": {
    "EditionRef": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id",
          "description": "Edition id, usable as `edition_id` filter."
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Code",
          "description": "Publisher set code, e.g. `SV06`, `OP-01`."
        },
        "release_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Date"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "EditionRef"
    }
  }
}