Help Center/ Cognitive Engagement Center/ API Reference/ Call Center Configuration Interface Reference/ Number Management/ Querying the Binding Relationships Between Access Codes, Skill Queues, and IVR Flows (queryCalledRoute)
Updated on 2023-09-27 GMT+08:00

Querying the Binding Relationships Between Access Codes, Skill Queues, and IVR Flows (queryCalledRoute)

Scenario

Query the binding relationships between access codes, skill queues, and IVR flows.

Method

POST

URI

https://Domain name/apiaccess/rest/cc-management/v1/calledRoute/queryCalledRoute. For example, the domain name is service.besclouds.com.

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

X-APP-Key

String

No

App key field, which is the user ID. Contact the operation personnel to obtain the app key.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

accessCode

String

No

Access code.

1.2

extCode

String

No

Extension code.

1.3

devicetype

Integer

No

Device type.

1: skill queue

3: IVR

1.4

deviceDesc

String

No

Device name (skill queue or IVR name). Fuzzy match is supported.

1.5

mediaTypeId

Integer

No

Media type.

2: click-to-dial

5: audio and video

18: video click-to-dial

19: video

53: multimedia

1.6

limit

Integer

No

Number of records on each page. The value ranges from 0 to 100. The default value is 100. If the value exceeds 100, 100 records are displayed on each page by default.

1.7

offset

Integer

No

Parameter for determining the start page of the query. The value range of offset is as follows: Value of offset = Value of limit x (Page – 1). "Page" indicates the start page for query The default value of offset is 0. If a negative value is entered, 0 is used.

Response Description

  • Status code: 200
    Table 3 Response body parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1.1

    returnCode

    String

    No

    Result code.

    0: success

    Other values: failure

    1.2

    description

    String

    No

    Description.

    1.3

    data

    Object

    No

    -

    1.3.1

    total

    Integer

    No

    Total number.

    1.3.2

    calledRouteList

    Array (object)

    No

    Called party list.

    1.3.2.1

    extCode

    String

    No

    Extension code.

    1.3.2.2

    editable

    String

    No

    0 or null: editable and deletable

    1: cannot be edited but can be deleted

    2: cannot be deleted

    3: cannot be edited or deleted

    1.3.2.3

    accessCode

    String

    No

    Access code.

    1.3.2.4

    dnid

    Number

    No

    Configuration ID.

    1.3.2.5

    id

    String

    No

    Called party ID (primary key ID of the table).

    1.3.2.6

    deviceId

    Number

    No

    Current device ID.

    1.3.2.7

    devicetype

    Number

    No

    Device type.

    1: skill queue

    3: IVR

    1.3.2.8

    deviceDesc

    String

    No

    Destination device description.

    1.3.2.9

    mediatypeId

    Number

    No

    Media type.

    2: click-to-dial

    5: audio and video

    18: video click-to-dial

    19: video

    53: multimedia

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 403

    Authentication fails.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

Request header:

Content-Type:application/json
Authorization:Bearer XXXXXXXXXXXXXXXXXXXXXXX
X-APP-Key:XXXXXXXXXXXXXXXXXXXXXXX

Request parameters:

{
    "accessCode": "9911411",
    "extCode": "11",
    "devicetype": 1,
    "deviceDesc": "defaultVideoSkill",
    "mediatypeId": 19,
    "limit":10,
    "offset":0
}

Response parameters:

{
    "returnCode": "0",
    "data": {
        "total": 3,
        "calledRouteList": [
            {
                "id": "1125397061153369092",
                "dnid": 3,
                "accessCode": "9911411",
                "mediatypeId": 19,
                "extCode": "11",
                "devicetype": 1,
                "deviceId": 1,
                "deviceDesc": "defaultVideoSkill",
                "editable": "0"
            },
            {
                "id": "1127983948544239618",
                "dnid": 1,
                "accessCode": "9911411",
                "mediatypeId": null,
                "extCode": "",
                "devicetype": 1,
                "deviceId": 1,
                "deviceDesc": "defaultVideoSkill",
                "editable": "0"
            },
            {
                "id": "1127986019188238339",
                "dnid": 2,
                "accessCode": "9911411",
                "mediatypeId": 19,
                "extCode": "1",
                "devicetype": 1,
                "deviceId": 1,
                "deviceDesc": "defaultVideoSkill",
                "editable": "0"
            }
        ]
    },
    "description": "success"
}