{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pokefocus-com/json-schema/pokefocus-com-sealed-product-schema.json",
  "title": "SealedProduct",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pokefocus-com-openapi.json#/components/schemas/SealedProduct",
  "type": "object",
  "required": [
    "id",
    "name",
    "url",
    "market",
    "history",
    "affiliateDisclosure"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": [
        "string",
        "null"
      ]
    },
    "language": {
      "type": [
        "string",
        "null"
      ]
    },
    "set": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "year": {
          "type": [
            "integer",
            "null"
          ]
        },
        "imageUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "The set logo."
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "The set card list on PokeFocus."
        },
        "sealedUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "The set sealed products on PokeFocus."
        }
      }
    },
    "releaseDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "imageUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "The PokeFocus sealed product page."
    },
    "tcgplayerUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "The product on TCGplayer (affiliate link)."
    },
    "market": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "price": {
          "type": [
            "number",
            "null"
          ],
          "description": "US dollars."
        },
        "asOf": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "lowestListingPrice": {
          "type": [
            "number",
            "null"
          ],
          "description": "Lowest TCGplayer listing, US dollars."
        },
        "listings": {
          "type": [
            "number",
            "null"
          ]
        },
        "packCount": {
          "type": [
            "number",
            "null"
          ]
        },
        "pricePerPack": {
          "type": [
            "number",
            "null"
          ],
          "description": "US dollars."
        },
        "change7dPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "change30dPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "stale": {
          "type": "boolean",
          "description": "True when TCGplayer has not refreshed the price for over 14 days: quote it as the last known price, never a current one."
        },
        "median30d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Median daily market price over the last 30 days, one-day glitches left out."
        },
        "low30d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Lowest daily market price over the last 30 days, one-day glitches left out."
        },
        "high30d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Highest daily market price over the last 30 days, one-day glitches left out."
        },
        "vsMedian30dPercent": {
          "type": [
            "number",
            "null"
          ],
          "description": "Today against the 30-day median, in percent; negative is under it."
        },
        "rsi14": {
          "type": [
            "object",
            "null"
          ],
          "description": "Overbought/oversold reading of the market price. A fact about recent moves, not advice.",
          "properties": {
            "value": {
              "type": "number",
              "description": "Wilder RSI over 14 days, 0-100."
            },
            "band": {
              "type": "string",
              "enum": [
                "oversold",
                "neutral",
                "overbought"
              ],
              "description": "Oversold at RSI 30 or below with a 5%+ fall over 14 days; overbought at 70 or above with a 5%+ rise; otherwise neutral."
            },
            "change14dPercent": {
              "type": [
                "number",
                "null"
              ]
            }
          }
        }
      }
    },
    "supply": {
      "type": "object",
      "properties": {
        "tcgplayerListings": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "topCards": {
      "type": "array",
      "description": "The set's highest-priced cards with TCGplayer market prices.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "number": {
            "type": [
              "string",
              "null"
            ]
          },
          "rarity": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "US dollars."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "history": {
      "type": "array",
      "description": "Daily TCGplayer market price, oldest first, up to 30 days.",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "marketPrice": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      }
    },
    "affiliateDisclosure": {
      "type": "string",
      "description": "The affiliate disclosure that applies to the TCGplayer links."
    },
    "capturedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When PokeFocus answered; market.asOf is when a price was refreshed."
    }
  }
}