## 接口说明

本接口用于获取目标业务可用的风险标签列表信息。根据业务编号查询该业务下所有可用的风险标签,包括 SKU通用、平台通用、行业通用、产品私有、业务私有等多个维度的标签。

### 鉴权说明

易盾智能风控服务使用签名认证方法对接口进行鉴权,所有接口每一次请求都需要包含签名信息(signature 参数),以验证用户身份,防止信息被恶意篡改。目前支持MD5签名算法,详细信息请参见[接口鉴权](https://support.dun.163.com/documents/761315885761396736?docId=771165928044277760)。

### 接入须知

控制接口调用频率,频率过快可能会被拒绝,拒绝后稍后重试即可。

&nbsp;
## 标签查询接口请求说明

### 请求地址

| 名称        | 值                                                                                    |
| ----------- |--------------------------------------------------------------------------------------|
| HTTP URL    | [http://ir-open.dun.163.com/v5/risk/tagList](http://ir-open.dun.163.com/v5/risk/tagList) |
| HTTP Method | POST                                                                                 |

### 请求头
| 名称         | 类型   | 必填 | 描述                                    |
| ------------ | ------ | ---- | --------------------------------------- |
| Content-Type | String | 是   | 固定值："Content-Type:application/json" |


### 请求参数

请求参数分为:公共参数,接口参数。其中,公共参数请见[公共请求参数](https://support.dun.163.com/documents/761315885761396736?docId=771155891167080448)；接口参数如下:

本接口仅需公共参数,无额外接口参数。


| 参数             | 类型   | 必填 | 描述                                                                                   |
| ---------------- | ---- |----|:-------------------------------------------------------------------------------------|
| businessId | String | 是  | 业务编号                                                                                |
| timestamp           | Long | 是  | 当前时间戳(毫秒)                                                                              |
| nonce             | String | 是  | 随机字符串                                                                              |
| version   |    String        | 是  | 版本号,固定值 "500"                                                            |
| secretId   |    String        | 是  | 密钥ID                                                            |
| signature   |    String        | 是  | 签名                                                            |

### 请求参数示例

```json
{
    "businessId": "xxx966f73yyy59440583zzz9bfcc79df",
    "secretId": "nnn966f73yyy59440583zzz9bfcc79dc",
    "timestamp": ${currentTimeMs},
    "nonce": "mmm888f73yyy59440583zzz9bfcc79de",
    "version": "500",
    "signature": "lll888f73yyy59440583zzz9bfcc79da"
}

```

## 响应

### 响应结果

响应数据格式为:JSON。

响应头为:Content-Type:application/json,具体如下:

| 参数 | 类型    | 描述                                                                                                                   |
| ---- | ------- |----------------------------------------------------------------------------------------------------------------------|
| code | Integer | 响应码,正常情况下为200,异常时,见 [附录响应码定义](https://support.dun.163.com/documents/761315885761396736?docId=771158735672750080)     |
| msg  | String  | 响应码说明,正常情况下返回"成功",异常时,见 [附录响应码定义](https://support.dun.163.com/documents/761315885761396736?docId=771158735672750080) |
| ok | Boolean | 请求是否成功，true=成功 |
| data | Array | 返回data数据,标签列表数组,格式下表说明                                                                                                      |

返回标签数据的格式:

| 参数    | 类型          | 说明              |
|-------|-------------|-----------------|
| firstLevelTagName | String        | 一级分类名称           |
| secondLevelTagName  |  String    | 二级分类名称 |
| type |     String       |      标签类型(Type)         |
| name |    String        |     标签名称          |
| description |      String      |       标签描述       |
| suitableScope   |    String        |      适用范围,格式示例:"全局" / "平台:Android" / "行业:游戏" / "产品:xxxxx" / "业务:xxxxx"         |
| createTime |      Long      |      创建时间(毫秒时间戳)         |
| updateTime |    Long        |      最后修改时间(毫秒时间戳)         |


### 响应结果示例

```json
{
    "code": 200,
    "msg": "成功",
    "data": [
        {
            "firstLevelTagName": "业务风险",
            "secondLevelTagName": "账号风险",
            "type": "1240001",
            "name": "账号异常登录",
            "description": "账号在短时间内异地登录或异常设备登录",
            "suitableScope": "全局",
            "createTime": 1709709416661,
            "updateTime": 1709709416661
        },
        {
            "firstLevelTagName": "业务风险",
            "secondLevelTagName": "欺诈风险",
            "type": "124002",
            "name": "恶意刷单",
            "description": "用户通过虚假交易进行欺诈行为",
            "suitableScope": "平台:Android",
            "createTime": 1709709907287,
            "updateTime": 1709709907287
        }
    ],
    "ok": true
}

```


### 响应返回码

响应返回码见:[响应返回码](https://support.dun.163.com/documents/761315885761396736?docId=771158735672750080)