Skip to content

Common Response Structure


Field Type Description
code Number Status code in the response. The following example is a standard JSON response; for APIs such as downloads, refer to the documentation for each page.
content String, Number, Array, Boolean, JSON The returned data. The actual type of data returned depends on the business logic of the specific API.
pageInfo JSON Returned when the API provides pagination; for the exact hierarchy, refer to the documentation for each API.
pageInfo.count Number Number of records on the current page
pageInfo.pageIndex Number Page number
pageInfo.pageSize Number Page size
pageInfo.totalCount Number Total number of matching records
errorCode String Returned error status code; empty means no error
message String Specific message 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

Success and Failure Response Examples

Success response:

{
    "code": 200,
    "content": {},
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}

Failure response (invalid request JSON format):

{
    "code": 400,
    "content": {"reason": "Expecting value", "line": 1, "column": 10},
    "errorCode": "ft.RequestJsonFormatError",
    "message": "请求 JSON 格式错误",
    "success": false,
    "traceId": "TRACE-XXXX"
}

Feedback

Is this page helpful?