Returned Results

更新时间:2022-01-07 14:53:24

For all API interfaces, take the json format as an example, and return the content in the following format. Return
when successful

parameter nameTypes ofdescription
codeint200, indicating that the request was successful
messagestringRequest succeeded
dataobjThe data returned when the request is successful, if the request fails, this field is empty

E.g:

{
	"code": 200,
	"message": "操作成功",
	"data": {
		"taskId": "b123456789012345678912",
		"transNo": "a123456789012345678912"
	}
}

Return on failure

parameter nameTypes ofdescription
codeintRequest failed error response code
messagestringRequest failed message

E.g:

{
    "code": 1000,
    "message": "参数错误"
}

At the same time, return the server to generate a unique request identifier in the response header

parameter nameTypes ofdescription
X-WS-RequestIdstringRequest a unique identifier to facilitate troubleshooting

E.g

Response Headers

  X-WS-RequestId: 3728d44912a711e4348190e221012d52

Public error code

error codedescription
200Successful operation
300Operation failed, please contact the administrator
900System abnormal
1000Parameter error
1001token error
1002timeStamp, token, userId cannot be empty
1003The userId is entered incorrectly
1004Parameter error, please make sure all required fields have been filled in
1006Wrong request
1008No permission to request on-demand api
1010Please pass in the correct timeStamp
1011timeStamp is more than 5 minutes valid, please re-enter
1012The parameter value is out of the legal range
1013Illegal format parameter
4001Authentication parameter error, please check whether all required parameters have passed values
4002X-WS-AccessKey parameter error, please check whether the key exists, whether there are fewer or more characters copied
4003X-WS-Timestamp parameter error, the time format is second-level timestamp
4004X-WS-Timestamp expires, and the time difference between the time when the server receives the request and the server receives the request must not exceed five minutes
4005host parameter error, please check
4006The content-type parameter is wrong, please check
4007Authentication failed, please check whether the parameters are correct
4008Authentication failed, please check whether the signature calculation is wrong, or the signature does not match the actual content sent, it may also be caused by an error in the key AccessKey Secret
4009The signature has been used, please regenerate the authentication parameters
4021API authentication parameter error
4022API authentication operation failed
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!