Updated on 2023-12-18 GMT+08:00

Response

Status Code

After sending a request, you will receive a response, including a status code, response header, and response body.

A status code consists of multiple digits, which indicates the response status of a request. If the 2xx status code is returned, the API is called successfully. For details about the status code list, see Status Codes.

Response Header

Similar to a request, a response also has a header, for example, Content-Type. Table 1 lists the fields in the response header.

Table 1 Response Header

Field

Description

Content-Length

Length of the response body. The unit is byte.

Date

Time when a request response is returned

Content-Type

MIME type of the response body

Response Body

The body of a response is returned in structured format as specified in the Content-Type header field. The response body transfers all content except the response header.

If an error occurs during API calling, an error code and a message will be displayed. The following shows an error response body.

{
    "error_code": "AIS.0103", 
    "error_msg": "The image size does not meet the requirements." 
}

In the response body, error_code indicates the error code, and error_msg provides information about the error.