{"openapi":"3.1.0","info":{"title":"TCGNexus API","version":"1.0.0","description":"Sets, cards and prices, and for a member their own collection and wishlist. Every request needs a token, sent as \"Authorization: Bearer ...\": made in the account settings on the website, or received from signing in, the only requests that need none. Lists come as {\"data\": [...], \"links\": {...}, \"meta\": {...}} and take \"page\" and \"per_page\". Errors come as {\"message\": \"...\", \"code\": \"...\"}, with \"errors\" per field when what was sent did not pass validation. Names are in the language asked for with \"lang\" or the Accept-Language header."},"servers":[{"url":"https://api.tcgnexus.net/v1"}],"security":[{"token":[]}],"tags":[{"name":"Catalogue","description":"Games, series, sets and cards."},{"name":"Prices","description":"What a card costs on each marketplace, now and day by day."},{"name":"Lists","description":"The short lists the catalogue is described with."},{"name":"Sign-in","description":"Exchanging a member's sign-in for a token, from an app."},{"name":"Profile","description":"The member a token belongs to."},{"name":"Collection","description":"The member's folders and the cards they own."},{"name":"Wishlist","description":"The cards the member would like to have."}],"paths":{"/":{"get":{"tags":["Lists"],"summary":"Where to start","description":"The name and version of the API and where it is described.","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/openapi.json":{"get":{"tags":["Lists"],"summary":"This description","description":"The description of the API in the OpenAPI format.","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/games":{"get":{"tags":["Lists"],"summary":"List the games","description":"The games that are switched on.","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/rarities":{"get":{"tags":["Lists"],"summary":"List the rarities","description":"In order, the most common first.","parameters":[{"name":"game","in":"query","description":"Only the rarities of this game, by its slug.","schema":{"type":"string"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/types":{"get":{"tags":["Lists"],"summary":"List the energy types","description":"The types a card can have.","parameters":[{"name":"game","in":"query","description":"Only the types of this game, by its slug.","schema":{"type":"string"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/variants":{"get":{"tags":["Lists"],"summary":"List the printings","description":"The ways a card can be printed. A card names the ones it comes in under \"variants\".","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/conditions":{"get":{"tags":["Lists"],"summary":"List the conditions","description":"The conditions a copy can be in, the best first.","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/languages":{"get":{"tags":["Lists"],"summary":"List the card languages","description":"The languages a copy in a collection can be marked with.","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Language"}}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/symbols":{"get":{"tags":["Lists"],"summary":"List the symbols of Magic","description":"The symbols Magic's mana costs and rules texts are written with ({W}, {2/U}, {T}), with their pictures. Empty while the API does not serve Magic.","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MagicSymbol"}}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/series":{"get":{"tags":["Catalogue"],"summary":"List the series","description":"The series the website shows.","parameters":[{"name":"game","in":"query","description":"Only the series of this game, by its slug.","schema":{"type":"string"}},{"name":"sort","in":"query","description":"The order of the list.","schema":{"type":"string","enum":["released-desc","released-asc"],"default":"released-desc"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Series"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/series/{series}":{"get":{"tags":["Catalogue"],"summary":"Get a series","description":"One series, by its slug.","parameters":[{"name":"series","in":"path","required":true,"description":"The slug of the series.","schema":{"type":"string"},"example":"swsh"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Series"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/sets":{"get":{"tags":["Catalogue"],"summary":"List the sets","description":"The sets the website shows.","parameters":[{"name":"series","in":"query","description":"Only the sets of this series, by its slug.","schema":{"type":"string"}},{"name":"game","in":"query","description":"Only the sets of this game, by its slug.","schema":{"type":"string"},"example":"pokemon"},{"name":"search","in":"query","description":"Part of the name of the set, or the start of its code.","schema":{"type":"string"}},{"name":"sort","in":"query","description":"The order of the list.","schema":{"type":"string","enum":["released-desc","released-asc"],"default":"released-desc"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Set"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/sets/{set}":{"get":{"tags":["Catalogue"],"summary":"Get a set","description":"One set, by its slug. A slug the set had before answers with a redirect to the one it has now.","parameters":[{"name":"set","in":"path","required":true,"description":"The slug of the set.","schema":{"type":"string"},"example":"swsh3-darkness-ablaze"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Set"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/cards":{"get":{"tags":["Catalogue"],"summary":"List the cards","description":"The cards, with the search, filters and orders of the card listing on the website.","parameters":[{"name":"search","in":"query","description":"What to look for: part of a name, a number (\"147\"), a number in a set (\"147/189\" or \"swsh3-147\"), a set, an illustrator or a rarity. Every word has to match.","schema":{"type":"string"},"example":"Butterfree"},{"name":"game","in":"query","description":"Only cards of this game, by its slug.","schema":{"type":"string"}},{"name":"set","in":"query","description":"Only cards of this set, by its slug.","schema":{"type":"string"}},{"name":"series","in":"query","description":"Only cards of this series, by its slug.","schema":{"type":"string"}},{"name":"rarity","in":"query","description":"Only cards of this rarity, by its slug.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Only cards of this energy type, by its slug.","schema":{"type":"string"}},{"name":"category","in":"query","description":"Only cards of this category, by its slug.","schema":{"type":"string"}},{"name":"stage","in":"query","description":"Only cards of this stage, by its slug.","schema":{"type":"string"}},{"name":"illustrator","in":"query","description":"Only cards by this illustrator, by their slug.","schema":{"type":"string"}},{"name":"hp_min","in":"query","description":"Pokémon: only cards with at least this much HP.","schema":{"type":"integer"}},{"name":"hp_max","in":"query","description":"Pokémon: only cards with at most this much HP.","schema":{"type":"integer"}},{"name":"mana_min","in":"query","description":"Magic: only cards with at least this mana value.","schema":{"type":"number"}},{"name":"mana_max","in":"query","description":"Magic: only cards with at most this mana value.","schema":{"type":"number"}},{"name":"price_min","in":"query","description":"Only cards priced at least this much. Prices are compared in the currency of the member the token belongs to, else in the currency of the site.","schema":{"type":"number"}},{"name":"price_max","in":"query","description":"Only cards priced at most this much.","schema":{"type":"number"}},{"name":"legal","in":"query","description":"Only cards legal in this format: for Pokémon standard or expanded; with game=magic, one of Magic's formats as cards name them under \"legalities\" (standard, modern, commander...).","schema":{"type":"string"}},{"name":"variant","in":"query","description":"Only this printing.","schema":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]}},{"name":"owned","in":"query","description":"With a token: only the cards the member owns (\"yes\"), or only the ones they do not (\"no\").","schema":{"type":"string","enum":["yes","no"]}},{"name":"sort","in":"query","description":"The order of the list.","schema":{"type":"string","enum":["released-desc","released-asc","number-asc","number-desc","name-asc","name-desc","rarity-asc","rarity-desc","price-desc","price-asc"],"default":"released-desc"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Card"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/cards/{card}":{"get":{"tags":["Catalogue"],"summary":"Get a card","description":"One card with its texts and everything its game has: a Pokémon's attacks, abilities, weaknesses and resistances; a Magic card's faces, related cards, rulings and print details. \"game\" says which. A slug the card had before answers with a redirect to the one it has now.","parameters":[{"name":"card","in":"path","required":true,"description":"The slug of the card.","schema":{"type":"string"},"example":"butterfree-v-1-swsh3"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CardDetails"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/cards/{card}/prices":{"get":{"tags":["Prices"],"summary":"Get the prices of a card","description":"What the card costs right now on each marketplace, per printing, condition and card language.","parameters":[{"name":"card","in":"path","required":true,"description":"The slug of the card.","schema":{"type":"string"},"example":"butterfree-v-1-swsh3"},{"name":"currency","in":"query","description":"Only prices in this currency.","schema":{"type":"string","enum":["EUR","USD"]},"example":"EUR"},{"name":"marketplace","in":"query","description":"Only this marketplace, by its slug.","schema":{"type":"string"}},{"name":"variant","in":"query","description":"Only this printing.","schema":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]}}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/cards/{card}/prices/history":{"get":{"tags":["Prices"],"summary":"Get the price history of a card","description":"What the card cost day by day. How far back it goes is up to the plan of the member asking; \"meta.reach\" says how many days that is (null: all the way).","parameters":[{"name":"card","in":"path","required":true,"description":"The slug of the card.","schema":{"type":"string"},"example":"butterfree-v-1-swsh3"},{"name":"days","in":"query","description":"How many days back.","schema":{"type":"integer","minimum":1,"default":90},"example":30},{"name":"currency","in":"query","description":"Only prices in this currency.","schema":{"type":"string","enum":["EUR","USD"]},"example":"EUR"},{"name":"marketplace","in":"query","description":"Only this marketplace, by its slug.","schema":{"type":"string"}},{"name":"variant","in":"query","description":"Only this printing.","schema":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]}}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PricePoint"}},"meta":{"type":"object","properties":{"days":{"type":"integer"},"reach":{"type":["integer","null"]}}}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/auth/token":{"post":{"tags":["Sign-in"],"summary":"Sign in","description":"Exchange a member's e-mail address and password for a token. A member with two-step verification also sends \"code\" (from their authenticator app) or \"recovery_code\".","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}},"responses":{"201":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Session"}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[]},"delete":{"tags":["Sign-in"],"summary":"Sign out","description":"The token the request was made with stops working.","responses":{"204":{"description":"Done. There is nothing to answer with."},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/auth/google":{"post":{"tags":["Sign-in"],"summary":"Sign in with Google","description":"Exchange a Google ID token for a token. The ID token has to be issued for the Google client of this site (\"serverClientId\" in the Google sign-in of the app). A member with two-step verification also sends \"code\" (from their authenticator app) or \"recovery_code\".","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCredentials"}}}},"responses":{"201":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Session"}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[]}},"/me":{"get":{"tags":["Profile"],"summary":"Get the profile","description":"The member the token belongs to, their plan and what it allows.","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Profile"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"put":{"tags":["Profile"],"summary":"Change the profile","description":"Replace the name, username and bio.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileInput"}}}},"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Profile"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/collection/folders":{"get":{"tags":["Collection"],"summary":"List the folders","description":"Every folder, in tree order: a folder is followed by the folders inside it.","responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"post":{"tags":["Collection"],"summary":"Make a folder","description":"Folders nest three levels deep at most. How many there can be is up to the plan.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderInput"}}}},"responses":{"201":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Folder"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/collection/folders/{folder}":{"put":{"tags":["Collection"],"summary":"Change a folder","description":"Rename it, or put it inside another folder.","parameters":[{"name":"folder","in":"path","required":true,"description":"The id of the folder.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderInput"}}}},"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Folder"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"delete":{"tags":["Collection"],"summary":"Remove a folder","description":"Removes the folder and the folders inside it. Their cards stay in the collection, outside any folder.","parameters":[{"name":"folder","in":"path","required":true,"description":"The id of the folder.","schema":{"type":"integer"},"example":12}],"responses":{"204":{"description":"Done. There is nothing to answer with."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/collection/items":{"get":{"tags":["Collection"],"summary":"List the collection","description":"What the member owns. One entry is the copies of a card that are alike: the same printing, condition and language, in the same folder.","parameters":[{"name":"folder","in":"query","description":"Only what is in this folder (by its id) and in the folders inside it, or \"none\" for what is in no folder.","schema":{"type":"string"}},{"name":"search","in":"query","description":"What to look for, as for the cards.","schema":{"type":"string"}},{"name":"set","in":"query","description":"Only cards of this set, by its slug.","schema":{"type":"string"}},{"name":"variant","in":"query","description":"Only this printing.","schema":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]}},{"name":"condition","in":"query","description":"Only copies in this condition, by its slug.","schema":{"type":"string"}},{"name":"sort","in":"query","description":"The order of the list.","schema":{"type":"string","enum":["added-desc","added-asc","name-asc","name-desc","quantity-desc","quantity-asc"],"default":"added-desc"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionItem"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"post":{"tags":["Collection"],"summary":"Add a card","description":"Add copies of a card to the collection.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCollectionItem"}}}},"responses":{"201":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CollectionItem"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/collection/items/{item}":{"get":{"tags":["Collection"],"summary":"Get an entry","description":"One entry of the collection.","parameters":[{"name":"item","in":"path","required":true,"description":"The id of the entry.","schema":{"type":"integer"},"example":345}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CollectionItem"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"put":{"tags":["Collection"],"summary":"Change an entry","description":"Replace what is known about the copies. A field left out is emptied.","parameters":[{"name":"item","in":"path","required":true,"description":"The id of the entry.","schema":{"type":"integer"},"example":345}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionItemInput"}}}},"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CollectionItem"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"delete":{"tags":["Collection"],"summary":"Remove an entry","description":"Take the copies out of the collection.","parameters":[{"name":"item","in":"path","required":true,"description":"The id of the entry.","schema":{"type":"integer"},"example":345}],"responses":{"204":{"description":"Done. There is nothing to answer with."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/wishlist":{"get":{"tags":["Wishlist"],"summary":"List the wishlist","description":"The cards on the list, the one added last first.","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"It worked.","content":{"application/json":{"schema":{"type":"object","required":["data","links","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Card"}},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}},"/wishlist/{card}":{"put":{"tags":["Wishlist"],"summary":"Add a card","description":"Put a card on the list. Doing it again changes nothing.","parameters":[{"name":"card","in":"path","required":true,"description":"The slug of the card.","schema":{"type":"string"},"example":"butterfree-v-1-swsh3"}],"responses":{"204":{"description":"Done. There is nothing to answer with."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]},"delete":{"tags":["Wishlist"],"summary":"Remove a card","description":"Take a card off the list.","parameters":[{"name":"card","in":"path","required":true,"description":"The slug of the card.","schema":{"type":"string"},"example":"butterfree-v-1-swsh3"}],"responses":{"204":{"description":"Done. There is nothing to answer with."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"token":[]}]}}},"components":{"securitySchemes":{"token":{"type":"http","scheme":"bearer","description":"A token made in the account settings, or received from \"Sign in\"."}},"parameters":{"page":{"name":"page","in":"query","description":"Which page of the list.","schema":{"type":"integer","minimum":1,"default":1}},"per_page":{"name":"per_page","in":"query","description":"How many entries a page holds.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}},"responses":{"Unauthenticated":{"description":"No token was sent, or the one sent is not good (any more).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The member may not do this: their account is suspended, their e-mail address is not confirmed, or their plan does not include it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"There is nothing at this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationFailed":{"description":"What was sent did not pass validation. \"errors\" says what is wrong, per field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"TooManyRequests":{"description":"The limit was reached: the requests the member's plan allows a day (all their tokens together; the count starts again at midnight UTC), or, for signing in, too many tries from one address. The Retry-After header says how many seconds to wait; X-RateLimit-Limit and X-RateLimit-Remaining (left today) come with every answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string"},"code":{"type":"string"}}},"ValidationError":{"type":"object","required":["message","code","errors"],"properties":{"message":{"type":"string"},"code":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"PageLinks":{"type":"object","properties":{"first":{"type":["string","null"],"format":"uri"},"last":{"type":["string","null"],"format":"uri"},"prev":{"type":["string","null"],"format":"uri"},"next":{"type":["string","null"],"format":"uri"}}},"PageMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":["integer","null"]},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":["integer","null"]},"total":{"type":"integer"}}},"Named":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"Lookup":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":["string","null"],"format":"uri"}}},"Language":{"type":"object","required":["code","name"],"properties":{"code":{"type":"string"},"name":{"type":"string"}}},"Series":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"game":{"type":"string"},"released_on":{"type":["string","null"],"format":"date"},"is_coming_soon":{"type":"boolean"},"sets_count":{"type":"integer"},"logo":{"type":["string","null"],"format":"uri"}}},"Set":{"oneOf":[{"$ref":"#/components/schemas/PokemonSet"}],"discriminator":{"propertyName":"game","mapping":{"pokemon":"#/components/schemas/PokemonSet"}}},"Card":{"oneOf":[{"$ref":"#/components/schemas/PokemonCard"}],"discriminator":{"propertyName":"game","mapping":{"pokemon":"#/components/schemas/PokemonCard"}}},"CardDetails":{"oneOf":[{"$ref":"#/components/schemas/PokemonCardDetails"}],"discriminator":{"propertyName":"game","mapping":{"pokemon":"#/components/schemas/PokemonCardDetails"}}},"PokemonCard":{"title":"A card (Pokémon)","type":"object","required":["slug","name","number","game","set"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"number":{"type":"string"},"game":{"type":"string","description":"The slug of its game, which decides the fields that follow these."},"set":{"type":"object","properties":{"slug":{"type":"string"},"code":{"type":["string","null"]},"name":{"type":"string"}}},"category":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}],"description":"For Magic, the card type."},"rarity":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"types":{"type":"array","items":{"$ref":"#/components/schemas/Named"},"description":"For Pokémon the energy types; for Magic the colours."},"illustrator":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]}},"prices":{"type":"object","description":"What lists show as the price of the card, per currency.","additionalProperties":{"type":["number","null"]}},"images":{"type":"object","properties":{"small":{"type":["string","null"],"format":"uri"},"large":{"type":["string","null"],"format":"uri"}}},"url":{"type":"string","format":"uri","description":"The page of the card on the website."},"stage":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"trainer_type":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"hp":{"type":["integer","null"]},"legal":{"type":"object","properties":{"standard":{"type":"boolean"},"expanded":{"type":"boolean"}},"description":"Whether it may be played in the Standard and Expanded formats."}}},"PokemonCardDetails":{"title":"A card (Pokémon)","type":"object","required":["slug","name","number","game","set"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"number":{"type":"string"},"game":{"type":"string","description":"The slug of its game, which decides the fields that follow these."},"set":{"type":"object","properties":{"slug":{"type":"string"},"code":{"type":["string","null"]},"name":{"type":"string"}}},"category":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}],"description":"For Magic, the card type."},"rarity":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"types":{"type":"array","items":{"$ref":"#/components/schemas/Named"},"description":"For Pokémon the energy types; for Magic the colours."},"illustrator":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]}},"prices":{"type":"object","description":"What lists show as the price of the card, per currency.","additionalProperties":{"type":["number","null"]}},"images":{"type":"object","properties":{"small":{"type":["string","null"],"format":"uri"},"large":{"type":["string","null"],"format":"uri"}}},"url":{"type":"string","format":"uri","description":"The page of the card on the website."},"series":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"description":{"type":["string","null"],"description":"For Pokémon the Pokédex entry; for Magic the flavour text."},"effect":{"type":["string","null"],"description":"The rules text of the card."},"stage":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"trainer_type":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"hp":{"type":["integer","null"]},"legal":{"type":"object","properties":{"standard":{"type":"boolean"},"expanded":{"type":"boolean"}},"description":"Whether it may be played in the Standard and Expanded formats."},"suffix":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"energy_card_kind":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"evolves_from":{"type":["string","null"]},"regulation_mark":{"type":["string","null"]},"dex_ids":{"type":"array","items":{"type":"integer"},"description":"The National Pokédex numbers of the Pokémon on the card."},"retreat_cost":{"type":["integer","null"]},"attacks":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"effect":{"type":["string","null"]},"damage":{"type":["string","null"]},"cost":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"],"description":"The slug of an energy type."},"amount":{"type":"integer"}}}}}}},"abilities":{"type":"array","items":{"type":"object","properties":{"kind":{"type":["string","null"]},"name":{"type":["string","null"]},"effect":{"type":["string","null"]}}}},"weaknesses":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"],"description":"The slug of an energy type."},"value":{"type":["string","null"]}}}},"resistances":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"],"description":"The slug of an energy type."},"value":{"type":["string","null"]}}}}}},"PokemonSet":{"title":"A set (Pokémon)","type":"object","required":["slug","name","game"],"properties":{"slug":{"type":"string"},"code":{"type":["string","null"]},"name":{"type":"string"},"game":{"type":"string","description":"The slug of its game, which decides the fields that follow these."},"series":{"$ref":"#/components/schemas/Named"},"released_on":{"type":["string","null"],"format":"date"},"is_coming_soon":{"type":"boolean"},"card_count":{"type":"object","properties":{"official":{"type":["integer","null"]},"total":{"type":["integer","null"]}}},"logo":{"type":["string","null"],"format":"uri"},"symbol":{"type":["string","null"],"format":"uri"},"url":{"type":"string","format":"uri","description":"The page of the set on the website."},"legal":{"type":"object","properties":{"standard":{"type":"boolean"},"expanded":{"type":"boolean"}},"description":"Whether it may be played in the Standard and Expanded formats."}}},"MagicSymbol":{"type":"object","required":["symbol"],"properties":{"symbol":{"type":"string","description":"As card texts write it: {W}, {2/U}, {T}."},"english":{"type":["string","null"]},"svg":{"type":["string","null"],"format":"uri"},"represents_mana":{"type":"boolean"},"appears_in_mana_costs":{"type":"boolean"},"mana_value":{"type":["number","null"]},"colors":{"type":"array","items":{"type":"string"}},"hybrid":{"type":"boolean"},"phyrexian":{"type":"boolean"},"funny":{"type":"boolean","description":"Only on joke (Un-) cards."}}},"Price":{"type":"object","properties":{"marketplace":{"$ref":"#/components/schemas/Named"},"variant":{"type":["string","null"]},"condition":{"type":["string","null"]},"language":{"type":["string","null"]},"currency":{"type":"string","enum":["EUR","USD"]},"low":{"type":["number","null"]},"average":{"type":["number","null"]},"trend":{"type":["number","null"]},"high":{"type":["number","null"]},"priced_at":{"type":["string","null"],"format":"date-time"}}},"PricePoint":{"type":"object","properties":{"date":{"type":"string","format":"date"},"marketplace":{"type":"string"},"variant":{"type":["string","null"]},"condition":{"type":["string","null"]},"language":{"type":["string","null"]},"currency":{"type":"string","enum":["EUR","USD"]},"price":{"type":"number"}}},"Credentials":{"example":{"email":"you@example.com","password":"your-password","device_name":"My card app"},"type":"object","required":["email","password","device_name"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"},"device_name":{"type":"string","description":"What the token is called in the account settings of the member."},"code":{"type":"string"},"recovery_code":{"type":"string"}}},"GoogleCredentials":{"example":{"id_token":"eyJhbGciOiJSUzI1NiIs...","device_name":"My card app"},"type":"object","required":["id_token","device_name"],"properties":{"id_token":{"type":"string"},"device_name":{"type":"string"},"code":{"type":"string"},"recovery_code":{"type":"string"}}},"Session":{"type":"object","required":["token","token_type","user"],"properties":{"token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"user":{"$ref":"#/components/schemas/Profile"}}},"Profile":{"type":"object","properties":{"username":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"email_verified":{"type":"boolean"},"bio":{"type":["string","null"]},"avatar":{"type":["string","null"],"format":"uri"},"plan":{"oneOf":[{"$ref":"#/components/schemas/Named"},{"type":"null"}]},"limits":{"type":"object","description":"What the plan allows; null means no limit. \"api_requests_per_day\" counts all the member's tokens together, from midnight UTC.","additionalProperties":{"type":["integer","null"]}},"joined_at":{"type":["string","null"],"format":"date-time"}}},"ProfileInput":{"example":{"name":"Ash Ketchum","username":"ash","bio":"Collecting since Base Set."},"type":"object","required":["name","username"],"properties":{"name":{"type":"string","maxLength":255},"username":{"type":"string","pattern":"^[a-z0-9_]{3,30}$"},"bio":{"type":["string","null"],"maxLength":280}}},"Folder":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"depth":{"type":"integer"},"path":{"type":"string"}}},"FolderInput":{"example":{"name":"Binder 1","parent_id":null},"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":80},"parent_id":{"type":["integer","null"],"description":"The folder it goes inside; null for the top."}}},"CollectionItem":{"type":"object","required":["id","card","variant","quantity"],"properties":{"id":{"type":"integer"},"card":{"$ref":"#/components/schemas/Card"},"variant":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]},"condition":{"type":["string","null"],"description":"The slug of a condition."},"language":{"type":["string","null"],"description":"The code of a card language."},"quantity":{"type":"integer","minimum":1,"maximum":9999},"folder_id":{"type":["integer","null"]},"purchase_price":{"type":["number","null"]},"purchase_currency":{"type":["string","null"]},"notes":{"type":["string","null"]},"added_at":{"type":["string","null"],"format":"date-time"}}},"CollectionItemInput":{"example":{"variant":"normal","condition":"near-mint","language":"en","quantity":2,"folder_id":null,"purchase_price":4.5,"purchase_currency":"EUR","notes":"From a booster at the local shop"},"type":"object","required":["variant","quantity"],"properties":{"variant":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]},"condition":{"type":["string","null"],"description":"The slug of a condition."},"language":{"type":["string","null"],"description":"The code of a card language."},"quantity":{"type":"integer","minimum":1,"maximum":9999},"folder_id":{"type":["integer","null"]},"purchase_price":{"type":["number","null"]},"purchase_currency":{"type":["string","null"]},"notes":{"type":["string","null"]}}},"NewCollectionItem":{"example":{"card":"butterfree-v-1-swsh3","variant":"normal","condition":"near-mint","language":"en","quantity":2,"folder_id":null,"purchase_price":4.5,"purchase_currency":"EUR","notes":"From a booster at the local shop"},"type":"object","required":["card","variant","quantity"],"properties":{"card":{"type":"string","description":"The slug of the card."},"variant":{"type":"string","enum":["normal","holo","reverse","first_edition","promo","stamped_promo","foil","etched"]},"condition":{"type":["string","null"],"description":"The slug of a condition."},"language":{"type":["string","null"],"description":"The code of a card language."},"quantity":{"type":"integer","minimum":1,"maximum":9999},"folder_id":{"type":["integer","null"]},"purchase_price":{"type":["number","null"]},"purchase_currency":{"type":["string","null"]},"notes":{"type":["string","null"]}}}}}}