{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flipzi-io/json-schema/flipzi-io-card-schema.json",
  "title": "Card",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flipzi-io-openapi.yml#/components/schemas/Card",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "name_en": {
      "type": [
        "string",
        "null"
      ],
      "description": "The English name of a Japanese (`pokemon-jp`) or Chinese (`pokemon-zh`)\ncard, e.g. `リザードンex` → `Charizard ex`. Null for every other game\n(`name` is already English) and where no English name is known.\n"
    },
    "game": {
      "type": "string"
    },
    "set": {
      "type": "object",
      "properties": {
        "set_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed set code, e.g. OP01 on a PRB01 reprint of OP01-016. Null where unknown."
        }
      }
    },
    "number": {
      "type": "string",
      "description": "Collector number alone (`125`), not the `125/197` form printed on the card."
    },
    "rarity": {
      "type": [
        "string",
        "null"
      ]
    },
    "types": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "release_year": {
      "type": [
        "integer",
        "null"
      ]
    },
    "image_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "slug": {
      "type": [
        "string",
        "null"
      ]
    },
    "printing": {
      "type": [
        "string",
        "null"
      ],
      "description": "Which printing this row is: a slug from the vocabulary under\n*Printings and finishes*, or null for a base card. A printing is a\nseparate product with its own id.\n"
    },
    "printing_label": {
      "type": [
        "string",
        "null"
      ],
      "description": "Display name of `printing`; null for a base card."
    },
    "base_card_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The base card this row is a printing of; null on a base card."
    },
    "finishes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "reverse_holo",
          "first_edition"
        ]
      },
      "description": "The non-standard finishes this row really has (from TCGplayer's price\nsubtypes). `standard` is implied. Select one with `?finish=`.\n"
    },
    "variants": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Variant"
      }
    }
  },
  "$defs": {
    "Variant": {
      "type": "object",
      "properties": {
        "variant_id": {
          "type": "string",
          "format": "uuid"
        },
        "edition": {
          "type": "string"
        },
        "finish": {
          "type": "string"
        },
        "grade": {
          "type": "string"
        },
        "grading_company": {
          "type": "string"
        }
      }
    }
  }
}