Updated on 2024-09-26 GMT+08:00

Returned Values

Status Code

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

A status code, a group of digits ranging from 1xx to 5xx, indicates the status of a response. For more information, see Status Code.

If 204 is returned for calling the API used to create a customer, the request is successful.

Response Header

Similar to a request, a response also has a header, for example, Content-Type.

Figure 1 shows the response header for the API used to create a customer.

Figure 1 Response header for the API used to create a customer

(Optional) Response Body

The body of a response is often returned in structured format (for example, JSON or XML) as specified in the Content-Type header field. The response body transfers content except the response header.

The following is part of the response body for the API used to create a customer:

1
2
3
4
5
6
7
8
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
    "domain_id": "08f25edee500d3e70f4ec007d082eb80",
    "domain_name": "testdomainnamexxx"
}

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

1
2
3
4
{
    "error_msg": "The name exists.cse://CBCCustomerRegService/rest/cbc/cbccustomerregservice/v1/customer/register[error_code]:CBC.7156[msg]:{\"error_code\":\"CBC.7156\",\"error_msg\":\"domainName exist.\"} ",
    "error_code": "CBC.99000038"
}

In the preceding information, error_code is an error code, and error_msg describes the error.