Common Response Structure¶
| Field | Type | Description |
|---|---|---|
| code | Number | Returned status code, identical to the HTTP status code; always 200 when no error occurs |
| content | String, Number, Array, Boolean, JSON | Returned data. The specific data type returned depends on the business logic of the actual API |
| pageInfo | JSON | Pagination information in the response of all list APIs |
| pageInfo.count | Number | Number of records on the current page |
| pageInfo.pageIndex | Number | Page number |
| pageInfo.pageSize | Number | Number of records per page |
| pageInfo.totalCount | Number | Total number of records that match the conditions |
| errorCode | String | Returned error status code; empty means no error |
| message | String | Detailed description corresponding to the returned error code |
| success | Boolean | Whether the API call succeeded: true for success, false for failure |
| traceId | String | traceId, used to trace each request |
Example Success and Failure Responses¶
Success response:
{
"code": 200,
"content": {},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-XXXX"
}
Failure response (incorrect JSON format in the request):