{"openapi":"3.1.0","info":{"title":"GatheRs API","version":"v0.8.0"},"paths":{"/api/mtg/cards/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":10,"minimum":0},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APICard"}}}}}}}},"/api/mtg/cards/random":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICard"}}}}}}},"/api/mtg/cards":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/APICard"}}}}}}}},"/api/mtg/sets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Set"}}}}}}}},"/api/mtg/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/mtg/prices":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CardPrices"}}}}}}}},"/api/mtg/prices/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/riftbound/cards/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":10,"minimum":0},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIRiftboundCard"}}}}}}}},"/api/riftbound/cards/random":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIRiftboundCard"}}}}}}},"/api/riftbound/cards":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/APIRiftboundCard"}}}}}}}},"/api/riftbound/sets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/api/riftbound/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/riftbound/prices":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CardPrices"}}}}}}}},"/api/riftbound/prices/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/pokemon/cards/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIPokemonCard"}}}}}}}},"/api/pokemon/cards/random":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIPokemonCard"}}}}}}},"/api/pokemon/cards":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/APIPokemonCard"}}}}}}}},"/api/pokemon/sets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Set"}}}}}}}},"/api/pokemon/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/pokemon/prices":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CardPrices"}}}}}}}},"/api/pokemon/prices/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/collection/list":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionListEntry"}}}}}}}},"/api/collection/add":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionAddResponse"}}}}}}},"/api/collection/remove/{id}":{"post":{"parameters":[{"in":"query","name":"keepCardsInCollection","description":"Move the collection's cards (and their purchase history) here instead\nof deleting them. Empty or omitted deletes them.","schema":{"description":"Move the collection's cards (and their purchase history) here instead\nof deleting them. Empty or omitted deletes them.","type":["string","null"],"default":null},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionRemoveResponse"}}}}}}},"/api/collection/rename/{id}":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionRenameRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}}}}},"/api/collection/move/{id}":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/api/collection/share/{id}":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShareLinkResponse"}}}}}}},"post":{"responses":{"200":{"description":"A shareable, read-only link granting public access to a collection via\nits opaque `token`. Owner-managed: created and revoked explicitly through\nthe `/collection/share/{id}` endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkResponse"}}}}}}},"/api/collection/share/{id}/{token}":{"delete":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkRevokeResponse"}}}}}}},"/api/collection/cards/{id}/list":{"get":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"provider","description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","schema":{"description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","type":["string","null"]},"style":"form"},{"in":"query","name":"providers","description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","schema":{"description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","type":["string","null"],"default":null},"style":"form"},{"in":"query","name":"sort_by","schema":{"anyOf":[{"$ref":"#/components/schemas/APICollectionSortField"},{"type":"null"}]},"style":"form"},{"in":"query","name":"sort_order","schema":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/api/collection/cards/{id}/count":{"get":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"provider","description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","schema":{"description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","type":["string","null"]},"style":"form"},{"in":"query","name":"providers","description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","schema":{"description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","type":["string","null"],"default":null},"style":"form"},{"in":"query","name":"sort_by","schema":{"anyOf":[{"$ref":"#/components/schemas/APICollectionSortField"},{"type":"null"}]},"style":"form"},{"in":"query","name":"sort_order","schema":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"integer","format":"uint","minimum":0}}}}}}},"/api/collection/cards/{id}/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"provider","description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","schema":{"description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","type":["string","null"]},"style":"form"},{"in":"query","name":"providers","description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","schema":{"description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","type":["string","null"],"default":null},"style":"form"},{"in":"query","name":"sort_by","schema":{"anyOf":[{"$ref":"#/components/schemas/APICollectionSortField"},{"type":"null"}]},"style":"form"},{"in":"query","name":"sort_order","schema":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/api/collection/cards/{id}/search/count":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"provider","description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","schema":{"description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","type":["string","null"]},"style":"form"},{"in":"query","name":"providers","description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","schema":{"description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","type":["string","null"],"default":null},"style":"form"},{"in":"query","name":"sort_by","schema":{"anyOf":[{"$ref":"#/components/schemas/APICollectionSortField"},{"type":"null"}]},"style":"form"},{"in":"query","name":"sort_order","schema":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"integer","format":"uint","minimum":0}}}}}}},"/api/collection/search":{"post":{"parameters":[{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"page_size","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResultCard"}}}}}}}},"/api/collection/cards/{id}/add":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardToAdd"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/api/collection/cards/{id}/delete":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardToAdd"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/api/collection/cards/{id}/want":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustWantQuantityRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCard"}}}}}}},"/api/collection/cards/{id}/purchase_history/{card_uuid}":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseHistoryResponse"}}}}}}},"/api/collection/cards/{id}/purchase_history":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionAllPurchaseHistoryResponse"}}}}}}},"/api/collection/cards/{id}/purchase_history_entry/{entry_id}":{"delete":{},"patch":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseEntryBody"}}},"required":true}}},"/api/collection/cards/{id}/value_breakdown":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionValueBreakdown"}}}}}}},"/api/collection/cards/{id}/value_history":{"get":{"parameters":[{"in":"query","name":"since","description":"Only days on or after this one (UTC, `YYYY-MM-DD`). Omitted means\nall recorded history.","schema":{"description":"Only days on or after this one (UTC, `YYYY-MM-DD`). Omitted means\nall recorded history.","type":["string","null"],"format":"date","default":null},"style":"form"}],"responses":{"200":{"description":"What the cards currently owned in a collection were worth on each day\nprice history has, at the prices they're valued at today (see\n`CollectionValueBreakdown`): each card's history is read from the\nretailer it's valued at now, so the last point lines up with the\ncollection's current total. Copies since sold or moved away are not\nincluded — this is the value over time of what's held now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionValueHistory"}}}}}}},"/api/collection/cards/{id}/value_cards":{"get":{"parameters":[{"in":"query","name":"days","description":"How many days back `past_price` looks. Default 30.","schema":{"description":"How many days back `past_price` looks. Default 30.","type":["integer","null"],"format":"uint32","default":null,"minimum":0},"style":"form"}],"responses":{"200":{"description":"Every owned, priced entry of a collection with what it's worth, what it\ncost and how its price moved — most valuable first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionValueCards"}}}}}}},"/api/collection/price_history/{provider}/{card_uuid}":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceHistoryResponse"}}}}}}},"/api/share/{token}":{"get":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"provider","description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","schema":{"description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","type":["string","null"]},"style":"form"},{"in":"query","name":"providers","description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","schema":{"description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","type":["string","null"],"default":null},"style":"form"},{"in":"query","name":"sort_by","schema":{"anyOf":[{"$ref":"#/components/schemas/APICollectionSortField"},{"type":"null"}]},"style":"form"},{"in":"query","name":"sort_order","schema":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]},"style":"form"}],"responses":{"200":{"description":"A page of full card data for a shareable, read-only collection view.\nEach entry in `cards` merges the collection entry (quantity, provider, ...)\nwith the full card details, so the client needs a single request per page\ninstead of a separate card-detail lookup.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCollectionPage"}}}}}}},"/api/settings":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerConfig"}}}}}},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerConfig"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerConfig"}}}}}}},"/api/settings/restart":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestartResponse"}}}}}}},"/api/settings/env_overrides":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnvOverride"}}}}}}}},"/api/plugins":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PluginSummary"}}}}}}}},"/api/plugins/{name}/search":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PluginCard"}}}}}}}},"/api/plugins/{name}/cards/by-ids":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PluginCard"}}}}}}}},"/api/plugins/{name}/update":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/system":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemInfo"}}}}}}}},"components":{"schemas":{"APICard":{"type":"object","properties":{"artist":{"type":"string"},"borderColor":{"type":"string"},"cardIdentifiers":{"$ref":"#/components/schemas/APICardIdentifiers"},"collectorNumber":{"type":"string"},"colorIdentity":{"type":"array","items":{"$ref":"#/components/schemas/APICardColour"}},"colors":{"type":"array","items":{"$ref":"#/components/schemas/APICardColour"}},"defense":{"type":["string","null"]},"finishes":{"type":"array","items":{"type":"string"}},"flavorText":{"type":["string","null"]},"frameEffects":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"isFullArt":{"type":"boolean"},"isPromo":{"type":"boolean"},"isReprint":{"type":"boolean"},"isReserved":{"type":"boolean"},"keywords":{"type":"array","items":{"type":"string"}},"legalities":{"type":"object","additionalProperties":{"type":"string"}},"loyalty":{"type":["string","null"]},"manaCost":{"type":"string"},"manaValue":{"type":"number","format":"double"},"name":{"type":"string"},"power":{"type":["string","null"]},"rarity":{"$ref":"#/components/schemas/APIRarity"},"setCode":{"type":"string"},"setName":{"type":"string"},"text":{"type":"string"},"toughness":{"type":["string","null"]},"typeLine":{"type":"string"},"watermark":{"type":["string","null"]}},"required":["id","name","setCode","collectorNumber","rarity","artist","colorIdentity","text","cardIdentifiers","manaCost","manaValue","typeLine","keywords","colors","legalities","finishes","isReserved","isPromo","isReprint","borderColor","frameEffects","isFullArt","setName"]},"APICardColour":{"type":"string","enum":["White","Blue","Black","Red","Green","Colourless","Multicoloured"]},"APICardDomain":{"type":"string","enum":["Calm","Chaos","Fury","Mind","Body","Order","Colorless"]},"APICardIdentifiers":{"type":"object","properties":{"id":{"type":"string"},"scryfallId":{"type":"string"}},"required":["id","scryfallId"]},"APICardSearchFilters":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","type":"object","properties":{"artist":{"type":["string","null"]},"border_color":{"type":["string","null"]},"collector_number":{"type":["string","null"]},"color_identities":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APICardColour"}},"colors":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APICardColour"}},"defense":{"type":["string","null"]},"domains":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APICardDomain"}},"energy_types":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APIEnergyType"}},"is_full_art":{"type":["boolean","null"]},"is_promo":{"type":["boolean","null"]},"is_reprint":{"type":["boolean","null"]},"is_reserved":{"type":["boolean","null"]},"keywords":{"type":["array","null"],"items":{"type":"string"}},"legal_in":{"type":["string","null"]},"loyalty":{"type":["string","null"]},"mana_value_max":{"type":["number","null"],"format":"double"},"mana_value_min":{"type":["number","null"],"format":"double"},"name":{"type":["string","null"]},"pokedex":{"type":["integer","null"],"format":"int64"},"power":{"type":["string","null"]},"rarity":{"anyOf":[{"$ref":"#/components/schemas/APIRarity"},{"type":"null"}],"default":null},"set_code":{"type":["string","null"]},"sort_by":{"anyOf":[{"$ref":"#/components/schemas/APISortField"},{"type":"null"}]},"sort_order":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]},"subtypes":{"type":["array","null"],"items":{"type":"string"}},"supertypes":{"type":["string","null"]},"text":{"type":["string","null"]},"toughness":{"type":["string","null"]},"types":{"type":["array","null"],"items":{"type":"string"}},"unique":{"description":"How to collapse results that share a card: one of the ids the system\nlists under `unique_modes` in `/api/system` (MTG: `prints`, `cards`,\n`art`). Omitted or empty means the system's default (`prints` for\nMTG). Systems that list no modes ignore it.","type":["string","null"]}}},"APICollectionSortField":{"oneOf":[{"type":"string","enum":["TimeAdded","WantQuantity","Provider"]},{"description":"Sorts by each row's own quantity — since a row is now one specific\nfinish of a card, this applies per finish, not to a single fixed\n\"normal\" bucket. There's no separate \"foil quantity\" sort field any\nmore; filter to `finish == \"foil\"` client-side for that view.","type":"string","const":"Quantity"}]},"APIEnergyType":{"type":"string","enum":["Fire","Water","Grass","Lightning","Psychic","Fighting","Darkness","Metal","Dragon","Fairy","Colorless","Energy"]},"APIPokemonCard":{"type":"object","properties":{"cardType":{"type":"string"},"collectorNumber":{"type":"string"},"description":{"type":["string","null"]},"energyTypes":{"type":"array","items":{"$ref":"#/components/schemas/APIEnergyType"}},"finishes":{"description":"The finishes/variants this card is printed in (e.g. `[\"Normal\", \"Reverse\nHolofoil\"]`), sourced from the scraper's `variants` data. Drives which\nfinishes the \"add another version\" picker offers.","type":"array","items":{"type":"string"}},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"pokedex":{"type":["integer","null"],"format":"int64"},"rarity":{"$ref":"#/components/schemas/APIPokemonRarity"},"releaseDate":{"type":["string","null"]},"setCode":{"type":"string"},"setShortCode":{"type":["string","null"]}},"required":["id","name","setCode","rarity","image","energyTypes","cardType","collectorNumber","finishes"]},"APIPokemonRarity":{"type":"string","enum":["Common","DoubleRare","Uncommon","Rare","RadiantRare","UltraRare","SecretRare","HoloRare","Promo","ClassicCollection","AmazingRare","ShinyHoloRare","PrismRare","RareBreak","RareAce","SpecialIllustrationRare","IllustrationRare","HyperRare","CodeCard","ShinyRare","ShinyUltraRare","AceSpecRare","BlackWhiteRare","MegaHyperRare","MegaAttackRare"]},"APIRarity":{"type":"string","enum":["Common","Uncommon","Rare","Mythic","Special","Bonus"]},"APIRiftboundCard":{"type":"object","properties":{"artists":{"type":"array","items":{"type":"string"}},"collectorNumber":{"type":"string"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/APICardDomain"}},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"rarity":{"$ref":"#/components/schemas/RBRarity"},"setCode":{"type":"string"},"text":{"type":"string"}},"required":["id","name","setCode","collectorNumber","rarity","artists","domains","text","image"]},"APISortField":{"oneOf":[{"type":"string","enum":["Name","Rarity","SetCode","CollectorNumber","Artist"]},{"description":"Pokemon-only: card release date.","type":"string","const":"ReleaseDate"},{"description":"Collections only: each entry's current unit price for its finish, at\nthe retailer it's valued at (see `CollectionValueBreakdown`). Prices\nin different currencies are compared as plain numbers; entries with no\nprice come last in either order. Card searches sort by name instead.","type":"string","const":"Price"},{"description":"Collections only: each entry's owned quantity. Card searches sort by\nname instead.","type":"string","const":"Quantity"},{"description":"Collections only: each entry's wanted quantity. Card searches sort by\nname instead.","type":"string","const":"WantQuantity"}]},"APISortOrder":{"type":"string","enum":["Asc","Desc"]},"APIUniqueMode":{"description":"One way a system can collapse search results that share a card; see\n`APICardSearchFilters::unique`.","type":"object","properties":{"description":{"description":"One-line explanation, for a tooltip.","type":"string"},"id":{"description":"Value to send as `unique`.","type":"string"},"label":{"description":"Short name for a toggle.","type":"string"}},"required":["id","label","description"]},"AdjustWantQuantityRequest":{"type":"object","properties":{"delta":{"type":"integer","format":"int32"},"id":{"type":"string"},"provider":{"description":"See `CardToAdd::provider`.","type":["string","null"],"default":null}},"required":["id","delta"]},"BulkPricesQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"CardIdentInner":{"type":"object","properties":{"scryfallId":{"type":"string"}},"required":["scryfallId"]},"CardPrices":{"type":"object","properties":{"paper":{"description":"Keyed by retailer name.","type":"object","additionalProperties":{"$ref":"#/components/schemas/RetailerPrices"}},"uuid":{"type":"string"}},"required":["uuid","paper"]},"CardToAdd":{"type":"object","properties":{"finish":{"description":"Which printing/finish this add/remove applies to — MTG's `\"\"`\n(nonfoil) / `\"foil\"` / `\"etched\"`, a Pokemon variant like `\"reverse\nholo\"`, or just `\"\"` for a game with a single version per collector\nnumber (Riftbound). Defaults to `\"\"` (the primary/default finish).","type":"string","default":""},"id":{"type":"string"},"provider":{"description":"Which system/plugin this card came from, e.g. `RiftboundSQLite` or\n`plugin-dummy-books`. Optional so older callers keep working: when\nomitted, the server falls back to probing every configured system\nand plugin for the id — which is only safe when ids are unique\nacross all of them. A client that knows the provider (the search UI\nalways does, via whichever tab is active) should always send it.","type":["string","null"],"default":null},"purchaseCurrency":{"description":"ISO 4217 code `purchasePrice` is in. Defaults to the server's\n`preferred_currency`.","type":["string","null"],"default":null},"purchasePrice":{"type":["number","null"],"format":"double","default":null},"quantity":{"type":"integer","format":"int32"}},"required":["id","quantity"]},"Collection":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CollectionAddResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"CollectionAllPurchaseHistoryResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/CollectionPurchaseHistoryEntry"}}},"required":["entries"]},"CollectionCard":{"type":"object","properties":{"collectionId":{"type":"string"},"finish":{"description":"Which printing/finish this row tracks — see `CardToAdd::finish`.\nDistinct finishes of the same card `id` are separate rows; a client\ngroups them back together by `id` to show \"one card, several\nfinishes\" (e.g. nonfoil + foil).","type":"string","default":""},"id":{"type":"string"},"provider":{"type":"string","default":""},"quantity":{"type":"integer","format":"int32"},"timeAdded":{"type":"string","format":"date-time","default":"1970-01-01T00:00:00Z"},"wantQuantity":{"type":"integer","format":"int32","default":0}},"required":["id","quantity","collectionId"]},"CollectionCardsQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":24,"minimum":0},"offset":{"type":"integer","format":"uint","default":0,"minimum":0},"provider":{"description":"Single provider inclusion filter (legacy, takes precedence over `providers`).","type":["string","null"]},"providers":{"description":"Multiple provider inclusion filter — comma-separated: `?providers=X,Y`.","type":["string","null"],"default":null},"sort_by":{"anyOf":[{"$ref":"#/components/schemas/APICollectionSortField"},{"type":"null"}]},"sort_order":{"anyOf":[{"$ref":"#/components/schemas/APISortOrder"},{"type":"null"}]}}},"CollectionListEntry":{"description":"An entry of `/api/collection/list`.","type":"object","properties":{"id":{"type":"string"},"removable":{"description":"False for the default collection, which can't be deleted (only\nemptied into another collection via `keepCardsInCollection`).","type":"boolean"}},"required":["id","removable"]},"CollectionPurchaseHistoryEntry":{"type":"object","properties":{"card_name":{"type":["string","null"]},"card_uuid":{"type":"string"},"currency":{"description":"ISO 4217 code `price_per_unit` is in.","type":"string"},"finish":{"type":"string"},"id":{"type":"integer","format":"int64"},"price_per_unit":{"type":["number","null"],"format":"double"},"provider":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"recorded_at":{"type":"string"},"set_code":{"type":["string","null"]}},"required":["id","card_uuid","finish","quantity","currency","provider","recorded_at"]},"CollectionRemoveQuery":{"type":"object","properties":{"keepCardsInCollection":{"description":"Move the collection's cards (and their purchase history) here instead\nof deleting them. Empty or omitted deletes them.","type":["string","null"],"default":null}}},"CollectionRemoveResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"CollectionRenameRequest":{"type":"object","properties":{"new_id":{"type":"string"}},"required":["new_id"]},"CollectionValueBreakdown":{"type":"object","properties":{"currencies":{"description":"Totals split by currency, largest total first. Every priced entry counts\ntoward exactly one currency (that of its preferred retailer).","type":"array","items":{"$ref":"#/components/schemas/CurrencyValue"}},"priced_count":{"type":"integer","format":"uint","minimum":0},"total_count":{"type":"integer","format":"uint","minimum":0}},"required":["currencies","priced_count","total_count"]},"CollectionValueCards":{"description":"Every owned, priced entry of a collection with what it's worth, what it\ncost and how its price moved — most valuable first.","type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/ValueCardEntry"}},"history_enabled":{"description":"Whether price history is kept; without it `first_price` and\n`past_price` are always missing.","type":"boolean"},"past_day":{"description":"The day `past_price` is as of (UTC).","type":"string","format":"date"},"unpriced_count":{"description":"Owned entries with no current price, so left out of `entries`.","type":"integer","format":"uint","minimum":0}},"required":["history_enabled","past_day","unpriced_count","entries"]},"CollectionValueHistory":{"description":"What the cards currently owned in a collection were worth on each day\nprice history has, at the prices they're valued at today (see\n`CollectionValueBreakdown`): each card's history is read from the\nretailer it's valued at now, so the last point lines up with the\ncollection's current total. Copies since sold or moved away are not\nincluded — this is the value over time of what's held now.","type":"object","properties":{"currencies":{"description":"One series per currency, largest latest value first. Every entry\ncounts toward exactly one currency, that of its retailer.","type":"array","items":{"$ref":"#/components/schemas/CurrencyValueHistory"}},"enabled":{"description":"Whether the server keeps price history at all. When it doesn't,\n`currencies` is always empty.","type":"boolean"},"total_count":{"description":"Owned entries (one per card and finish) in the collection, priced or not.","type":"integer","format":"uint","minimum":0}},"required":["enabled","total_count","currencies"]},"CollectionsSearchQuery":{"type":"object","properties":{"offset":{"type":"integer","format":"uint","default":0,"minimum":0},"page_size":{"type":"integer","format":"uint","default":24,"minimum":0}}},"CurrencyValue":{"type":"object","properties":{"currency":{"description":"ISO 4217 code, e.g. \"USD\", \"EUR\".","type":"string"},"priced_count":{"description":"Owned entries priced in this currency.","type":"integer","format":"uint","minimum":0},"profit":{"type":"number","format":"double"},"total_value":{"type":"number","format":"double"},"untracked_value":{"type":"number","format":"double"},"wanted_value":{"description":"Total price of cards on the wishlist (`want_quantity`), independent of\nwhat's owned. Not included in `total_value`.","type":"number","format":"double"}},"required":["currency","total_value","profit","untracked_value","wanted_value","priced_count"]},"CurrencyValueHistory":{"type":"object","properties":{"currency":{"description":"ISO 4217 code.","type":"string"},"entry_count":{"description":"Owned entries valued in this currency today.","type":"integer","format":"uint","minimum":0},"points":{"description":"Oldest first, one per day any of those entries has a recorded price.","type":"array","items":{"$ref":"#/components/schemas/ValueHistoryPoint"}}},"required":["currency","entry_count","points"]},"DatedPrice":{"type":"object","properties":{"day":{"description":"UTC day it was recorded.","type":"string","format":"date"},"price":{"type":"number","format":"double"}},"required":["day","price"]},"DownloadProgressInfo":{"type":"object","properties":{"downloaded":{"type":"integer","format":"uint64","minimum":0},"phase":{"type":"string"},"total":{"type":"integer","format":"uint64","minimum":0}},"required":["downloaded","total","phase"]},"EnvOverride":{"type":"object","properties":{"field":{"description":"The `server.toml` key being overridden, e.g. `mtg_db_path`.","type":"string"},"value":{"description":"The variable's value, which the server uses instead of the config file's.","type":"string"},"var":{"description":"The environment variable overriding it, e.g. `MTG_DB_PATH`.","type":"string"}},"required":["field","var","value"]},"MagicRetrieveQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"MagicSearchQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":10,"minimum":0},"skip":{"type":"integer","format":"uint","default":0,"minimum":0}}},"MoneyAmount":{"type":"object","properties":{"currency":{"description":"ISO 4217 code.","type":"string"},"value":{"type":"number","format":"double"}},"required":["currency","value"]},"PluginCard":{"description":"A card-shaped item returned by a plugin. Fields beyond `id`/`name` are\ndeliberately loose (empty string / `None` / empty map are all valid) so\na plugin author only has to fill in what makes sense for their domain.","type":"object","properties":{"collector_number":{"type":"string","default":""},"description":{"type":["string","null"],"default":null},"extra":{"description":"Freeform, domain-specific fields (e.g. \"author\" for a books plugin),\nopaque to gathers itself.","type":"object","additionalProperties":{"type":"string"},"default":{}},"id":{"type":"string"},"image_url":{"type":["string","null"],"default":null},"name":{"type":"string"},"set_code":{"type":"string","default":""},"set_name":{"type":"string","default":""}},"required":["id","name"]},"PluginConfig":{"description":"A third-party retrieval plugin — a separate HTTP service implementing\nthe gathers plugin contract (see `retrieval::systems::plugin`). Any\nnumber may be configured.","type":"object","properties":{"base_url":{"description":"Base URL the plugin's HTTP service is reachable at.","type":"string"},"enabled":{"type":"boolean","default":true},"name":{"description":"Unique name this plugin is addressed by, e.g. `/api/plugins/{name}/...`.","type":"string"}},"required":["name","base_url"]},"PluginSearchFilters":{"type":"object","properties":{"set_code":{"type":["string","null"],"default":null},"text":{"type":["string","null"],"default":null}}},"PluginSummary":{"type":"object","properties":{"base_url":{"type":"string"},"name":{"type":"string"}},"required":["name","base_url"]},"PokemonRetrieveQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"PokemonSearchQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":24,"minimum":0},"skip":{"type":"integer","format":"uint","default":0,"minimum":0}}},"PriceHistoryEntry":{"description":"One retailer's price for one finish of a card on a given day.","type":"object","properties":{"currency":{"description":"ISO 4217 code `price` is in.","type":"string"},"finish":{"description":"Same convention as `models::CollectionCard::finish`: `\"\"` is the\ndefault finish, anything else is game-specific.","type":"string"},"price":{"type":"number","format":"double"},"recorded_on":{"description":"UTC day the price is as of.","type":"string","format":"date"},"retailer":{"type":"string"}},"required":["retailer","finish","price","currency","recorded_on"]},"PriceHistoryResponse":{"type":"object","properties":{"enabled":{"description":"Whether the server keeps price history at all. When it doesn't,\n`entries` is always empty.","type":"boolean"},"entries":{"description":"Recorded prices, oldest first: one per retailer and finish per day.","type":"array","items":{"$ref":"#/components/schemas/PriceHistoryEntry"}}},"required":["enabled","entries"]},"PublicCollectionPage":{"description":"A page of full card data for a shareable, read-only collection view.\nEach entry in `cards` merges the collection entry (quantity, provider, ...)\nwith the full card details, so the client needs a single request per page\ninstead of a separate card-detail lookup.","type":"object","properties":{"cards":{"type":"array","items":true},"total":{"type":"integer","format":"uint","minimum":0}},"required":["cards","total"]},"PurchaseHistoryEntry":{"type":"object","properties":{"card_uuid":{"type":"string"},"currency":{"description":"ISO 4217 code `price_per_unit` is in.","type":"string"},"finish":{"type":"string"},"id":{"type":"integer","format":"int64"},"price_per_unit":{"type":["number","null"],"format":"double"},"provider":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"recorded_at":{"type":"string"}},"required":["id","card_uuid","finish","quantity","currency","provider","recorded_at"]},"PurchaseHistoryResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseHistoryEntry"}}},"required":["entries"]},"RBRarity":{"type":"string","enum":["Common","Uncommon","Rare","Epic","Showcase"]},"RestartResponse":{"type":"object","properties":{"restarting":{"description":"Always true: the server is shutting down to re-exec itself.","type":"boolean"}},"required":["restarting"]},"ResultCard":{"type":"object","properties":{"mtGCard":{"$ref":"#/components/schemas/ResultCardInner"}},"required":["mtGCard"]},"ResultCardInner":{"type":"object","properties":{"cardIdentifiers":{"$ref":"#/components/schemas/CardIdentInner"},"id":{"type":"string"},"name":{"type":"string"},"setCode":{"type":"string"}},"required":["id","name","setCode","cardIdentifiers"]},"RetailerPrices":{"type":"object","properties":{"currency":{"description":"ISO 4217 currency code of `normal`/`foil` (e.g. \"USD\", \"EUR\").","type":"string","default":"USD"},"date":{"description":"UTC day these prices are as of, when the source says — the newest of\n`normal`'s and `foil`'s.","type":["string","null"],"format":"date"},"foil":{"type":["number","null"],"format":"double"},"normal":{"type":["number","null"],"format":"double"}}},"RiftboundRetrieveQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"RiftboundSearchQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":10,"minimum":0},"skip":{"type":"integer","format":"uint","default":0,"minimum":0}}},"SearchRequest":{"type":"object","properties":{"filters":{"allOf":[{"$ref":"#/components/schemas/PluginSearchFilters"}],"default":{"set_code":null,"text":null}},"limit":{"type":["integer","null"],"format":"uint","default":null,"minimum":0},"skip":{"type":["integer","null"],"format":"uint","default":null,"minimum":0}}},"ServerConfig":{"type":"object","properties":{"auto_download_enabled":{"description":"Periodically re-download card and price databases for all active systems.","type":"boolean","default":false},"auto_download_interval_hours":{"description":"How often to run the auto-download, in hours. Takes effect on server restart.","type":"integer","format":"uint64","default":24,"minimum":0},"collections_enabled":{"type":"boolean","default":true},"cors_allowed_origins":{"description":"Browser origins (e.g. `https://cards.example.com`) allowed to call\nthis API from another origin. Empty by default: the bundled web UI\nis served from the same origin (behind its proxy), and allowing any\norigin would let every website a user visits read — and, as there's\nno authentication, change — their collections. Also settable as a\ncomma-separated list in `GATHERS_CORS_ORIGINS`.","type":"array","items":{"type":"string"}},"mtg_db_path":{"type":["string","null"]},"mtg_prices_path":{"type":["string","null"]},"plugins":{"type":"array","default":[],"items":{"$ref":"#/components/schemas/PluginConfig"}},"pokemon_db_path":{"type":["string","null"]},"pokemon_prices_path":{"type":["string","null"]},"port":{"type":"integer","format":"uint","minimum":0},"preferred_currency":{"description":"ISO 4217 code (e.g. \"EUR\", \"USD\"). When a card is listed by retailers\nin several currencies, prices in this one are used first — for shown\nprices and collection totals alike.","type":"string","default":"EUR"},"price_history_db_path":{"description":"Defaults to `storage.prices.db` next to the storage database.","type":["string","null"]},"price_history_enabled":{"description":"Record the daily prices of cards in collections, in a separate\ndatabase (`price_history_db_path`). Recorded whenever a price\ndatabase is updated, when cards are added, and on startup while\nnothing has been recorded yet. Takes effect on server restart.","type":"boolean","default":false},"pricing_enabled":{"type":"boolean","default":true},"riftbound_db_path":{"type":["string","null"]},"riftbound_prices_path":{"type":["string","null"]},"storage_db_path":{"type":["string","null"]},"system":{"type":"array","items":{"$ref":"#/components/schemas/Systems"}}},"required":["system","port"]},"Set":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["name","code"]},"ShareLinkResponse":{"description":"A shareable, read-only link granting public access to a collection via\nits opaque `token`. Owner-managed: created and revoked explicitly through\nthe `/collection/share/{id}` endpoints.","type":"object","properties":{"collectionId":{"type":"string"},"createdAt":{"type":"string"},"token":{"type":"string"}},"required":["token","collectionId","createdAt"]},"ShareLinkRevokeResponse":{"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"]},"SystemInfo":{"type":"object","properties":{"collections_enabled":{"description":"Whether collection management is enabled.","type":"boolean"},"demo_mode":{"description":"Whether the server is running in demo mode (settings endpoints disabled).","type":"boolean"},"downloading":{"description":"Systems whose databases are currently being downloaded, with progress info.","type":"object","additionalProperties":{"$ref":"#/components/schemas/DownloadProgressInfo"}},"plugins":{"description":"Names of configured third-party plugins (see `PluginConfig`). Kept\nseparate from `systems` — a plugin isn't a `provider` collections can\nstore cards under, and doesn't support the same search filters.","type":"array","items":{"type":"string"}},"preferred_currency":{"description":"ISO 4217 code of the currency card prices are taken in when a card is\nlisted in several (see `ServerConfig::preferred_currency`).","type":"string"},"price_history_enabled":{"description":"Whether daily prices of collection cards are being recorded (see\n`ServerConfig::price_history_enabled`). False when enabled but its\ndatabase couldn't be opened.","type":"boolean"},"pricing_enabled":{"description":"Whether pricing support is enabled (market prices, purchase history, etc.).","type":"boolean"},"restart_required":{"description":"Whether settings were saved that only take effect after a server\nrestart. Stays set until the server restarts.","type":"boolean"},"system":{"description":"Primary active system, identified by NamedRetrievalSystem::name().","type":"string"},"systems":{"description":"All active systems, identified by NamedRetrievalSystem::name().\nThese strings also match the `provider` field stored on collection cards.","type":"array","items":{"type":"string"}},"unique_modes":{"description":"The ways each system can collapse search results that share a card\n(see `APICardSearchFilters::unique`), keyed by system name; the first\nis the default. Systems with no modes are left out — they have\nnothing to toggle.","type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/APIUniqueMode"}}},"version":{"description":"Server version: the git tag it was built from (e.g. `v0.6.4`, or\n`v0.6.4-18-ga2de264` for a build past a tag).","type":"string"}},"required":["system","systems","plugins","unique_modes","downloading","demo_mode","pricing_enabled","collections_enabled","price_history_enabled","preferred_currency","restart_required","version"]},"Systems":{"type":"string","enum":["Scryfall","Sql","RiftboundSql","PokemonSql"]},"UpdatePurchaseEntryBody":{"type":"object","properties":{"currency":{"description":"ISO 4217 code; left unchanged when omitted.","type":["string","null"],"default":null},"price_per_unit":{"type":["number","null"],"format":"double"},"quantity":{"type":"integer","format":"int32"}},"required":["quantity"]},"ValueCardEntry":{"type":"object","properties":{"card_uuid":{"type":"string"},"cost":{"description":"What those `cost_quantity` copies cost, per currency they were bought in.","type":"array","items":{"$ref":"#/components/schemas/MoneyAmount"}},"cost_quantity":{"description":"Owned copies that have a recorded purchase price.","type":"integer","format":"int32"},"currency":{"description":"ISO 4217 code of every price on this entry.","type":"string"},"finish":{"type":"string"},"first_price":{"description":"Earliest recorded unit price.","anyOf":[{"$ref":"#/components/schemas/DatedPrice"},{"type":"null"}]},"image":{"description":"Direct image URL (Riftbound, Pokémon, plugins).","type":["string","null"]},"name":{"description":"`None` when the card's details couldn't be looked up.","type":["string","null"]},"past_price":{"description":"Unit price as of `CollectionValueCards::past_day` (the latest\nrecording on or before it). Missing when history starts later.","anyOf":[{"$ref":"#/components/schemas/DatedPrice"},{"type":"null"}]},"profit":{"description":"Current value of the `cost_quantity` copies minus `cost` — only when\neverything was bought in `currency`; otherwise convert `cost` and\nsubtract it from `unit_price` × `cost_quantity`.","type":["number","null"],"format":"double"},"provider":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"scryfall_id":{"description":"MTG cards' image comes from Scryfall.","type":["string","null"]},"set_code":{"type":["string","null"]},"total_value":{"description":"`unit_price` × `quantity`.","type":"number","format":"double"},"unit_price":{"type":"number","format":"double"}},"required":["card_uuid","provider","finish","quantity","currency","unit_price","total_value","cost_quantity","cost"]},"ValueCardsQuery":{"type":"object","properties":{"days":{"description":"How many days back `past_price` looks. Default 30.","type":["integer","null"],"format":"uint32","default":null,"minimum":0}}},"ValueHistoryPoint":{"type":"object","properties":{"day":{"description":"UTC day.","type":"string","format":"date"},"priced_count":{"description":"Entries that contributed to `value`, out of `entry_count`.","type":"integer","format":"uint","minimum":0},"value":{"description":"Sum of quantity × unit price over the entries priced that day. A\nprice carries forward to days with no new recording; an entry whose\ncard has no price recorded yet contributes nothing.","type":"number","format":"double"}},"required":["day","value","priced_count"]},"ValueHistoryQuery":{"type":"object","properties":{"since":{"description":"Only days on or after this one (UTC, `YYYY-MM-DD`). Omitted means\nall recorded history.","type":["string","null"],"format":"date","default":null}}}}}}