Skip to content
alltcgapi.com

Docs

Errors

One error shape, a stable code, and what to do about each.

Every error has the same shape. Branch on error.code, which is stable; the message is written for a person and may change.

Response
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "Unknown game \"one-piece\". Available: battlespirits, cyberpunk, digimon, dragoborne, dragonball-fw, dragonball-masters, fab, fftcg, fow, gundam, lorcana, onepiece, pokemon, riftbound, swdestiny, swu, vanguard, weissschwarz, yugioh.",
    "details": { "param": "game", "allowed": ["battlespirits", "cyberpunk", "digimon", …, "yugioh"] },
    "request_id": "6e1237ead44557646331e2c99fb3c3be"
  }
}

Quote request_id when you ask for help: it identifies the request in our logs.

Codes

StatusCodeMeaning
400INVALID_PARAMETERAn unknown parameter, a repeated one, or a value outside its vocabulary. details.param names it.
400LIMIT_EXCEEDEDlimit is above 250. The request is refused, never truncated.
400INVALID_CURSORThe cursor is malformed or was issued for a different list.
401MISSING_API_KEYNo key was sent.
401INVALID_API_KEYThe key is unknown or has been revoked.
401INVALID_CREDENTIALSSign-in with an email and password that do not match.
403TRIAL_EXPIREDTrial credits are used up. They do not renew: choose a plan.
403IMAGE_URL_INVALIDAn image URL with no signature, a wrong one, or one past its expiry. Read the object again for a fresh image_url.
403INSUFFICIENT_SCOPEThe key lacks the scope the route needs, such as account:write.
404KEY_NOT_FOUNDNo key with that id on your account.
404CARD_NOT_FOUND · SET_NOT_FOUND · SEALED_NOT_FOUNDNo object with that id. Refunded.
404ROUTE_NOT_FOUNDNo such route. details.did_you_mean suggests the closest one.
409ACCOUNT_EXISTSAn account already uses that email. Sign in or recover access.
409IDEMPOTENCY_CONFLICTThe Idempotency-Key was already used with a different request body.
429RATE_LIMITEDToo many requests in the current second or minute. Wait Retry-After seconds.
429CONCURRENCY_LIMITToo many requests in flight at once.
429QUOTA_EXCEEDEDNot enough credits left in the period, or the daily cap is reached.
503METER_UNAVAILABLEUsage metering is briefly unreachable. Retry in a few seconds.
503FEATURE_NOT_CONFIGUREDA part of the service, such as payments, is not switched on yet.

Unknown parameters are errors

A misspelled filter is refused, not ignored. Ignored, it would return the whole catalogue as if it were filtered, and you would find out after paying for the pages.

NextAPI reference