Response Results

After you make a request, Yeastar Partner Portal API will return a result in JSON format, which includes the response status code, request ID, and potentially a response body.

Success response example

A successful response consists of the following parameters:

Parameter Type Description
code String The response message of the API request.

For a successful request, this parameter returns success.

detailMessage String The detailed error information.

For a successful request, this parameter returns empty.

requestId String The unique ID of the request, which can be used to quickly locate the request.
result Object The detailed information that is requested by the API call.
status Integer The HTTP status code of the API request.

Success response example

A response example of Query Order List is shown below.
{
    "code": "success",
    "detailMessage": "",
    "requestId": "7249dc2422a5b3192c06b00fa77d31a2",
    "result": {
        "count": 117,
        "pageNo": 1,
        "pageSize": 3,
        "results": [
            {
                order details
            },
            {
                order details
            },
            {
                order details
            }
        ],
        "total": 117,
        "totalPage": 39
    },
    "status": 200
}

Error response example

An error response consists of the following parameters:
Parameter Type Description
code String The response message of the API request.

For a failed API request, this parameter returns the error message.

detailMessage String The detailed description of the error.
requestId String The unique ID of the request, which can be used to quickly locate the request.
result Object Further description of the error.

This parameter provides specific details such as field name, validation tag etc., to help developers understand the details of the error.

status Integer The HTTP status code of the API request.

Error response example

{
    "code": "parameter_validation_failed",
    "detailMessage": "org.springframework.validation.BeanPropertyBindingResult: 1 errors\nField error in object 'openLoginRequest' on field 'grant_type': rejected value [null]; codes [NotBlank.openLoginRequest.grant_type,NotBlank.grant_type,NotBlank.java.lang.String,NotBlank]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [openLoginRequest.grant_type,grant_type]; arguments []; default message [grant_type]]; default message [grant_type is blank]",
    "requestId": "33246203505cfc1ca49f3fc8b0861a11",
    "result": [
        {
            "field": "grant_type",
            "validTag": "NotBlank",
            "validValue": "grant_type is blank",
            "value": null
        }
    ],
    "status": 422
}