Skip to main content

Error Codes

Every API error returns a stable machine-readable code field. Branch your UI logic on code, not on message — codes are guaranteed stable across releases.

Error envelope:

{
"status": "failed",
"message": "Human-readable description",
"code": "MACHINE_READABLE_CODE"
}

Shop & API Key

These indicate a configuration problem. They should never be seen by real customers.

CodeHTTPDescriptionWhat to do
SHOP_NOT_FOUND404API key references a deleted shopCheck your API key in the admin
SHOP_UNDER_DEVELOPMENT403Shop is in maintenance modeShow branded coming-soon page
SHOP_BILLING_INVALID403Shop subscription has lapsedShow branded coming-soon page
DEV_MODE_DISABLED403Dev mode is turned offEnable dev mode in Settings
API_KEY_REQUIRED401x-api-key header not sentFix your request headers
API_KEY_INVALID401API key does not existCheck your key in the admin
API_KEY_REVOKED403API key was deactivatedCreate a new key
ORIGIN_NOT_ALLOWED401Request origin not in the key's allowlistAdd your domain to the API key

Products

CodeHTTPDescription
PRODUCT_NOT_FOUND404Product not found or has been unpublished
PRODUCT_ID_REQUIRED422productId query param missing
INVALID_VARIATION_KEY422variationKey format is invalid
INVALID_OPTION_VALUES422Option value IDs in the variation key don't exist
VARIANT_NOT_FOUND404The specific variation combination doesn't exist

Categories

CodeHTTPDescription
CATEGORY_NOT_FOUND404Category not found or has been unpublished

CodeHTTPDescription
INVALID_SEARCH_QUERY422term query param missing or empty

Coupons

CodeHTTPDescription
COUPON_CODE_REQUIRED422coupons array is empty
COUPONS_DISABLED403Merchant has disabled the coupon module
INVALID_SHIPPING_ID422Shipping ID provided is not valid
COUPON_ZERO_TOTAL422Cannot apply coupon to a zero-total order
INVALID_COUPON422Coupon code not found or conditions not met

Orders

CodeHTTPDescription
ORDER_NOT_FOUND404Order not found or belongs to a different user
ORDER_VALIDATION_FAILED422Order could not be validated (empty cart, etc.)
DOWNLOAD_PRODUCT_NOT_FOUND404Product not found in the order
DOWNLOAD_FILE_NOT_FOUND404File ID not found in the product
DOWNLOAD_NOT_ACTIVE403Download has been disabled by the merchant
DOWNLOAD_LIMIT_REACHED403Customer exceeded the allowed download count
DOWNLOAD_EXPIRED403Download period has ended
DOWNLOAD_FILE_MISSING500File not found on the server

Customer Auth

CodeHTTPDescriptionWhat to do
AUTH_NOT_INITIALIZED403Shop hasn't set up customer authShow "login unavailable" message
EMAIL_REQUIRED422Email not providedValidate form before submitting
ACCOUNT_NOT_FOUND404No account with this emailShow "no account found" or offer to register
ACCOUNT_BLACKLISTED403Account has been suspendedShow "contact support" message
ACCOUNT_INACTIVE403Account is not activeShow "contact shop support" message
TOO_MANY_LOGIN_ATTEMPTS429Rate limited on login attemptsShow "please wait" message
TOO_MANY_VERIFY_ATTEMPTS429Rate limited on OTP attemptsShow "request a new code" message
VERIFICATION_NOT_FOUND404OTP verification document not foundAsk customer to request a new code
VERIFICATION_USER_MISMATCH422Email doesn't match the verificationCheck the email field
VERIFICATION_EVENT_MISMATCH422event field doesn't matchUse "login" for the event field
VERIFICATION_NOT_VALID422Code has expired or already been usedAsk customer to request a new code
INVALID_CODE422Incorrect OTPShow "incorrect code, try again"
GOOGLE_AUTH_REQUIRED403This account uses Google loginOffer Google login option
EMAIL_ALREADY_EXISTS409Email taken during registrationPrompt to log in instead
PHONE_NUMBER_INVALID422Phone number failed validationShow inline validation error
SESSION_EXPIRED401JWT token has expiredClear token, redirect to login
AUTH_TOKEN_MISSING401Authorization header not sentRedirect to login
AUTH_TOKEN_INVALID401Token could not be validatedClear token, redirect to login
AUTH_TOKEN_DEVICE_MISMATCH401Token was issued to a different deviceClear token, redirect to login
AUTH_USER_NOT_FOUND404Authenticated user no longer existsClear token, redirect to login
USER_NOT_FOUND404User lookup failedClear token, redirect to login
INVALID_ACCESS_LINK422Magic link is invalid or already usedShow "this link is not valid"
ACCESS_LINK_EXPIRED403Magic link has expiredShow "this link has expired"
ORDER_CANCELLED403Order linked to magic link was cancelledShow "this order was cancelled"
ORDER_HAS_REFUND403Order linked to magic link has a refundReject silently or show "contact support"

Reviews

CodeHTTPDescription
REVIEW_PRODUCT_NOT_FOUND404Product not found
REVIEW_ORDER_NOT_FOUND404Order not found or not owned by user
REVIEW_ORDER_STATUS_INVALID422Order must be delivered before a review can be submitted
REVIEW_ALREADY_EXISTS409Customer already reviewed this order

Newsletter

CodeHTTPDescription
EMAIL_ALREADY_SUBSCRIBED409Email is already subscribed
NEWSLETTER_LIMIT_EXCEEDED403Shop's subscriber limit reached
NEWSLETTER_RATE_LIMITED429Too many subscription attempts from this IP
SUBSCRIPTION_NOT_VALID422Subscription document is invalid or expired
SUBSCRIPTION_NOT_FOUND404Subscription not found

Contact Form

CodeHTTPDescription
CONTACT_FORM_RATE_LIMITED429Too many submissions from this IP (limit: 3/hour)
CONTACT_FORM_LIMIT_EXCEEDED403Shop's contact form submission limit reached

Settings & Policies

CodeHTTPDescription
POLICY_NOT_FOUND404Policy type not configured by the merchant

Config & Domain

CodeHTTPDescription
HOSTNAME_NOT_DETERMINED422Could not determine the request hostname
DOMAIN_NOT_IDENTIFIED422Domain host not identified
SHOP_ID_NOT_FOUND404Could not get shop ID from the domain
SHOP_URL_INVALID422Shop URL is not valid

Payments

CodeHTTPDescription
PAYMENTS_NOT_ENABLED403Online payments not configured for this shop
PAYMENT_LINK_INVALID422Payment link is invalid or already used
PAYMENT_LINK_EXPIRED403Payment link has expired
INVOICE_NOT_FOUND404Invoice not found

Notifications

CodeHTTPDescription
NOTIFICATION_NOT_FOUND404Notification not found or belongs to a different user

Content

CodeHTTPDescription
CONTENT_MODEL_NOT_FOUND404Model slug doesn't exist in the admin
CONTENT_ENTRY_NOT_FOUND404Entry not found or not published

Analytics

CodeHTTPDescription
INVALID_USER_ID422userId field missing or invalid
INVALID_SESSION_ID422sessionId field missing or invalid
INVALID_EVENT422event field missing or invalid