# 附录1:全局错误码

# 说明

每次调用接口时,可能获得正确或错误的返回码,企业可以根据返回码信息调试接口,排查错误。

注意:开发者的程序应该根据 code 来判断出错的情况,而不应该依赖 message 来匹配,因为 message 可能会调整。 如果请求的参数不符合json规范,可能会导致 CJ 服务器解析到的参数不完整,此时接口在返回的 message 里会有 “The request parameter is not in a correct JSON format”,开发者需要重新检查请求参数的json合法性。

# 错误码说明

返回码 错误说明 排查方法
200 Success Success
1600000 System busy, please contact CJ IT 服务器暂不可用,建议稍候重试。建议重试次数不超过3次。
1600001 Invalid API key or access token. How to get access token: https://developers.cjdropshipping.cn/en/api/api2/api/auth.html#_1-1-get-access-token-post 获取新的Access Token, 查阅文档
1600002 access token cannot be empty 传入正确的Access Token
1600003 Invalid Refresh token 检查Refresh token或是获取新的Access Token
1600031 Invalid platform token 传入正确的platform Access Token
1600030 token invalidation fail 获取新的Access Token, 查阅文档
1600004 Authorization failed, Please check cj account 请检查您的电子邮件和API Key是否正确,或者您的API商店是否已授权
1600005 Email or password wrong, please check and try again 请检查您的电子邮件和API Key是否正确,或者您的API商店是否已授权
1600006 Developer account not found 请检查您的电子邮件和API Key是否正确,或者您的API商店是否已授权
1600007 The user has been bound to another developer account 用户已绑定其他开发者账号
1600008 Authorization failed, Please check cj account 请检查您的电子邮件和API Key是否正确,或者您的API商店是否已授权
1600009 Token exchange failed because the code does not exist. 令牌交换失败,因为代码不存在
1600010 RedirectUri must be not empty. RedirectUri 不能为空.
1600011 CallbackUri must be not empty. CallbackUri 不能为空.
1600012 The account creation authorization has been disabled, and cj authorization cannot be created. Contact the CJ account manager. 帐户创建授权已禁用,无法创建cj授权。联系CJ客户经理。
1600013 Store info does not exist,please check and try again. 请检查您的电子邮件和API Key是否正确,或者您的API商店是否已授权
1600100 Interface is offline 接口已经下线,请检查文档,使用正确的API
1600101 Interface not found 接口不正在,请检查文档,使用正确的API
1600200 Too much request{param} 调整您的请求速度,以实现更顺畅的分发. 参考:访问频率限制
1600201 Quota has been used up 调整您的请求速度,以实现更顺畅的分发. 参考:访问频率限制
1600300 Param error 检查文档,传入正确的参数.
1600301 Read timed out 请求超时,等待一段时间再重试.
1601000 User not found 请检查您的电子邮件和API Key是否正确,或者您的API商店是否已授权
1602000 Variant not found 未找到变体,请检查变体ID是否正确
1602001 Product not found 未找到商品,请检查商品ID是否正确
1602002 Product has been removed from shelves 订单支付失败,库存抵扣失败,请联系CJ客服
1602003 Variant has been removed from shelves 变体已经下架
1602004 Failed to create infringement report 创建侵权报告失败
1603000 Order create fail 订单创建失败
1603001 Order confirm fail 订单确认失败
1603002 Order delete fail 订单删除失败
1603003 Order exist, please do not duplicate create 订单号已存在,请勿重复创建
1603100 Order not found, please check the CJ order id 未找到订单,请检查订单id是否正确
1603101 Order pay fail, please contact CJ Agent 订单支付失败,请联系CJ客服
1603102 Inventory deduction fail, please contact CJ Agent 订单支付失败,库存抵扣失败
1604000 Balance is insufficient 余额不足
1604001 The balance payment function is temporarily restricted. Please log in to My CJ and make the order payment on the page 临时限制余额支付功能,请登录My CJ在页面进行订单支付
1605000 Logistic not found 未找到物流
1605001 Logistic invalid, please reference freight calculate. 物流无效,请参考运费计算。
1605002 country code not found 国家码没有发现
1606000 Webhook setting add fail, Webhook already have settings Webhook 设置失败,原因:Webhook 已经设置
1606001 You do not meet our service requirements, Please check and try again. 1.Request Protocols: HTTPS, 2. Request Method: POST, 3.Content-Type: application/json, 4. Response Status Code: 200, 5. Response must be returned within 3 seconds. 调整后再重试
1607000 You do not meet our service requirements, Please check and try again. 1.Request Protocols: HTTPS, 2. Request Method: POST, 3.Content-Type: application/json, 4. Response Status Code: 200, 5. Response must be returned within 3 seconds. 调整后再重试
1607001 Please do not use domain names such as localhost, 127.0.0.1 调整后再重试
1607002 Webhook url error, Please ensure URL starts with https:// Webhook URL 错误, 请确保URL以https://开头
1607003 Webhook url error, Http Status must be 200 Webhook URL 错误, 请求状态码必须是200
16070002 The CJ page type is not supported CJ跳转页面类型不支持
1607004 Freight calculation request failed 运费运算请求错误
1607006 Query dispute product request failed 纠纷商品查询请求错误
1607007 dispute confirm fail 纠纷确认请求错误
1607008 dispute create fail 纠纷创建失败
1607009 dispute cancel fail 纠纷取消失败
1607010 product update fail 商品更新失败
16900202 Request method '{param}' not supported 检查文档,使用正确的HTTP方法
16900203 Content type not supported[{param}] 检查文档,使用正确的Content-Type
16900204 Required request body is missing 检查文档,传入HTTP Body
16900205 The request parameter is not in a correct JSON format 检查请求body是不是正确的JSON格式
16900403 {param} can not be empty 检查文档,传入正确的参数

# 排查方法

# 错误码:1600200

接口调用超过限制。

  1. 具体频率策略,参考:访问频率限制
  2. 频率拦截时长一般与调用的限制时长相同,比如说是分钟级别的限制,则在中频率后的1分钟后自动解除。小时、天、以及月份,也是以此类推。
  3. 我们对接口调用的频率限制是比较宽松的。对于接口中频率的调用,考虑以下优化:
  • 接口实现时,仅系统失败需要重试。其余错误码,应该排查下调用失败原因
  • 合理调用,对于实时同步数据,可改为准实时,调用是有延迟的,单个用户一天大量的调用,体验是不好的

# 错误码:1600300

传递参数不符合系统要求,需要参照具体API接口说明。同时确认:

  • 1)Http请求方法,是否正确。比如说接口要求以Post方法,就不能使用Get方式
  • 2)Http请求参数,是否正确。比如说,接口内容要求json结构体,就不能以url参数传递或者form-data方式。