更新时间:2026-07-31 GMT+08:00
分享

查询呼叫规则列表接口

场景描述

通过此接口可以查看租户配置的呼叫规则。

使用说明

  • 前提条件
    • 有对应的Ak/Sk鉴权权限。
    • 已经申请了开发者账号。

接口方法

该接口仅支持GET方法。

接口URL

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/callRule/query?id={id}&name={name}&ruleType={ruleType}&status={status}

其中,ip为CC-iSales服务器地址,port为CC-iSales服务器的HTTPS端口号。

表1 URL中携带的参数说明

序号

参数名

参数类型

是否必选

说明

1

vdnId

int

True

虚拟呼叫中心ID。

取值的类型为整数,取值范围为1~9999。

2

id

String

False

规则ID

3

name

String

False

规则名称,支持模糊匹配。

4

ruleType

String

False

规则类型

interval:呼叫间隔

time:呼叫次数

abnormal:异常呼叫管控

calledPrefix:被叫号码字冠限制规则

5

status

String

False

规则状态

0:无效

1:有效

请求说明

表2 请求消息头参数

序号

名称

参数类型

是否必选

说明

1

Content-Type

String

True

固定填 application/json; charset=UTF-8。

2

Authorization

String

True

生成方式参见C2 监控/系统外呼/话单/知识库类接口鉴权方式

3

locale

String

False

i18n(internationalization,国际语言代码),如zh_CN表示中文、en_US表示英文等,默认zh_CN。

响应说明

表3 消息体参数说明

序号

参数名

参数类型

说明

1

resultCode

String

原因码。0200000表示成功,其他表示失败。

具体见下表5 错误原因码说明错误原因码说明。

2

resultDesc

String

描述。

3

returnCode

String

原因码。0200000表示成功,其他表示失败。

具体见表6

4

returnDesc

String

描述。

5

data

List

数据。

表4 data参数说明

序号

参数名

参数类型

说明

1

id

String

规则ID

2

name

String

规则名称

3

scope

String

  • 1:租户级
  • 2:活动级

4

channel

String

voice:语音.

5

type

String

类型:

  • interval:呼叫间隔
  • time:呼叫次数
  • abnormal:异常呼叫管控
  • calledPrefix:被叫号码字冠限制规则

6

status

String

规则状态

0:无效

1:有效

7

ruleValue

JSON

规则详情,JSON格式字符串

8

createTime

String

创建时间,租户时区创建时间格式字符串,格式:yyyy-MM-dd HH:mm:ss

表5 当type=interval,ruleValue参数说明

序号

参数名

参数类型

说明

1

interval

int

间隔时长,单位分钟

表6 当type= time,ruleValue参数说明

序号

参数名

参数类型

说明

1

duration

String

单位,day:天

2

frequency

int

最大呼叫次数

表7 当type=abnormal,ruleValue参数说明

序号

参数名

参数类型

说明

1

callCount

int

呼叫数量

2

triggerTimes

int

连续触发次数

3

period

int

统计周期,单位分钟

4

failRate

int

失败率,百分比

5

stopTask

boolean

是否暂停活动

6

failCodeList

List<String>

错误码

表8 当type= calledPrefix,ruleValue参数说明

序号

参数名

参数类型

说明

1

prefix

String

被叫字冠

错误结果码

表9 错误原因码说明

序号

错误码

说明

1

0200001

参数异常,异常详情在resultDesc中描述。

2

02000001

参数值为空

3

02000002

参数包含非法字符

4

02000007

参数值大小不正确

报文样例

  • 当type=calledPrefix响应消息体举例如下:
    {
        "returnCode": "0200000",
        "data": [
            {
                "ruleValue": {
                    "prefix": "6666,7777,8888,9999"
                },
                "createTime": "2026-02-04 01:37:35",
                "scope": "1",
                "name": "111",
                "channel": "voice",
                "id": "177014025508577446486176011880",
                "type": "calledPrefix",
                "status": "1"
            }
        ],
        "resultCode": "0200000",
        "resultDesc": "query CallRule Success",
        "returnDesc": "query CallRule Success"
    }
  • 当type=abnormal响应消息体举例如下:
    {
        "returnCode": "0200000",
        "data": [
            {
                "ruleValue": {
                    "failCodeList": [
                        "00003",
                        "90008",
                        "90011"
                    ],
                    "period": 3,
                    "stopTask": true,
                    "failRate": 60,
                    "callCount": 10,
                    "triggerTimes": 2
                },
                "createTime": "2026-01-27 10:26:01",
                "scope": "1",
                "name": "异常呼叫管控默认规则",
                "channel": "voice",
                "id": "176948076125716703297080100598",
                "type": "abnormal",
                "status": "1"
            }
        ],
        "resultCode": "0200000",
        "resultDesc": "query CallRule Success",
        "returnDesc": "query CallRule Success"
    }
  • 当type=time响应消息体举例如下:
    {
        "returnCode": "0200000",
        "data": [
            {
                "ruleValue": {
                    "duration": "day",
                    "frequency": 2
                },
                "createTime": "2026-02-03 16:13:57",
                "scope": "1",
                "name": "111111",
                "channel": "voice",
                "id": "177010643706585425015456079223",
                "type": "time",
                "status": "0"
            }
        ],
        "resultCode": "0200000",
        "resultDesc": "query CallRule Success",
        "returnDesc": "query CallRule Success"
    }
  • 当type=interval响应消息体举例如下:
    {
        "returnCode": "0200000",
        "data": [
            {
                "ruleValue": {
                    "interval": 1
                },
                "createTime": "2026-02-02 16:59:42",
                "scope": "1",
                "name": "告警规则",
                "channel": "voice",
                "id": "177002278261850815775053988583",
                "type": "interval",
                "status": "0"
            }
        ],
        "resultCode": "0200000",
        "resultDesc": "query CallRule Success",
        "returnDesc": "query CallRule Success"
    }

相关文档