Skip to content

Error Codes and Troubleshooting ​

This page collects the common error codes, error messages, causes, and fixes for API calls, and gives troubleshooting steps.

Error messages (msg) returned by the API are in Chinese. The tables below give the English meaning first, with the original Chinese text in parentheses so you can match it against actual responses.

Identify Which Layer the Error Is In ​

SymptomLayerHow to check
HTTP status 401 / 403 / 429Authentication and permissionsSee "Authentication and Permission Errors" below
HTTP 200, code is not 200 (new protocol)Business validationCheck msg and the "Common errors" section on each endpoint page
HTTP 200, code is "500", and msg starts with System check exception! reason: (legacy protocol)Business validationThe specific reason follows reason:
HTTP 5xx, timeoutNetwork or service errorRetry later; contact technical support if it persists

Authentication and Permission Errors ​

These are the same for both protocols. A real HTTP status code is returned, and the body is {code, msg, data:null}.

HTTPMessageCauseFix
401Missing x-api-key (缺少 x-api-key)A new-protocol request has no KeyAdd the x-api-key header
401Missing hytx-api-key (...) (缺少 hytx-api-key(…))A legacy-protocol request has no KeyAdd the hytx-api-key header
401API Key is invalid, revoked, expired, or its holder no longer has permission (API Key 无效、已吊销、已过期,或持有人已无权限)Wrong Key or Secret, revoked, expired, account disabled, etc.See "If you get a 401" below
403This API Key cannot call this type of endpoint... (该 API Key 不能调用此类接口…)The Key type does not match the endpoint, for example a warehouse Key calling the legacy protocolUse a Key of the matching type
403An API Key cannot call credential-management endpoints (API Key, password, MFA) (API Key 不能调用凭证管理类接口(API Key、密码、MFA))A Key was used to call Key management, password change, or similar endpoints, or the path looks suspiciousThese operations can only be done after signing in on the web; check the path for //, .., ;
403A read-only API Key cannot call write endpoints (只读 API Key 不能调用写接口)A read-only Key called a write endpointUse a read/write Key
403The current API Key is not authorized for scope: xxx (当前 API Key 未授权能力域:xxx)The Key's scopes do not include this endpointSee Scopes
429Too many requests; the API Key's limit of N per minute has been exceeded (请求过于频繁,已超过该 API Key 每分钟 N 次的上限)The per-minute call limit was exceededSlow down and wait for the next minute; or edit the Key in OMS to raise the limit (maximum 6000)
429Too many authentication failures, please try again later (鉴权失败次数过多,请稍后再试)30 or more authentication failures per minute from the same IPFix your credentials, then wait one minute

New-Protocol Business Errors (HTTP 200) ​

codeExample messageNotes
404Data does not exist (数据不存在)The document, warehouse, or customer does not exist, or is outside your data scope (the two cases are not distinguished)
403This endpoint requires a customer API Key / This endpoint requires a warehouse (warehouse administrator / warehouse manager) API Key (该接口需要货主 API Key / 该接口需要仓库(仓库管理员 / 库管)API Key)The endpoint is restricted to one Key type
500OMS customer integration requires a customer-level key (the key is not bound to a customer) (OMS 货主对接需客户级密钥(密钥未绑定货主))A warehouse Key called an /oms/** endpoint
500Order does not exist or access denied: X / Inbound forecast does not exist or access denied: X / Product does not exist or access denied: X (订单不存在或无权访问: X / 预约入库不存在或无权访问: X / 商品不存在或无权访问: X)A lookup by number found nothing
500SKU not authorized or does not exist: X (无权使用或不存在的SKU: X)The SKU is not under your account or has not been created
500Other validation messagesSee "Common errors" on each endpoint page
400Malformed request parameters: ... / Request parameter type mismatch... / Required request parameter [x] is missing (请求参数格式错误:… / 请求参数类型不匹配… / 缺少必需的请求参数[x])Invalid JSON, wrong field type, or missing parameter
404Request address does not exist (请求地址不存在)Wrong path, or a legacy endpoint that is not provided

Legacy-Protocol Business Errors (HTTP 200) ​

codemsg
"500"System check exception! reason: <business reason>
"500"System check exception! reason: 服务器出错,请您联系管理员 (Server error, please contact the administrator; an uncategorized internal error)
"401"仓库权限不足 (Insufficient warehouse permission; the identity is not a customer)

If the request method, Content-Type, or JSON is wrong, the legacy protocol also responds with code:"500", with messages such as Request method 'GET' not supported, Content type 'text/plain' not supported, or JSON parse error: ....

Troubleshooting Steps ​

If you get a 401 ​

  1. Call GET /open-api/v1/ping to rule out a problem with the business endpoint itself.
  2. Check that the Key and Secret are complete, with no extra spaces, line breaks, or quotation marks.
  3. In the combined form, join them with an ASCII period: <Key>.<Secret>.
  4. On the Open API (开放API对接) page in OMS, confirm the Key's status is "Active" and that it has not expired.
  5. If you just rotated the Key, confirm you are using the new Secret, or that the old Secret is still within its grace period.
  6. A legacy key can only call the legacy /api/wh/** endpoints and must be sent in the hytx-api-key header.

If you get a 403 ​

Handle it according to the message: read-only Key → use a read/write Key; scope → use a different Key or contact the platform; wrong Key type → use a customer Key for customer endpoints and a warehouse Key for location endpoints.

If you get a 429 ​

Read the X-RateLimit-Limit and X-RateLimit-Remaining response headers to pace your calls. For batch jobs, add intervals, and after a 429 wait until the next minute before continuing.

Someone says a document exists but I can't find it ​

The API only returns data belonging to the account that owns the current Key. Confirm you are using the Key of the correct account, and check that the document number matches in case and has no leading or trailing spaces.

When contacting technical support ​

Provide the call time (with time zone), the endpoint path, the X-Request-Id from the response headers, and the complete response body. Do not send your Secret. You can also first check that request's HTTP status and business code yourself under Open API (开放API对接) → Call log in OMS.

Known Usage Notes ​

  • The skuCode of GET /open-api/v1/inventory/available is currently matched by "contains". For an exact lookup, call now-stock and filter the results yourself.
  • New-protocol paginated endpoints return all data if pageSize is omitted; if the page number is out of range, the first page is returned.
  • GET /open-api/v1/warehouse/list is not paginated.
  • POST /open-api/v1/outbound/orders only creates a draft, which cannot be submitted through the Open API; for e-commerce orders use /oms/orders.
  • For legacy GET packing/{id}, empty text fields are omitted from the output, so parse defensively.

FAQ ​

Why does it say failure when HTTP is 200? ​

When business validation fails the HTTP status is still 200. Check code in the body.

I get "Data does not exist" but the document definitely exists ​

If a document is outside the current Key's data scope (for example, it belongs to another account, or the warehouse is not one available to you), "Data does not exist" is returned as well. Confirm that the Key's account matches the owner of the document.