Updated on 2023-09-27 GMT+08:00

Querying the Definitions of Outbound Call Business Results

Prerequisites

You have applied for a developer account.

Scenario

This interface is invoked to query the definitions of outbound call business results in a specified VDN.

Method

This interface supports only the GET method.

URI

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/queryBusinessResults?pageSize={pageSize}&pageNum={pageNum}

In the URL, ip indicates the IP address of the CC-iSales server, and port indicates the HTTPS port number of the CC-iSales server.

Table 1 Parameters in the URL

No.

Parameter

Type

Mandatory or Not

Description

1

vdnId

Integer

Yes

VDN ID.

The value is an integer ranging from 1 to 9999.

2

pageSize

Integer

Yes

Number of data records on each page in the pagination query result.

The value ranges from 1 to 50.

3

pageNum

Integer

Yes

Current page number.

The value is a positive integer.

Request Description

Table 2 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

The value is fixed to application/json; charset=UTF-8.

2

Authorization

String

Yes

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

No request body exists.

Response Description

Table 3 Response body parameters

No.

Parameter

Type

Description

1

resultCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 6.

2

resultDesc

String

Description.

3

returnCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 6.

4

returnDesc

String

Description.

5

data

JSONArray

Result in JSON format. For details, see Table 4.

6

totalCount

Long

Total number of records in the returned list.

Table 4 Parameter description of data

No.

Parameter

Type

Description

5.1

name

String

Business result name.

5.2

code

String

Business result code.

5.3

defLevel

String

Business result level. The value 1 indicates the parent business result and the value 2 indicates the subbusiness result.

5.4

children

List

Subbusiness result.

For details about the parameters of this object, see Table 5.

Table 5 Parameter description of children

No.

Parameter

Type

Description

5.4.1

name

String

Subbusiness result name.

5.4.2

code

String

Subbusiness result code.

5.4.3

defLevel

String

Business result level. The value 1 indicates the parent business result and the value 2 indicates the subbusiness result.

Triggered Event

None

Error Codes

Table 6 Error code description

No.

Error Code

Description

1

0200001

Parameter error. For details about the error, see resultDesc.

2

0200005

Parameter error. For details about the error, see resultDesc.

3

0200007

Parameter error. For details about the error, see resultDesc.

4

02000001

Empty parameter.

5

02000002

The parameter contains invalid characters.

6

02000003

The parameter length cannot exceed the maximum length.

7

02000004

The parameter length cannot be less than the minimum length.

8

02000005

The parameter length must be within the specified range.

9

02000006

Incorrect parameter type.

10

02000007

Incorrect parameter value.

11

02000008

Parameter conversion error. Check the request parameters.

12

02000009

Incorrect parameter combination. Check the request parameters.

13

02000010

The hour and minute parameters must be set at the same time.

14

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the response body of this interface:
    {
      "returnCode": "0200000",
      "data": [
        {
          "code": "11111",
          "children": [
            {
              "code": "12324",
              "name": "sub02",
              "defLevel": "2"
            },
            {
              "code": "1232",
              "name": "sub01",
              "defLevel": "2"
            }
          ],
          "name": "test111",
          "defLevel": "1"
        },
        {
          "code": "test",
          "children": [],
          "name": "test0903",
          "defLevel": "1"
        },
        {
          "code": "15105671",
          "children": [
            {
              "code": "754646",
              "name": "Call interrupted",
              "defLevel": "2"
            },
            {
              "code": "ob-12",
              "name": "Multiple local officials",
              "defLevel": "2"
            }
          ],
              "name": "Failed 4up",
          "defLevel": "1"
        }
      ],
      "resultCode": "0200000",
      "resultDesc": "queryBusinessResults Success!",
      "totalCount": 3,
      "returnDesc": "queryBusinessResults Success!"
    }