최신 업데이트:2023-02-28 17:05:57
For all API interfaces, take the json format as an example, and return the content in the following format. Return
when successful
parameter name | Types of | description |
---|---|---|
code | int | 200, indicating that the request was successful |
message | string | Request succeeded |
data | obj | The 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 name | Types of | description |
---|---|---|
code | int | Request failed error response code |
message | string | Request 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 name | Types of | description |
---|---|---|
X-WS-RequestId | string | Request a unique identifier to facilitate troubleshooting |
E.g
Response Headers
X-WS-RequestId: 3728d44912a711e4348190e221012d52
error code | description |
---|---|
200 | Successful operation |
300 | Operation failed, please contact the administrator |
900 | System abnormal |
1000 | Parameter error |
1001 | token error |
1002 | timeStamp, token, userId cannot be empty |
1003 | The userId is entered incorrectly |
1004 | Parameter error, please make sure all required fields have been filled in |
1006 | Wrong request |
1008 | No permission to request on-demand api |
1010 | Please pass in the correct timeStamp |
1011 | timeStamp is more than 5 minutes valid, please re-enter |
1012 | The parameter value is out of the legal range |
1013 | Illegal format parameter |
4001 | Authentication parameter error, please check whether all required parameters have passed values |
4002 | X-WS-AccessKey parameter error, please check whether the key exists, whether there are fewer or more characters copied |
4003 | X-WS-Timestamp parameter error, the time format is second-level timestamp |
4004 | X-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 |
4005 | host parameter error, please check |
4006 | The content-type parameter is wrong, please check |
4007 | Authentication failed, please check whether the parameters are correct |
4008 | Authentication 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 |
4009 | The signature has been used, please regenerate the authentication parameters |
4021 | API authentication parameter error |
4022 | API authentication operation failed |