{"openapi":"3.1.0","info":{"title":"alltcgapi API","version":"1","description":"A REST API for trading card games. Pokémon, Yu-Gi-Oh!, One Piece, Lorcana, Digimon, Flesh and Blood, Star Wars: Unlimited and twelve more: cards, sets, sealed products and current prices through one contract, one key and one response shape. Unknown query parameters are rejected with 400. Errors and 304 responses are not charged."},"servers":[{"url":"https://api.alltcgapi.com"}],"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"paths":{"/v1/games":{"get":{"summary":"The games in the catalogue","description":"Credits: 1.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sets":{"get":{"summary":"Sets, newest first","description":"Credits: 1.","parameters":[{"name":"game","in":"query","required":false,"description":"A game id from /v1/games.","schema":{"type":"string"}},{"name":"region","in":"query","required":false,"description":"The print line of the set.","schema":{"type":"string","enum":["WEST","EAST"]}},{"name":"limit","in":"query","required":false,"description":"1 to 250. Default 50. Above 250 is a 400, never truncated.","schema":{"type":"integer","minimum":1,"maximum":250,"default":50}},{"name":"cursor","in":"query","required":false,"description":"From links.next of the previous page. Never built by hand.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Set"}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"count":{"type":"integer"},"has_more":{"type":"boolean"}}},"links":{"type":"object","properties":{"next":{"type":["string","null"],"description":"The complete URL of the next page."}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sets/{id}":{"get":{"summary":"One set by id or code","description":"Credits: 1.","parameters":[{"name":"id","in":"path","required":true,"description":"A set id or a set code.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Set"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sets/{id}/cards":{"get":{"summary":"The cards of a set, in collector-number order","description":"Credits: 1 per 50 rows requested.","parameters":[{"name":"id","in":"path","required":true,"description":"A set id or a set code.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 250. Default 50. Above 250 is a 400, never truncated.","schema":{"type":"integer","minimum":1,"maximum":250,"default":50}},{"name":"cursor","in":"query","required":false,"description":"From links.next of the previous page. Never built by hand.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Card"}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"count":{"type":"integer"},"has_more":{"type":"boolean"}}},"links":{"type":"object","properties":{"next":{"type":["string","null"],"description":"The complete URL of the next page."}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards":{"get":{"summary":"Cards across the catalogue","description":"Credits: 1 per 50 rows requested.","parameters":[{"name":"game","in":"query","required":false,"description":"A game id from /v1/games.","schema":{"type":"string"}},{"name":"set","in":"query","required":false,"description":"A set id or code.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Matches the start of the card name.","schema":{"type":"string"}},{"name":"number","in":"query","required":false,"description":"The collector number, exactly as printed.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 250. Default 50. Above 250 is a 400, never truncated.","schema":{"type":"integer","minimum":1,"maximum":250,"default":50}},{"name":"cursor","in":"query","required":false,"description":"From links.next of the previous page. Never built by hand.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Card"}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"count":{"type":"integer"},"has_more":{"type":"boolean"}}},"links":{"type":"object","properties":{"next":{"type":["string","null"],"description":"The complete URL of the next page."}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}":{"get":{"summary":"One card","description":"Credits: 1.","parameters":[{"name":"id","in":"path","required":true,"description":"A card id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Card"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/prices":{"get":{"summary":"The current quotes of a card","description":"Credits: 2.","parameters":[{"name":"id","in":"path","required":true,"description":"A card id.","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Keep one source.","schema":{"type":"string","enum":["CARDMARKET","TCGPLAYER"]}},{"name":"language","in":"query","required":false,"description":"Keep one language, such as en or ja.","schema":{"type":"string"}},{"name":"variant","in":"query","required":false,"description":"Keep one variant, such as MARKET or LOWEST_NEAR_MINT.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/prices/history":{"get":{"summary":"The price history of a card: one point per series per day","description":"Credits: 5.","parameters":[{"name":"id","in":"path","required":true,"description":"A card id.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"The first day, in UTC. Default: 90 days before to. A day earlier than the window of the plan is moved forward, and meta.truncated is true.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"The last day, in UTC. Default: today.","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","required":false,"description":"One point per series per day, per week (from Monday) or per month. A week or a month carries the median of its days.","schema":{"type":"string","enum":["day","week","month"],"default":"day"}},{"name":"source","in":"query","required":false,"description":"Keep one source.","schema":{"type":"string","enum":["CARDMARKET","TCGPLAYER"]}},{"name":"language","in":"query","required":false,"description":"Keep one language, such as en or ja.","schema":{"type":"string"}},{"name":"variant","in":"query","required":false,"description":"Keep one variant, such as MARKET or LOWEST_NEAR_MINT.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceHistory"}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sealed":{"get":{"summary":"Sealed products","description":"Credits: 1 per 50 rows requested.","parameters":[{"name":"game","in":"query","required":false,"description":"A game id from /v1/games.","schema":{"type":"string"}},{"name":"set","in":"query","required":false,"description":"A set id or code.","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"A product kind, such as BOOSTER_BOX.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 250. Default 50. Above 250 is a 400, never truncated.","schema":{"type":"integer","minimum":1,"maximum":250,"default":50}},{"name":"cursor","in":"query","required":false,"description":"From links.next of the previous page. Never built by hand.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sealed"}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"count":{"type":"integer"},"has_more":{"type":"boolean"}}},"links":{"type":"object","properties":{"next":{"type":["string","null"],"description":"The complete URL of the next page."}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sealed/{id}":{"get":{"summary":"One sealed product","description":"Credits: 1.","parameters":[{"name":"id","in":"path","required":true,"description":"A sealed product id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sealed"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sealed/{id}/prices":{"get":{"summary":"The current quotes of a sealed product","description":"Credits: 2.","parameters":[{"name":"id","in":"path","required":true,"description":"A sealed product id.","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Keep one source.","schema":{"type":"string","enum":["CARDMARKET","TCGPLAYER"]}},{"name":"language","in":"query","required":false,"description":"Keep one language, such as en or ja.","schema":{"type":"string"}},{"name":"variant","in":"query","required":false,"description":"Keep one variant, such as MARKET or LOWEST_NEAR_MINT.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sealed/{id}/prices/history":{"get":{"summary":"The price history of a sealed product","description":"Credits: 5.","parameters":[{"name":"id","in":"path","required":true,"description":"A sealed product id.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"The first day, in UTC. Default: 90 days before to. A day earlier than the window of the plan is moved forward, and meta.truncated is true.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"The last day, in UTC. Default: today.","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","required":false,"description":"One point per series per day, per week (from Monday) or per month. A week or a month carries the median of its days.","schema":{"type":"string","enum":["day","week","month"],"default":"day"}},{"name":"source","in":"query","required":false,"description":"Keep one source.","schema":{"type":"string","enum":["CARDMARKET","TCGPLAYER"]}},{"name":"language","in":"query","required":false,"description":"Keep one language, such as en or ja.","schema":{"type":"string"}},{"name":"variant","in":"query","required":false,"description":"Keep one variant, such as MARKET or LOWEST_NEAR_MINT.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceHistory"}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prices/current":{"get":{"summary":"The current quotes of up to 25 cards and sealed products","description":"Credits: 4.","parameters":[{"name":"ids","in":"query","required":true,"description":"Up to 25 card or sealed product ids, separated by commas. An id that is not in the catalogue is left out of the response.","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Keep one source.","schema":{"type":"string","enum":["CARDMARKET","TCGPLAYER"]}},{"name":"language","in":"query","required":false,"description":"Keep one language, such as en or ja.","schema":{"type":"string"}},{"name":"variant","in":"query","required":false,"description":"Keep one variant, such as MARKET or LOWEST_NEAR_MINT.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBatch"}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me":{"get":{"summary":"Your plan, scopes and remaining credits","description":"Credits: 0.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prices/sources":{"get":{"summary":"The price sources the API serves, with the delay of each","description":"Public: no key, no credits.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceSource"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prices/coverage":{"get":{"summary":"Per game and source: how many items have a quote","description":"Public: no key, no credits.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceCoverage"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/plans":{"get":{"summary":"The price list","description":"Public: no key, no credits.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reference":{"get":{"summary":"The closed vocabularies in one call","description":"Public: no key, no credits.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/status":{"get":{"summary":"When the catalogue and the prices were last refreshed","description":"Public: no key, no credits.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"summary":"Process and database health","description":"Public: no key, no credits.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/register":{"post":{"summary":"Create an account with its first key","description":"Public: no key, no credits.","security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"One value per attempt, 16 to 128 characters. Repeat it with the same body after a lost response and you get the same result back.","schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string","description":"At least 8 characters.","minLength":8,"maxLength":256},"label":{"type":"string","description":"A label for the first key."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Signup"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/free":{"post":{"summary":"Get a trial key for an email address","description":"Public: no key, no credits.","security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"One value per attempt, 16 to 128 characters. Repeat it with the same body after a lost response and you get the same result back.","schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Signup"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/verify":{"post":{"summary":"Confirm the email address","description":"Public: no key, no credits.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"From the verification link."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"}}}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/recover":{"post":{"summary":"Send a recovery link","description":"Public: no key, no credits.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"message":{"type":"string","description":"The same whether or not the account exists."}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/recover/confirm":{"post":{"summary":"Recover access: a new key, and a new password if sent","description":"Public: no key, no credits.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"From the recovery link."},"password":{"type":"string","minLength":8,"maxLength":256},"label":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/NewKey"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/usage":{"get":{"summary":"Requests and credits per day","description":"Credits: 0.","parameters":[{"name":"days","in":"query","required":false,"description":"How many days back, today included.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageDay"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/keys":{"get":{"summary":"The keys of the account, masked","description":"Credits: 0.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KeySummary"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a key","description":"Credits: 0. Scope: account:write.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"One value per attempt, 16 to 128 characters. Repeat it with the same body after a lost response and you get the same result back.","schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/NewKey"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/keys/{id}/rotate":{"post":{"summary":"Rotate a key: a new secret, the old one valid for a grace period","description":"Credits: 0. Scope: account:write.","parameters":[{"name":"id","in":"path","required":true,"description":"A key id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"One value per attempt, 16 to 128 characters. Repeat it with the same body after a lost response and you get the same result back.","schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/NewKey"}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/keys/{id}":{"delete":{"summary":"Revoke a key at once","description":"Credits: 0. Scope: account:write.","parameters":[{"name":"id","in":"path","required":true,"description":"A key id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"revoked":{"type":"boolean"},"id":{"type":"string"}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/verification/resend":{"post":{"summary":"Send a new verification link","description":"Credits: 0. Scope: account:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"state":{"type":"string","enum":["sent","already_verified"]},"email":{"type":"string"}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Open a Stripe Checkout for a paid plan","description":"Credits: 0. Scope: account:write.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"One value per attempt, 16 to 128 characters. Repeat it with the same body after a lost response and you get the same result back.","schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","description":"A plan code from /v1/billing/plans."},"interval":{"type":"string","enum":["MONTHLY","YEARLY"]},"success_to":{"type":"string","description":"Where to land after paying: account, billing or welcome."},"cancel_to":{"type":"string","description":"Where to land after cancelling: pricing or account."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"session_id":{"type":"string"},"url":{"type":"string","description":"A checkout.stripe.com address."},"expires_at":{"type":"string","format":"date-time"}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/portal":{"post":{"summary":"Open the Stripe billing portal","description":"Credits: 0. Scope: account:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"return_to":{"type":"string","description":"account or billing."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"return_url":{"type":"string"}}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/invoices":{"get":{"summary":"The invoices of the account","description":"Credits: 0.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}}}},"default":{"description":"An error. Branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key"},"BearerKey":{"type":"http","scheme":"bearer"}},"schemas":{"Game":{"type":"object","properties":{"id":{"type":"string","description":"The value to pass as game=."},"name":{"type":"string"},"sets":{"type":"integer"},"cards":{"type":"integer"},"sealed":{"type":"integer"}}},"Set":{"type":"object","properties":{"id":{"type":"string"},"game":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"region":{"type":"string","enum":["WEST","EAST"]},"release_date":{"type":["string","null"],"format":"date"},"total_cards":{"type":["integer","null"]},"printed_cards":{"type":["integer","null"]},"image_url":{"type":["string","null"]},"languages":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","description":"Moves only when the data of the object changes."},"updated_at":{"type":"string","format":"date-time"}}},"Card":{"type":"object","properties":{"id":{"type":"string","description":"Stable. Never changes, never reused."},"game":{"type":"string"},"set":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}}},"number":{"type":"string","description":"The collector number as printed."},"name":{"type":"string"},"rarity":{"type":["string","null"]},"supertype":{"type":["string","null"]},"attributes":{"type":["object","null"],"description":"Game-specific rules data.","additionalProperties":true},"image_url":{"type":["string","null"]},"languages":{"type":"array","items":{"type":"string"}},"external_ids":{"type":"object","properties":{"cardmarket":{"type":["integer","null"]},"tcgplayer":{"type":["integer","null"]}}},"version":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"Sealed":{"type":"object","properties":{"id":{"type":"string"},"game":{"type":["string","null"]},"set":{"type":["object","null"],"properties":{"id":{"type":"string"},"code":{"type":"string"}}},"sku":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"image_url":{"type":["string","null"]},"release_date":{"type":["string","null"],"format":"date"},"pack_count":{"type":["integer","null"]},"languages":{"type":"array","items":{"type":"string"}},"external_ids":{"type":"object","properties":{"cardmarket":{"type":["integer","null"]},"tcgplayer":{"type":["integer","null"]}}},"version":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"Quote":{"type":"object","required":["source","variant","language","eu_only","price","as_of"],"properties":{"source":{"type":"string","description":"Where the number comes from."},"variant":{"type":"string","description":"What the number measures, such as MARKET or LOWEST_NEAR_MINT."},"language":{"type":"string","description":"The language of the copy that was quoted."},"condition":{"type":["string","null"]},"printing":{"type":["string","null"]},"region":{"type":["string","null"]},"eu_only":{"type":"boolean","description":"True when the source counted sellers in the European Union only."},"price":{"type":"object","required":["amount","currency"],"properties":{"amount":{"type":"number"},"currency":{"type":"string","description":"ISO 4217. Never converted."}}},"as_of":{"type":"string","description":"The last day, in UTC, the source published this quote.","format":"date"}}},"PricePoint":{"type":"object","required":["date","source","variant","language","eu_only","price"],"properties":{"date":{"type":"string","description":"The day of the point, in UTC. With bucket=week or month, the first day of the bucket.","format":"date"},"source":{"type":"string","description":"Where the number comes from."},"variant":{"type":"string","description":"What the number measures, such as MARKET or LOWEST_NEAR_MINT."},"language":{"type":"string","description":"The language of the copy that was quoted."},"condition":{"type":["string","null"]},"printing":{"type":["string","null"]},"region":{"type":["string","null"]},"eu_only":{"type":"boolean","description":"True when the source counted sellers in the European Union only."},"price":{"type":"object","required":["amount","currency"],"properties":{"amount":{"type":"number"},"currency":{"type":"string","description":"ISO 4217. Never converted."}}}}},"PriceBatch":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"The items found, in the order they were asked for.","items":{"type":"object","required":["id","kind","quotes"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["card","sealed"]},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}}}}},"meta":{"type":"object","properties":{"requested":{"type":"integer","description":"Distinct ids in the request."},"found":{"type":"integer","description":"Ids found in the catalogue."}}}}},"PriceHistory":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"Oldest first. At most 3,000 points.","items":{"$ref":"#/components/schemas/PricePoint"}},"meta":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["card","sealed"]},"from":{"type":"string","description":"The first day of the response, after the window of the plan was applied.","format":"date"},"to":{"type":"string","format":"date"},"bucket":{"type":"string","enum":["day","week","month"]},"count":{"type":"integer","description":"Points in data."},"truncated":{"type":"boolean","description":"True when from was moved forward to the window of the plan."},"capped":{"type":"boolean","description":"True when there were more than 3,000 points: narrow the dates or the filters, or use bucket=week."},"plan_window_days":{"type":["integer","null"],"description":"How many days back the plan reads. Null: no limit."}}}}},"PriceSource":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"delay_hours":{"type":"integer","description":"A day can be read this many hours after it began."},"max_age_days":{"type":"integer","description":"A quote not published for longer than this is no longer returned as current."}}},"NewKey":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string","description":"The full key. Returned once: only a hash is stored."},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}}},"KeySummary":{"type":"object","properties":{"id":{"type":"string"},"masked":{"type":"string","description":"The first characters of the key."},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"current":{"type":"boolean","description":"The key that made this request."}}},"Signup":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"}}},"key":{"$ref":"#/components/schemas/NewKey"},"quota":{"type":"object","properties":{"credits_limit":{"type":["integer","null"]},"daily_cap":{"type":["integer","null"]}}},"verification":{"type":"object","properties":{"state":{"type":"string","enum":["pending","not_required"]}}}}},"UsageDay":{"type":"object","properties":{"day":{"type":"string","format":"date"},"requests":{"type":"integer"},"credits":{"type":"integer"},"by_status":{"type":"object","additionalProperties":{"type":"integer"}}}},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"amount_cents":{"type":"integer"},"currency":{"type":"string"},"hosted_url":{"type":["string","null"]},"pdf_url":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"PriceCoverage":{"type":"object","properties":{"game":{"type":"string"},"source":{"type":"string"},"cards":{"type":"integer","description":"Cards with a current quote."},"sealed":{"type":"integer","description":"Sealed products with a current quote."},"as_of":{"type":"string","description":"The day of the newest quote.","format":"date"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Stable. One of: INVALID_PARAMETER, LIMIT_EXCEEDED, INVALID_CURSOR, MISSING_API_KEY, INVALID_API_KEY, INVALID_CREDENTIALS, TRIAL_EXPIRED, IMAGE_URL_INVALID, INSUFFICIENT_SCOPE, KEY_NOT_FOUND, CARD_NOT_FOUND, SET_NOT_FOUND, SEALED_NOT_FOUND, ROUTE_NOT_FOUND, ACCOUNT_EXISTS, IDEMPOTENCY_CONFLICT, RATE_LIMITED, CONCURRENCY_LIMIT, QUOTA_EXCEEDED, METER_UNAVAILABLE, FEATURE_NOT_CONFIGURED."},"message":{"type":"string","description":"Written for a person. May change."},"details":{"type":"object","additionalProperties":true},"request_id":{"type":"string"}}}}}}}}