Error Codes

Error Code Reference

Every endpoint returns a {code, msg, data} envelope; judge success by code. This page lists the error codes you may hit, grouped by category, with when they happen and what to do.

10000 = Succeeded 19 error codes

Client errors

Status Code Meaning When it happens What to do
20001 Missing parameter A required parameter was not provided. Check the endpoint's Parameters table and supply every required field, then retry.
20002 Invalid parameter format A parameter has the wrong format — e.g. text where a number is expected, or an unparsable JSON body. Check the value format and body encoding, and make sure Content-Type matches the body (use application/json for JSON).
20003 Invalid parameter value The value itself is invalid — e.g. out of the allowed range, or an ID that does not exist. Check the documented allowed values for that parameter and submit again.
20010 Unauthenticated The request carries no authentication information. Follow the Signing section: send APPID, timestamp and signature in the request headers, then retry.
20011 Authentication failed Signature verification failed: wrong secret, modified parameters, or an expired timestamp. Regenerate the signature with your APPSECRET, and make sure the timestamp is still valid and that the exact parameters were signed.
20020 Forbidden Authenticated but not allowed: the project has not enabled this service, or the account is restricted by policy. Make sure the project has enabled this service; contact the administrator if the problem persists.
20030 Resource not found The requested path does not exist, or the referenced resource does not exist. Double-check the request URL and the resource ID.
20040 Too many requests Too many requests in a short time (for example, repeated login failures temporarily locked the account). Slow down and retry later.
20041 Method not allowed The endpoint does not support this HTTP method. Use the method shown in the docs (GET / POST, etc.).

Business logic errors

Status Code Meaning When it happens What to do
30001 Business rule restricted A business rule was violated — e.g. the current account state does not allow this action. Follow the returned msg; if it is an account restriction, contact the administrator.
30002 Operation not allowed in the current state The object's current state does not allow this action. Adjust the object state as prompted, then retry.
30004 Service under maintenance This service is under maintenance; requests to it are blocked. Retry later, or watch the service announcements.
30005 Service taken offline This service has been taken offline. Switch to another available service or channel.
30006 Service under development This service is still under development and not yet available. Wait until the service goes live.
30012 额度不足 The project has reached its daily / monthly call quota. Wait for the quota period to reset, or contact the administrator to adjust the quota.

Third-party / external service errors

Status Code Meaning When it happens What to do
40001 External API call failed The platform failed to call an upstream third-party service (upstream error or network issue). Retry later; if it keeps failing, report it and we will investigate the upstream link.

Internal server errors

Status Code Meaning When it happens What to do
50001 Internal server error The server hit an unexpected internal error. Retry later; if it keeps failing, report it.
50002 Service unavailable The service is temporarily unavailable (maintenance or overload). Retry later.

Unknown error

Status Code Meaning When it happens What to do
99999 Unknown error An unclassified error occurred. Retry later; if it keeps failing, report it.

If you hit a status code not listed here, report it to us together with your request parameters and the returned msg.

XiaoYingAPI · Unified API Aggregation Service