{"lang":"en","availableLangs":["zh","en","ko"],"errors":[{"code":"AUTH_MISSING_TOKEN","title":"Missing authentication token","hint":"Send `Bearer <token>` in the Authorization header (`?token=` is not accepted on /api/v1). Get a token from POST /api/v1/auth/token with client_id + client_secret in the body.","docUrl":"/errors/AUTH_MISSING_TOKEN"},{"code":"AUTH_INVALID_TOKEN","title":"Invalid token","hint":"The token is malformed or its signature is wrong. Get a fresh one from POST /api/v1/auth/token; make sure it is not truncated and has no stray spaces.","docUrl":"/errors/AUTH_INVALID_TOKEN"},{"code":"AUTH_EXPIRED","title":"Token expired","hint":"The token passed its expiry. Fetch a new one; we recommend refreshing automatically shortly before exp.","docUrl":"/errors/AUTH_EXPIRED"},{"code":"SCOPE_DENIED","title":"Operation not permitted","hint":"Your channel role does not include this capability. Pick a plan under “Plans & access” and request it — it takes effect as soon as your account manager approves.","docUrl":"/errors/SCOPE_DENIED"},{"code":"WAREHOUSE_DENIED","title":"Warehouse not permitted","hint":"Your channel is not on this warehouse allowlist. Ask your account manager to add the warehouse to your channel, or clear the list to allow all.","docUrl":"/errors/WAREHOUSE_DENIED"},{"code":"AUTHZ_UNAVAILABLE","title":"Authorization service unavailable","hint":"The authorisation service is temporarily unavailable. Retry shortly; if it persists, contact your account manager with the requestId.","docUrl":"/errors/AUTHZ_UNAVAILABLE"},{"code":"VALIDATION_FAILED","title":"Invalid request parameters","hint":"Fix the field named in error.param. Full field specs for every endpoint are at /swagger.","docUrl":"/errors/VALIDATION_FAILED"},{"code":"NOT_FOUND","title":"Not found","hint":"That product code / SKU / sheet id does not exist or is misspelled. Double-check and retry.","docUrl":"/errors/NOT_FOUND"},{"code":"OWNERSHIP_DENIED","title":"Document does not belong to you","hint":"This document belongs to another channel. You can only read orders / shipments / holds for your own channel.","docUrl":"/errors/OWNERSHIP_DENIED"},{"code":"UPSTREAM_ERROR","title":"Upstream ERP error","hint":"The upstream ERP is temporarily failing. Retry shortly; quote the requestId to support and we can trace that exact call.","docUrl":"/errors/UPSTREAM_ERROR"},{"code":"UPSTREAM_TIMEOUT","title":"Upstream timeout","hint":"The upstream ERP is slow or unreachable. Please retry shortly.","docUrl":"/errors/UPSTREAM_TIMEOUT"},{"code":"INTERNAL","title":"Gateway internal error","hint":"An error inside the gateway itself (rare). Contact support with the requestId.","docUrl":"/errors/INTERNAL"},{"code":"ADMIN_UNAUTHORIZED","title":"Wrong admin token","hint":"Check that x-admin-token matches ADMIN_TOKEN in the server .env file.","docUrl":"/errors/ADMIN_UNAUTHORIZED"},{"code":"ADMIN_DISABLED","title":"Admin console disabled","hint":"ADMIN_TOKEN is not set on the server. Set it and restart.","docUrl":"/errors/ADMIN_DISABLED"},{"code":"IDEMPOTENCY_IN_PROGRESS","title":"An identical request is still running","hint":"A previous request with the same Idempotency-Key has not finished. Retry shortly with the SAME key — changing the key risks creating a duplicate.","docUrl":"/errors/IDEMPOTENCY_IN_PROGRESS"},{"code":"IDEMPOTENCY_MISMATCH","title":"Idempotency-Key reused","hint":"This key was already used for a request with different content. Use a fresh key per business operation (a UUID, or your own order number).","docUrl":"/errors/IDEMPOTENCY_MISMATCH"},{"code":"IDEMPOTENCY_INVALID_KEY","title":"Invalid Idempotency-Key","hint":"The key must be at most 255 characters. A UUID is recommended.","docUrl":"/errors/IDEMPOTENCY_INVALID_KEY"},{"code":"RATE_LIMITED","title":"Rate limit exceeded","hint":"Check the RateLimit-Remaining / Retry-After response headers and back off. Pulling a whole warehouse is expensive (60 points); the incremental endpoint /Changes?since= costs only 1. If you genuinely need more, ask your account manager to raise your quota.","docUrl":"/errors/RATE_LIMITED"},{"code":"BAD_REQUEST","title":"Bad request","hint":"Check the HTTP method, path and request body.","docUrl":"/errors/BAD_REQUEST"},{"code":"READ_ONLY_MODE","title":"This environment is read-only","hint":"Writes to the upstream ERP are intentionally disabled here (WRITES_ENABLED=0) so this server is safe to test against. Reads work normally. Use the production environment to place real orders.","docUrl":"/errors/READ_ONLY_MODE"},{"code":"ENDPOINT_GONE","title":"Endpoint retired","hint":"The API moved to /api/v1/** (lowercase paths, snake_case parameters). error.message names the replacement; the full list is at /reference or /llms.txt.","docUrl":"/errors/ENDPOINT_GONE"},{"code":"WAREHOUSE_UNKNOWN","title":"Unknown warehouse","hint":"Use one of the codes listed by GET /api/v1/warehouses (AU / AUSYD2 / AUSYD1 / CN / CHNZJ1); aliases such as AuStock no longer exist.","docUrl":"/errors/WAREHOUSE_UNKNOWN"},{"code":"UPSTREAM_REJECTED","title":"Rejected by the ERP","hint":"The ERP did not accept this request (insufficient stock, unknown id, invalid field …); the reason is in error.message. Fix and retry; if it keeps happening send the request_id to your contact.","docUrl":"/errors/UPSTREAM_REJECTED"},{"code":"AUTH_BAD_CREDENTIALS","title":"Wrong credentials","hint":"Channel grant: check client_id and client_secret (the secret is shown once at issue time; ask your admin to re-issue if lost). OMS grant (grant_type=password): check your OMS website login account and password. To try things out use sandbox / sandbox.","docUrl":"/errors/AUTH_BAD_CREDENTIALS"},{"code":"AUTH_LOCKED","title":"Too many failed sign-ins — temporarily locked","hint":"Repeated wrong passwords lock the OMS account for 15 minutes. Check the account and password, then retry; to try things out use sandbox / sandbox.","docUrl":"/errors/AUTH_LOCKED"},{"code":"DUPLICATE_SUSPECTED","title":"Possible duplicate drop-ship line","hint":"The upstream flags the same recipient + SKU submitted twice in quick succession. If you meant it, use a different client_order_number or retry later.","docUrl":"/errors/DUPLICATE_SUSPECTED"},{"code":"OMS_LOGIN_REQUIRED","title":"This endpoint needs an OMS account sign-in","hint":"Get a token with POST /api/v1/auth/token using grant_type=password and your OMS account (channel-secret tokens cannot use the ordering flow because allocation rules follow the OMS account).","docUrl":"/errors/OMS_LOGIN_REQUIRED"},{"code":"SHIPPING_REQUIRED","title":"Shipping info missing","hint":"A wholesale order needs a shipping method: pick a shipping_method_id from GET /api/v1/shipping-methods and put it in shipping; for delivery also pick an address_id from GET /api/v1/addresses. You can also set defaults on the OMS site under User → Preferences.","docUrl":"/errors/SHIPPING_REQUIRED"}]}