{"openapi":"3.0.3","info":{"title":"Renaiss OS Index — Public API","version":"1.0.0","description":"Read-only JSON over the Renaiss OS Index data. No authentication required;\nevery endpoint is a `GET` and responses carry permissive CORS, so you can\ncall them straight from the browser via **Try it out** below.\n\n**Finding card slugs:** start at `/v1/search?q=...`. Each result includes an\n`href` of the form `/card/{game}/{set}/{card}` — feed those three segments\ninto the `/v1/cards/{game}/{set}/{card}` endpoints."},"servers":[{"url":"/","description":"This host"}],"tags":[{"name":"Indices","description":"Game-level index tiles and drill-downs."},{"name":"Cards","description":"Card detail, trades, price series, and featured movers."},{"name":"Sets","description":"Per-set card listings."},{"name":"Trades","description":"Cross-card live trade feed."},{"name":"Search","description":"Card lookup."},{"name":"Graded","description":"Graded-cert (PSA/CGC/BGS) lookup with on-demand valuation."},{"name":"Forms","description":"Public intake: partner applications and data-issue reports."},{"name":"System","description":"Health and service metadata."}],"paths":{"/v1/partners/apply":{"post":{"tags":["Forms"],"summary":"Apply to become a partner","description":"Submit a shop intake application. Rate-limited per IP. Persists a partner_application row.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApplicationInput"}}}},"responses":{"201":{"description":"Application received.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"422":{"description":"Validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited — too many submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/report":{"post":{"tags":["Forms"],"summary":"Report a data issue","description":"Flag a price/trade that looks wrong. Rate-limited per IP. Persists a data_issue_report row.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataIssueReportInput"}}}},"responses":{"201":{"description":"Report received.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"422":{"description":"Validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited — too many submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/health":{"get":{"tags":["System"],"summary":"Service health (root)","description":"Root-level liveness probe for load balancers / uptime checks. Never cached.","responses":{"200":{"description":"Service is up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/health":{"get":{"tags":["System"],"summary":"Service health","description":"Liveness probe. Never cached.","responses":{"200":{"description":"Service is up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/indices":{"get":{"tags":["Indices"],"summary":"Index tiles","description":"Pokémon & One Piece index tiles: value, deltas, sparkline, and top movers.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndicesResponse"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/indices/{game}":{"get":{"tags":["Indices"],"summary":"Index drill-down","description":"Full index detail for one game, including its ranked constituents.","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexDetail"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/featured":{"get":{"tags":["Cards"],"summary":"Featured movers","description":"Top-mover card tiles across the indexed games.","parameters":[{"name":"limit","in":"query","required":false,"description":"Number of cards to return (max 24).","schema":{"type":"integer","minimum":1,"maximum":24,"default":6}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturedResponse"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/{game}/{set}/{card}":{"get":{"tags":["Cards"],"summary":"Card detail","description":"Price, confidence, source breakdown, other grades, and similar cards for one card.","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"},{"name":"set","in":"path","required":true,"description":"Set slug — the 2nd path segment of a card `href` returned by `/v1/search` (`/card/{game}/{set}/{card}`).","schema":{"type":"string"},"example":"shiny-star-v"},{"name":"card","in":"path","required":true,"description":"Card slug — the final path segment of a card `href` (`{number}-{name}-{company}-{grade}`).","schema":{"type":"string"},"example":"307-charizard-psa-10"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardDetail"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/{game}/{set}/{card}/trades":{"get":{"tags":["Cards"],"summary":"Card trade history","description":"Listings and completed sales for a card, with optional filters.","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"},{"name":"set","in":"path","required":true,"description":"Set slug — the 2nd path segment of a card `href` returned by `/v1/search` (`/card/{game}/{set}/{card}`).","schema":{"type":"string"},"example":"shiny-star-v"},{"name":"card","in":"path","required":true,"description":"Card slug — the final path segment of a card `href` (`{number}-{name}-{company}-{grade}`).","schema":{"type":"string"},"example":"307-charizard-psa-10"},{"name":"source","in":"query","required":false,"description":"Restrict to a single data source.","schema":{"type":"string","enum":["snkrdunk","alt_xyz","mercari","yahoo","ebay_jp","cardladder","psa","renaiss","renaissos_index"]}},{"name":"window","in":"query","required":false,"description":"Trailing window in days.","schema":{"type":"integer","minimum":1}},{"name":"scope","in":"query","required":false,"description":"`grade` (default) limits to the card's own grade; `all` returns every grade.","schema":{"type":"string","enum":["grade","all"],"default":"grade"}},{"name":"limit","in":"query","required":false,"description":"Max rows to return (max 200).","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesResponse"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/{game}/{set}/{card}/series":{"get":{"tags":["Cards"],"summary":"Card price series","description":"Daily-average price points (split into completed sales vs active listings) over a window.","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"},{"name":"set","in":"path","required":true,"description":"Set slug — the 2nd path segment of a card `href` returned by `/v1/search` (`/card/{game}/{set}/{card}`).","schema":{"type":"string"},"example":"shiny-star-v"},{"name":"card","in":"path","required":true,"description":"Card slug — the final path segment of a card `href` (`{number}-{name}-{company}-{grade}`).","schema":{"type":"string"},"example":"307-charizard-psa-10"},{"name":"window","in":"query","required":false,"description":"Window in days. Other values fall back to 30.","schema":{"type":"integer","enum":[7,30,90,365],"default":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesResponse"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/{game}/{set}/{card}/fmv-series":{"get":{"tags":["Cards"],"summary":"Card daily FMV series","description":"The card's daily fair-market value — the reference-price methodology (mean of completed sales over a trailing window) evaluated once per day (the chart line) — plus, for each day, that day's sales broken down by source (count + that day's mean), for the chart's hover. Powers the card price chart.","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"},{"name":"set","in":"path","required":true,"description":"Set slug — the 2nd path segment of a card `href` returned by `/v1/search` (`/card/{game}/{set}/{card}`).","schema":{"type":"string"},"example":"shiny-star-v"},{"name":"card","in":"path","required":true,"description":"Card slug — the final path segment of a card `href` (`{number}-{name}-{company}-{grade}`).","schema":{"type":"string"},"example":"307-charizard-psa-10"},{"name":"window","in":"query","required":false,"description":"Display window in days. Other values fall back to 30.","schema":{"type":"integer","enum":[7,30,90,365],"default":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FmvSeriesResponse"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/trades/recent":{"get":{"tags":["Trades"],"summary":"Recent trades","description":"Cross-card live trade feed, newest first.","parameters":[{"name":"limit","in":"query","required":false,"description":"Number of trades to return (max 50).","schema":{"type":"integer","minimum":1,"maximum":50,"default":12}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentTradesResponse"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/search":{"get":{"tags":["Search"],"summary":"Card search","description":"Free-text card search. Queries shorter than 2 characters return no results.","parameters":[{"name":"q","in":"query","required":false,"description":"Search query (min 2 characters).","schema":{"type":"string","maxLength":80},"example":"charizard"},{"name":"limit","in":"query","required":false,"description":"Number of results to return (max 30).","schema":{"type":"integer","minimum":1,"maximum":30,"default":12}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/{game}/{set}/{card}/overview":{"get":{"tags":["Cards"],"summary":"Card overview (all grades)","description":"Grade-agnostic view of a card: its identity plus every grading company / grade we track for it. Here `card` is the grade-less slug (`{number}-{name}`) — drop the `-{company}-{grade}` suffix from a card `href`.","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"},{"name":"set","in":"path","required":true,"description":"Set slug — the 2nd path segment of a card `href` returned by `/v1/search` (`/card/{game}/{set}/{card}`).","schema":{"type":"string"},"example":"shiny-star-v"},{"name":"card","in":"path","required":true,"description":"Grade-less card slug (`{number}-{name}`) — a card `href`'s final segment with the `-{company}-{grade}` suffix removed.","schema":{"type":"string"},"example":"307-charizard"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardOverview"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/by-id/{id}":{"get":{"tags":["Cards"],"summary":"Card detail by id","description":"Same as `/v1/cards/{game}/{set}/{card}` but keyed by the catalog `items.id` — resolves the id to its slug and a representative grade (PSA 10 when available).","parameters":[{"name":"id","in":"path","required":true,"description":"Catalog card id (the `items.id` UUID). Resolves to the card with a representative grade (PSA 10 when available, else the top-priced grade).","schema":{"type":"string","format":"uuid"},"example":"01262ac6-2b79-468f-922f-f6c38b18f089"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardDetail"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/by-id/{id}/overview":{"get":{"tags":["Cards"],"summary":"Card overview by id (all grades)","description":"Grade-agnostic overview of the card with this `items.id`.","parameters":[{"name":"id","in":"path","required":true,"description":"Catalog card id (the `items.id` UUID). Resolves to the card with a representative grade (PSA 10 when available, else the top-priced grade).","schema":{"type":"string","format":"uuid"},"example":"01262ac6-2b79-468f-922f-f6c38b18f089"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardOverview"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/by-id/{id}/trades":{"get":{"tags":["Cards"],"summary":"Card trade history by id","description":"Listings and completed sales for the card with this `items.id`.","parameters":[{"name":"id","in":"path","required":true,"description":"Catalog card id (the `items.id` UUID). Resolves to the card with a representative grade (PSA 10 when available, else the top-priced grade).","schema":{"type":"string","format":"uuid"},"example":"01262ac6-2b79-468f-922f-f6c38b18f089"},{"name":"source","in":"query","required":false,"description":"Restrict to a single data source.","schema":{"type":"string","enum":["snkrdunk","alt_xyz","mercari","yahoo","ebay_jp","cardladder","psa","renaiss","renaissos_index"]}},{"name":"window","in":"query","required":false,"description":"Trailing window in days.","schema":{"type":"integer","minimum":1}},{"name":"scope","in":"query","required":false,"description":"`grade` (default) limits to the card's own grade; `all` returns every grade.","schema":{"type":"string","enum":["grade","all"],"default":"grade"}},{"name":"limit","in":"query","required":false,"description":"Max rows to return (max 200).","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesResponse"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/by-id/{id}/series":{"get":{"tags":["Cards"],"summary":"Card price series by id","description":"Daily-average price points for the card with this `items.id`.","parameters":[{"name":"id","in":"path","required":true,"description":"Catalog card id (the `items.id` UUID). Resolves to the card with a representative grade (PSA 10 when available, else the top-priced grade).","schema":{"type":"string","format":"uuid"},"example":"01262ac6-2b79-468f-922f-f6c38b18f089"},{"name":"window","in":"query","required":false,"description":"Window in days. Other values fall back to 30.","schema":{"type":"integer","enum":[7,30,90,365],"default":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesResponse"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/cards/by-id/{id}/fmv-series":{"get":{"tags":["Cards"],"summary":"Card daily FMV series by id","description":"The daily fair-market-value series for the card with this `items.id`.","parameters":[{"name":"id","in":"path","required":true,"description":"Catalog card id (the `items.id` UUID). Resolves to the card with a representative grade (PSA 10 when available, else the top-priced grade).","schema":{"type":"string","format":"uuid"},"example":"01262ac6-2b79-468f-922f-f6c38b18f089"},{"name":"window","in":"query","required":false,"description":"Window in days. Other values fall back to 30.","schema":{"type":"integer","enum":[7,30,90,365],"default":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FmvSeriesResponse"}}}},"404":{"description":"Unknown game, or card/index not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/sets/{game}/{set}":{"get":{"tags":["Sets"],"summary":"Set listing","description":"Every card we track in a set, keyed by the set slug (the 2nd path segment of a card `href`).","parameters":[{"name":"game","in":"path","required":true,"description":"Game slug.","schema":{"type":"string","enum":["pokemon","one-piece","sports"]},"example":"pokemon"},{"name":"set","in":"path","required":true,"description":"Set slug — the 2nd path segment of a card `href` returned by `/v1/search` (`/card/{game}/{set}/{card}`).","schema":{"type":"string"},"example":"shiny-star-v"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetResponse"}}}},"404":{"description":"Unknown game, or set not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/graded/{cert}":{"get":{"tags":["Graded"],"summary":"Graded cert lookup","description":"Look up a graded card by certification number (PSA / CGC / BGS). Cached-first: returns the card plus the FMV for the cert's grade. On a cache miss it runs a live on-demand valuation — available to all callers (a cache hit is free; only a genuine miss runs the pipeline). The per-IP rate limit bounds how often any one caller triggers a miss; send an API key (`X-Api-Key` + `X-Api-Secret`) for a higher ceiling. Always returns 200 for a parseable cert — inspect `found`.","parameters":[{"name":"cert","in":"path","required":true,"description":"Certification number, optionally prefixed by the grader. E.g. `PSA149595098`, `149595098`, `CGC1234567`.","schema":{"type":"string"},"example":"PSA149595098"}],"responses":{"200":{"description":"Lookup result — inspect `found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradedLookup"}}}},"400":{"description":"Could not parse a cert number from the input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/graded/{cert}/stream":{"get":{"tags":["Graded"],"summary":"Graded cert lookup — live progress (SSE)","description":"Server-Sent Events variant of `/v1/graded/{cert}`. Streams the on-demand\nvaluation as it runs, so a client can show live progress instead of blocking\non the full pipeline. Consume with `EventSource`.\n\nThe `text/event-stream` body carries named events:\n- `event: progress` — a `PipelineProgress` object as each stage begins\n  (`cert_lookup` → `identify` → `enrich` → `find_item` → `cache_check` →\n  `match` → `crawl` → `fmv` → `done`).\n- `event: result` — the terminal `GradedLookup` (inspect `found`).\n- `event: failed` — `{ error, detail }` on an unparseable cert or internal error.\n\nA cache hit emits a single `result` with no `progress`. A miss runs the live\ncompute for any caller (including anonymous), bounded by the per-IP rate limit;\nsend an API key (`X-Api-Key` + `X-Api-Secret`) for a higher ceiling.","parameters":[{"name":"cert","in":"path","required":true,"description":"Certification number, optionally prefixed by the grader. E.g. `PSA149595098`, `149595098`, `CGC1234567`.","schema":{"type":"string"},"example":"PSA149595098"}],"responses":{"200":{"description":"SSE stream: `progress` events (each a `PipelineProgress`) followed by a terminal `result` (a `GradedLookup`) or `failed`.","content":{"text/event-stream":{"schema":{"type":"string","description":"Raw SSE frames. `progress` data is a PipelineProgress; `result` data is a GradedLookup."}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"ApiError":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error"],"additionalProperties":false},"Deltas":{"type":"object","properties":{"d7":{"type":"number","nullable":true},"d30":{"type":"number","nullable":true},"d365":{"type":"number","nullable":true}},"required":["d7","d30","d365"],"additionalProperties":false},"SeriesPoint":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"usdCents":{"type":"integer","minimum":0},"source":{"type":"string","enum":["snkrdunk","alt_xyz","mercari","yahoo","ebay_jp","cardladder","psa","renaiss","renaissos_index"],"nullable":true},"bucket":{"type":"string","enum":["public","renaiss","partner"],"nullable":true},"n":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["transaction","listing"],"nullable":true},"company":{"type":"string","enum":["PSA","BGS","CGC","SGC","RAW"],"nullable":true},"grade":{"type":"string","enum":["1 Poor","2 Good","3 Very Good","4 Very Good-Excellent","5 Excellent","6 Excellent-Mint","7 Near Mint","8 NM-MT","8.5 NM-MT+","9 Mint","9.5 Mint","10 Gem Mint","8 NM/Mint","8.5 NM/Mint+","9.5 Mint +","9.5 Gem Mint","10 Pristine","10 Black Label","10 Perfect","A","B","C","D"],"nullable":true},"gradeLabel":{"type":"string"}},"required":["t","usdCents"],"additionalProperties":false},"IndexMover":{"type":"object","properties":{"name":{"type":"string"},"setCode":{"type":"string","nullable":true},"cardNumber":{"type":"string","nullable":true},"grade":{"type":"string"},"href":{"type":"string"},"deltaPct":{"type":"number","nullable":true}},"required":["name","setCode","cardNumber","grade","href","deltaPct"],"additionalProperties":false},"IndexTile":{"type":"object","properties":{"game":{"type":"string","enum":["pokemon","one-piece","sports"]},"label":{"type":"string"},"value":{"type":"number"},"base":{"type":"number"},"deltas":{"$ref":"#/components/schemas/Deltas"},"constituentCount":{"type":"integer","minimum":0},"rebalance":{"type":"string"},"sparkline":{"type":"array","items":{"$ref":"#/components/schemas/SeriesPoint"}},"topMovers":{"type":"array","items":{"$ref":"#/components/schemas/IndexMover"}},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["game","label","value","base","deltas","constituentCount","rebalance","sparkline","topMovers","updatedAt"],"additionalProperties":false},"IndicesResponse":{"type":"object","properties":{"indices":{"type":"array","items":{"$ref":"#/components/schemas/IndexTile"}}},"required":["indices"],"additionalProperties":false},"IndexConstituent":{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":true,"minimum":0},"name":{"type":"string"},"setName":{"type":"string","nullable":true},"setCode":{"type":"string","nullable":true},"cardNumber":{"type":"string","nullable":true},"grade":{"type":"string"},"imageUrl":{"type":"string","nullable":true},"imageUrlThumb":{"type":"string","nullable":true},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"deltaPct":{"type":"number","nullable":true},"lastSaleAt":{"type":"string","format":"date-time","nullable":true},"href":{"type":"string"}},"required":["rank","name","setName","setCode","cardNumber","grade","imageUrl","priceUsdCents","deltaPct","lastSaleAt","href"],"additionalProperties":false},"IndexDetail":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/IndexTile/properties/game"},"label":{"$ref":"#/components/schemas/IndexTile/properties/label"},"value":{"$ref":"#/components/schemas/IndexTile/properties/value"},"base":{"$ref":"#/components/schemas/IndexTile/properties/base"},"deltas":{"$ref":"#/components/schemas/Deltas"},"constituentCount":{"$ref":"#/components/schemas/IndexTile/properties/constituentCount"},"rebalance":{"$ref":"#/components/schemas/IndexTile/properties/rebalance"},"sparkline":{"$ref":"#/components/schemas/IndexTile/properties/sparkline"},"topMovers":{"$ref":"#/components/schemas/IndexTile/properties/topMovers"},"updatedAt":{"$ref":"#/components/schemas/IndexTile/properties/updatedAt"},"windowDays":{"type":"integer","exclusiveMinimum":true,"minimum":0},"baseDate":{"type":"string","nullable":true},"constituents":{"type":"array","items":{"$ref":"#/components/schemas/IndexConstituent"}}},"required":["game","label","value","base","deltas","constituentCount","rebalance","sparkline","topMovers","updatedAt","windowDays","baseDate","constituents"],"additionalProperties":false},"CardSummary":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/IndexTile/properties/game"},"type":{"type":"string","enum":["POKEMON","ONE_PIECE","SPORTS"]},"name":{"type":"string"},"setName":{"type":"string","nullable":true},"setCode":{"type":"string","nullable":true},"cardNumber":{"type":"string","nullable":true},"variation":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true},"imageUrlThumb":{"type":"string","nullable":true},"company":{"$ref":"#/components/schemas/SeriesPoint/properties/company"},"grade":{"$ref":"#/components/schemas/SeriesPoint/properties/grade"},"gradeLabel":{"type":"string"},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"deltaPct":{"type":"number","nullable":true},"confidence":{"type":"string","enum":["high","medium","low"],"nullable":true},"lastSaleAt":{"type":"string","format":"date-time","nullable":true},"spark":{"type":"array","items":{"type":"integer","minimum":0}},"href":{"type":"string"}},"required":["game","type","name","setName","setCode","cardNumber","variation","language","imageUrl","company","grade","gradeLabel","priceUsdCents","deltaPct","confidence","lastSaleAt","href"],"additionalProperties":false},"FeaturedResponse":{"type":"object","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/CardSummary"}}},"required":["cards"],"additionalProperties":false},"GradeRow":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/SeriesPoint/properties/company"},"grade":{"$ref":"#/components/schemas/SeriesPoint/properties/grade"},"gradeLabel":{"type":"string"},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"deltaPct":{"type":"number","nullable":true},"confidence":{"allOf":[{"$ref":"#/components/schemas/CardSummary/properties/confidence"}],"nullable":true},"lastSaleAt":{"type":"string","format":"date-time","nullable":true},"href":{"type":"string"},"current":{"type":"boolean"}},"required":["company","grade","gradeLabel","priceUsdCents","deltaPct","confidence","lastSaleAt","href","current"],"additionalProperties":false},"SourceBreakdownEntry":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/SeriesPoint/properties/source"},"bucket":{"$ref":"#/components/schemas/SeriesPoint/properties/bucket"},"displayName":{"type":"string"},"count":{"type":"integer","minimum":0},"medianUsdCents":{"type":"integer","minimum":0,"nullable":true},"overviewUrl":{"type":"string","nullable":true}},"required":["source","bucket","displayName","count","medianUsdCents","overviewUrl"],"additionalProperties":false},"FmvMethodValue":{"type":"object","properties":{"method":{"type":"string","enum":["median","mean","vwap"]},"scorerVersion":{"type":"string"},"label":{"type":"string"},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"confidence":{"allOf":[{"$ref":"#/components/schemas/CardSummary/properties/confidence"}],"nullable":true},"sourceCount":{"type":"integer","minimum":0,"nullable":true},"observationCount":{"type":"integer","minimum":0,"nullable":true}},"required":["method","scorerVersion","label","priceUsdCents","confidence","sourceCount","observationCount"],"additionalProperties":false},"CardDetail":{"type":"object","properties":{"id":{"type":"string"},"game":{"$ref":"#/components/schemas/IndexTile/properties/game"},"type":{"$ref":"#/components/schemas/CardSummary/properties/type"},"name":{"type":"string"},"setName":{"type":"string","nullable":true},"setCode":{"type":"string","nullable":true},"cardNumber":{"type":"string","nullable":true},"variation":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true},"imageUrlLg":{"type":"string","nullable":true},"company":{"$ref":"#/components/schemas/SeriesPoint/properties/company"},"grade":{"$ref":"#/components/schemas/SeriesPoint/properties/grade"},"gradeLabel":{"type":"string"},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"deltas":{"$ref":"#/components/schemas/Deltas"},"confidence":{"allOf":[{"$ref":"#/components/schemas/CardSummary/properties/confidence"}],"nullable":true},"sourceCount":{"type":"integer","minimum":0,"nullable":true},"observationCount":{"type":"integer","minimum":0,"nullable":true},"observationWindowDays":{"type":"integer","minimum":0,"nullable":true},"totalObservationCount":{"type":"integer","minimum":0,"nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"lastSaleAt":{"type":"string","format":"date-time","nullable":true},"sourceBreakdown":{"type":"array","items":{"$ref":"#/components/schemas/SourceBreakdownEntry"}},"methods":{"type":"array","items":{"$ref":"#/components/schemas/FmvMethodValue"}},"otherGrades":{"type":"array","items":{"$ref":"#/components/schemas/GradeRow"}},"similar":{"type":"array","items":{"$ref":"#/components/schemas/CardSummary"}},"href":{"type":"string"}},"required":["id","game","type","name","setName","setCode","cardNumber","variation","language","imageUrl","imageUrlLg","company","grade","gradeLabel","priceUsdCents","deltas","confidence","sourceCount","observationCount","observationWindowDays","totalObservationCount","updatedAt","lastSaleAt","sourceBreakdown","methods","otherGrades","similar","href"],"additionalProperties":false},"CardOverviewGrade":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/SeriesPoint/properties/company"},"grade":{"$ref":"#/components/schemas/SeriesPoint/properties/grade"},"gradeLabel":{"type":"string"},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"deltaPct":{"type":"number","nullable":true},"confidence":{"allOf":[{"$ref":"#/components/schemas/CardSummary/properties/confidence"}],"nullable":true},"sourceCount":{"type":"integer","minimum":0,"nullable":true},"observationCount":{"type":"integer","minimum":0,"nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"lastSaleAt":{"type":"string","format":"date-time","nullable":true},"spark":{"type":"array","items":{"type":"integer","minimum":0}},"href":{"type":"string"}},"required":["company","grade","gradeLabel","priceUsdCents","deltaPct","confidence","sourceCount","observationCount","updatedAt","lastSaleAt","href"],"additionalProperties":false},"CardOverview":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/IndexTile/properties/game"},"type":{"$ref":"#/components/schemas/CardSummary/properties/type"},"name":{"type":"string"},"setName":{"type":"string","nullable":true},"setCode":{"type":"string","nullable":true},"cardNumber":{"type":"string","nullable":true},"variation":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true},"imageUrlLg":{"type":"string","nullable":true},"gradeCount":{"type":"integer","minimum":0},"href":{"type":"string"},"grades":{"type":"array","items":{"$ref":"#/components/schemas/CardOverviewGrade"}}},"required":["game","type","name","setName","setCode","cardNumber","variation","language","imageUrl","imageUrlLg","gradeCount","href","grades"],"additionalProperties":false},"GradedLookup":{"type":"object","properties":{"cert":{"type":"string"},"certNumber":{"type":"string"},"company":{"$ref":"#/components/schemas/SeriesPoint/properties/company"},"found":{"type":"boolean"},"grade":{"allOf":[{"$ref":"#/components/schemas/SeriesPoint/properties/grade"}],"nullable":true},"gradeLabel":{"type":"string","nullable":true},"card":{"allOf":[{"$ref":"#/components/schemas/CardSummary"}],"nullable":true},"certImages":{"type":"object","properties":{"front":{"type":"string","nullable":true},"back":{"type":"string","nullable":true}},"required":["front","back"],"additionalProperties":false,"nullable":true},"reason":{"type":"string","enum":["not_ingested","company_unsupported","compute_incomplete","no_grade_price"],"nullable":true}},"required":["cert","certNumber","company","found","grade","gradeLabel","card","certImages"],"additionalProperties":false},"PipelineProgress":{"type":"object","properties":{"stage":{"type":"string","enum":["cert_lookup","identify","enrich","find_item","cache_check","match","crawl","fmv","done"]},"message":{"type":"string"},"done":{"type":"boolean"},"status":{"type":"string","enum":["running","ok","skipped","error"]},"data":{}},"required":["stage","message"],"additionalProperties":false},"TradeRow":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/SeriesPoint/properties/source"},"bucket":{"$ref":"#/components/schemas/SeriesPoint/properties/bucket"},"displayName":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["listing","transaction"]},"priceUsdCents":{"type":"integer","minimum":0,"nullable":true},"priceMinor":{"type":"integer","nullable":true},"currency":{"type":"string"},"detail":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"company":{"allOf":[{"$ref":"#/components/schemas/SeriesPoint/properties/company"}],"nullable":true},"grade":{"allOf":[{"$ref":"#/components/schemas/SeriesPoint/properties/grade"}],"nullable":true},"gradeLabel":{"type":"string","nullable":true}},"required":["source","bucket","displayName","observedAt","kind","priceUsdCents","priceMinor","currency","detail","sourceUrl","company","grade","gradeLabel"],"additionalProperties":false},"TradesResponse":{"type":"object","properties":{"trades":{"type":"array","items":{"$ref":"#/components/schemas/TradeRow"}},"total":{"type":"integer","minimum":0}},"required":["trades","total"],"additionalProperties":false},"RecentTrade":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/SeriesPoint/properties/source"},"bucket":{"$ref":"#/components/schemas/SeriesPoint/properties/bucket"},"displayName":{"$ref":"#/components/schemas/TradeRow/properties/displayName"},"observedAt":{"$ref":"#/components/schemas/TradeRow/properties/observedAt"},"kind":{"$ref":"#/components/schemas/TradeRow/properties/kind"},"priceUsdCents":{"$ref":"#/components/schemas/TradeRow/properties/priceUsdCents"},"priceMinor":{"$ref":"#/components/schemas/TradeRow/properties/priceMinor"},"currency":{"$ref":"#/components/schemas/TradeRow/properties/currency"},"detail":{"$ref":"#/components/schemas/TradeRow/properties/detail"},"sourceUrl":{"$ref":"#/components/schemas/TradeRow/properties/sourceUrl"},"company":{"$ref":"#/components/schemas/TradeRow/properties/company"},"grade":{"$ref":"#/components/schemas/TradeRow/properties/grade"},"gradeLabel":{"$ref":"#/components/schemas/TradeRow/properties/gradeLabel"},"card":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/IndexTile/properties/game"},"name":{"$ref":"#/components/schemas/CardSummary/properties/name"},"grade":{"$ref":"#/components/schemas/SeriesPoint/properties/grade"},"gradeLabel":{"$ref":"#/components/schemas/CardSummary/properties/gradeLabel"},"setCode":{"$ref":"#/components/schemas/CardSummary/properties/setCode"},"cardNumber":{"$ref":"#/components/schemas/CardSummary/properties/cardNumber"},"href":{"$ref":"#/components/schemas/CardSummary/properties/href"},"imageUrl":{"$ref":"#/components/schemas/CardSummary/properties/imageUrl"}},"required":["game","name","grade","gradeLabel","setCode","cardNumber","href","imageUrl"],"additionalProperties":false}},"required":["source","bucket","displayName","observedAt","kind","priceUsdCents","priceMinor","currency","detail","sourceUrl","company","grade","gradeLabel","card"],"additionalProperties":false},"RecentTradesResponse":{"type":"object","properties":{"trades":{"type":"array","items":{"$ref":"#/components/schemas/RecentTrade"}}},"required":["trades"],"additionalProperties":false},"SeriesResponse":{"type":"object","properties":{"windowDays":{"type":"integer","exclusiveMinimum":true,"minimum":0},"points":{"type":"array","items":{"$ref":"#/components/schemas/SeriesPoint"}}},"required":["windowDays","points"],"additionalProperties":false},"FmvSourcePoint":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/SeriesPoint/properties/source"},"bucket":{"$ref":"#/components/schemas/SeriesPoint/properties/bucket"},"displayName":{"type":"string"},"usdCents":{"type":"integer","minimum":0},"n":{"type":"integer","minimum":0}},"required":["source","bucket","displayName","usdCents","n"],"additionalProperties":false},"FmvSeriesPoint":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"usdCents":{"type":"integer","minimum":0},"n":{"type":"integer","minimum":0},"bySource":{"type":"array","items":{"$ref":"#/components/schemas/FmvSourcePoint"}}},"required":["t","usdCents","n","bySource"],"additionalProperties":false},"FmvMethodLinePoint":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"usdCents":{"type":"integer","minimum":0}},"required":["t","usdCents"],"additionalProperties":false},"FmvMethodSeries":{"type":"object","properties":{"method":{"$ref":"#/components/schemas/FmvMethodValue/properties/method"},"scorerVersion":{"type":"string"},"label":{"type":"string"},"points":{"type":"array","items":{"$ref":"#/components/schemas/FmvMethodLinePoint"}}},"required":["method","scorerVersion","label","points"],"additionalProperties":false},"FmvSeriesResponse":{"type":"object","properties":{"windowDays":{"type":"integer","exclusiveMinimum":true,"minimum":0},"fmvWindowDays":{"type":"integer","exclusiveMinimum":true,"minimum":0},"gradeLabel":{"type":"string","nullable":true},"points":{"type":"array","items":{"$ref":"#/components/schemas/FmvSeriesPoint"}},"series":{"type":"array","items":{"$ref":"#/components/schemas/FmvMethodSeries"}}},"required":["windowDays","fmvWindowDays","gradeLabel","points","series"],"additionalProperties":false},"SearchResponse":{"type":"object","properties":{"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CardSummary"}}},"required":["query","results"],"additionalProperties":false},"SetResponse":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/IndexTile/properties/game"},"setName":{"type":"string","nullable":true},"setCode":{"type":"string","nullable":true},"setSegment":{"type":"string"},"href":{"type":"string"},"cardCount":{"type":"integer","minimum":0},"cards":{"type":"array","items":{"$ref":"#/components/schemas/CardSummary"}}},"required":["game","setName","setCode","setSegment","href","cardCount","cards"],"additionalProperties":false},"PartnerApplicationInput":{"type":"object","properties":{"shopName":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"salesFormat":{"type":"string","minLength":1,"maxLength":60},"contactEmail":{"type":"string","format":"email","maxLength":200}},"required":["shopName","region","salesFormat","contactEmail"],"additionalProperties":false},"DataIssueReportInput":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":2000},"category":{"type":"string","enum":["wrong_price","wrong_card","broken_link","stale","other"]},"sourceUrl":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri","maxLength":500}]},{"type":"string","enum":[""]}]},"cardHref":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":300}]},{"type":"string","enum":[""]}]},"contactEmail":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"email","maxLength":200}]},{"type":"string","enum":[""]}]}},"required":["message"],"additionalProperties":false},"SubmitResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"id":{"type":"string","format":"uuid"}},"required":["ok","id"],"additionalProperties":false},"HealthResponse":{"type":"object","required":["ok","db","rateLimit","internalAuth"],"properties":{"ok":{"type":"boolean","description":"Always true when the service is up."},"db":{"type":"boolean","description":"Whether a database connection (DATABASE_URL) is configured."},"rateLimit":{"type":"boolean","description":"Whether a rate-limit store (Upstash) is configured. When false, all rate limiting fails open."},"internalAuth":{"type":"boolean","description":"Whether the server-only internal token is configured (the non-spoofable trust signal)."}}}}}}