Updated on 2022-10-29 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.

For UAE ID Card OCR, the response body is as follows:

{
    "result": {
        "side": "front",
        "id_number": "784-XXXX-XXXXXXX-X", 
        "name": "XXX",     
        "name_arabic": "XXX",
        "nationality": "Egypt", 
        "nationality_arabic": "مصر",
        "confidence": { 
            "id_number": 0.9712, 
            "name": 0.9731,
            "name_arabic": 0.9234,
            "nationality": 0.9543
            "nationality_arabic": 0.9543,
        }
    }
}

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.