流程说明:
 1、请先联系商务开通"深度接口账号"才能使用本目录下所有接口。
2、添加子账号→激活得到API账号(API账号是发送接口里使用的)
作用说明:可以通过接口灵活分配额度给子账号,包括新建子账号。
1、添加子账号
1.1 请求地址
- 请求方式:post
- Content-Type:application/x-www-form-urlencoded
- 请求地址:https://api.chuanglan.com/api/apis/subaccount/add
1.2 请求参数
| 参数名 | 类型 | 是否必传 | 描述 | 
|---|
| username | string | 是 | 深度接口账号名,由创蓝商务提供。 示例:13899999999 | 
| timestamp | string | 是 | 时间戳(10 位) | 
| signature | string | 是 | 标准的 MD5 加密(32 位小写值),例如 signature=md5(userName+password+timestamp) 两边通过相同的签名进行校验 | 
| appid | Integer | 是 | 产品类型,选择需要授信的API账号类型,发短信的接口会用到。通知账号=49;会员营销账号=52;验证码账号=153;BK账号=126;DK账号=119;HK账号=151,如需使用多个产品账号,请一次性授权所有类型账号,格式为:49,52,153 | 
| product_permit_pay | string | 是 | 设置子账号的扣款类型,格式为产品 id:扣款类型,如49:1代表依附到主账号计费,49:0代表子账号独立计费。设置多个账号的计费方式格式:49:1,52:1,153:1 | 
| use_type | string | 是 | 用途分类如:0 其它,1web,2app | 
| use_desc | string | 是 | 子账号用途,比如:测试 | 
| name | Integer | 是 | 姓名 | 
| department | string | 是 | 部门或分部名称 | 
| position | string | 是 | 职位 | 
| account_username | String | 是 | 要开通的子账号名称,用做登录名(账号格式为数字,字母,下划线 (至少包含两种) ,6-20位字符) | 
| account_password | String | 是 | 要开通的子账号密码(数字、字母和特殊字符三种组合,6-16位字符) | 
1.3 响应参数
| 参数名 | 类型 | 默认值 | 描述 | 
|---|
| code | string |  | 000000 代表成功,其他代表失败,会有 message 错误信息返回 | 
| status | string |  | 状态说明 success:成功,error:失败 | 
| msg | string |  | 提示信息 | 
| data | object |  | 返回数据 | 
| id | Integer |  | 返回子账号的 id | 
返回数据示例:
{
    "status": "success",
    "data": {
        "source": {
            "code": "01",
            "name": "Web"
        },
        "localIp": "172.16.42.128",
        "id": "257043"
    }
}
1.4 请求示例
{
    "username": "15370796646",
    "signature": "0a922ac5beeb48c7eba9fffec32a6c4e",
    "timestamp": "1659579937",
    "appid":"49,52,153",
    "product_permit_pay": "49:1,52:1,153:1",
    "use_type": "0",
    "use_desc": "测试",
    "name": "AA20220607",
    "department": "测试组",
    "position": "测试人员",
    "account_username": "AA20220607",
    "account_password": "abc123456."
}
2、子账号激活
2.1 请求地址
- 请求方式:post
- Content-Type:application/x-www-form-urlencoded
- 请求地址:https://api.chuanglan.com/api/apis/subaccount/active
2.2 请求参数
| 参数名 | 类型 | 是否必传 | 描述 | 
|---|
| username | string | 是 | 深度接口账号名,由创蓝商务提供。 示例:13899999999 | 
| timestamp | string | 是 | 时间戳(10 位) | 
| signature | string | 是 | 标准的 MD5 加密(32 位小写值),例如 signature=md5(userName+password+timestamp) 两边通过相同的签名进行校验 | 
| appid | Integer | 是 | 产品类型,通知账号=49;会员营销账号=52;验证码账号=153;BK账号=126;DK账号=119;HK账号=151 | 
| account_id | string | 是 | 子账号添加之后返回的 id,在其他接口中写作 sub_id | 
2.3 响应参数
| 参数名 | 类型 | 默认值 | 描述 | 
|---|
| code | string |  | 000000 代表成功,其他代表失败,会有 message 错误信息返回 | 
| status | string |  | 状态说明 success:成功,error:失败 | 
| msg | string |  | 提示信息 | 
| data | object |  | 返回数据 | 
| id | Integer |  | 返回子账号短信产品的 api 账号 id | 
| account_name | string |  | 返回子账号短信产品的 api 账号 | 
| account_password | string |  | 返回子账号短信产品的 api 密码 | 
返回数据示例:
{
    "status": "success",
    "data": {
        "source": {
            "code": "01",
            "name": "Web"
        },
        "localIp": "172.16.42.128",
        "id": "257043",
        "account_name": "N761916_N4563971",
        "account_password": "Y80ME5236Dab6a",
        "api_platform": "6",
        "pay_type": "1"
    }
}
2.4 请求示例
{
    "username": "15370796646",
    "signature": "c369fc987f36b7622f48440f05675f40",
    "timestamp": "1659580595",
    "account_id": "257043",
    "appid": "153"
}
3、子账号查询
3.1 请求地址
- 请求方式:post
- Content-Type:application/x-www-form-urlencoded
- 请求地址:https://api.chuanglan.com/api/apis/subaccount/get
3.2 请求参数
| 参数名 | 类型 | 是否必传 | 描述 | 
|---|
| username | string | 是 | 深度接口账号名,由创蓝商务提供。 示例:13899999999 | 
| timestamp | string | 是 | 时间戳(10 位) | 
| signature | string | 是 | 标准的 MD5 加密(32 位小写值),例如 signature=md5(userName+password+timestamp) 两边通过相同的签名进行校验 | 
| account_id | string | 是 | 子账号添加之后返回的 id,在其他接口中写作 sub_id | 
3.3 响应参数
| 参数名 | 类型 | 默认值 | 描述 | 
|---|
| code | string |  | 000000 代表成功,其他代表失败,会有 message 错误信息返回 | 
| status | string |  | 状态说明 success:成功,error:失败 | 
| msg | string |  | 提示信息 | 
| data | object |  | 返回数据 | 
| account_name | string |  | 返回子账号短信产品的 api 账号 | 
| parent_id | string |  | 主帐号的 ID | 
| account_id | string |  | 子账号 id | 
| use_type | string |  | 用途分类如:0 其它,1web,2app | 
| use_desc | string |  | 子账号用途 | 
| name | string |  | 姓名 | 
| department | string |  | 部门或分部名称 | 
| position | string |  | 职位 | 
| product_permit | string |  | 当前子账号的权限,比如 49,52 表示当前子账号可以使用行业验证码和营销验证码 | 
| product_permit_pay | string |  | 需要设置子账号的扣款类型,格式为产品 id:扣款类型,比如 49:1 代表行业验证码主帐号计费 | 
| create_time | string |  | 创建时间 | 
| platform_accounts | string |  | 当前子账号的 api 账号集合 | 
| appid | string |  | 当前 api 账号的产品 ID | 
| account_name | string |  | 当前 api 账号的名称 | 
返回数据示例:
{
    "status": "success",
    "data": {
        "account_username": "AA20220607",
        "parent_id": "9771",
        "account_id": "257043",
        "use_type": "0",
        "use_desc": "测试",
        "name": "AA20220607",
        "department": "测试组",
        "position": "测试人员",
        "product_permit": "49",
        "product_permit_pay": "49:1",
        "create_time": "1659580292",
        "platform_accounts": [
            {
                "appid": "49",
                "account_name": "N761916_N4563971"
            }
        ]
    }
}
3.4 请求示例
{
    "username": "15370796646",
    "signature": "75df4b699a93ecdd065d49635138dbe8",
    "timestamp": "1659580963",
    "account_id": "257043"
}
4、子账号额度调拨
4.1 请求地址
- 请求方式:post
- Content-Type:application/x-www-form-urlencoded
- 请求地址:https://api.chuanglan.com/api/apis/subaccount/allot
4.2 请求参数
| 参数名 | 类型 | 是否必传 | 描述 | 
|---|
| username | string | 是 | 深度接口账号名,由创蓝商务提供。 示例:13899999999 | 
| timestamp | string | 是 | 时间戳(10 位) | 
| signature | string | 是 | 标准的 MD5 加密(32 位小写值),例如 signature=md5(userName+password+timestamp) 两边通过相同的签名进行校验 | 
| appid | Integer | 是 | 产品类型,通知账号=49;会员营销账号=52;验证码账号=153;BK账号=126;DK账号=119;HK账号=151 | 
| account_id | string | 是 | 子账号添加之后返回的 id,在其他接口中写作 sub_id | 
| amount | string | 是 | 要调拨的条数 | 
| type | string | 是 | 调拨类型:1 主帐号给子账号调拨,2 子账号给主帐号调拨 | 
4.3 响应参数
| 参数名 | 类型 | 默认值 | 描述 | 
|---|
| code | string |  | 000000 代表成功,其他代表失败,会有 message 错误信息返回 | 
| status | string |  | 状态说明 success:成功,error:失败 | 
| msg | string |  | 提示信息 | 
返回数据示例:
{
    "status": "error",
    "code": "20104004",
    "msg": "余额不足"
}
4.4 请求示例
{
    "username": "15370796646",
    "signature": "a6b0763ebb309ef4cd4499730b54eef8",
    "timestamp": "1659581259",
    "account_id": "257043",
    "appid": "49",
    "amount": "1",
    "type": "2"
}
5、子账号 id 查询
5.1 请求地址
- 请求方式:post
- Content-Type:application/x-www-form-urlencoded
- 请求地址:https://api.chuanglan.com/api/apis/subaccount/getids
5.2 请求参数
| 参数名 | 类型 | 是否必传 | 描述 | 
|---|
| username | string | 是 | 深度接口账号名,由创蓝商务提供。 示例:13899999999 | 
| timestamp | string | 是 | 时间戳(10 位) | 
| signature | string | 是 | 标准的 MD5 加密(32 位小写值),例如 signature=md5(userName+password+timestamp) 两边通过相同的签名进行校验 | 
5.3 响应参数
| 参数名 | 类型 | 默认值 | 描述 | 
|---|
| code | string |  | 000000 代表成功,其他代表失败,会有 message 错误信息返回 | 
| status | string |  | 状态说明 success:成功,error:失败 | 
| msg | string |  | 提示信息 | 
| data | object |  | 返回数据 | 
| account_id | array |  | 子账号 id 数组 | 
| account_id[] | string |  | 所有的子账号 id | 
返回数据示例:
{
    "status": "success",
    "data": {
        "account_id": ["253280", "253281", "256637", "256943", "257043"]
    }
}
5.4 请求示例
{
    "userName": "18400000010",
    "timestamp": "1651920939",
    "signature": "6b1d14e6a3fce6b8aa8a015a4301ee80"
}
6、子账号状态查询
6.1 请求地址
- 请求方式:post
- Content-Type:application/x-www-form-urlencoded
- 请求地址:https://api.chuanglan.com/api/apis/subaccount/getstatus
6.2 请求参数
| 参数名 | 类型 | 是否必传 | 描述 | 
|---|
| username | string | 是 | 深度接口账号名,由创蓝商务提供。 示例:13899999999 | 
| timestamp | string | 是 | 时间戳(10 位) | 
| signature | string | 是 | 标准的 MD5 加密(32 位小写值),例如 signature=md5(userName+password+timestamp) 两边通过相同的签名进行校验 | 
| sub_id | string | 是 | 子账号 id | 
6.3 响应参数
| 参数名 | 类型 | 默认值 | 描述 | 
|---|
| code | string |  | 000000 代表成功,其他代表失败,会有 message 错误信息返回 | 
| status | string |  | 状态说明 success:成功,error:失败 | 
| msg | string |  | 提示信息 | 
| data | object |  | 返回数据 | 
| audit_status | string |  | 子账号状态 1 待审核 2 审核通过 3 审核驳回 | 
| status_reason | string |  | 驳回原因 | 
返回数据示例:
{
    "status": "success",
    "data": {
        "audit_status": "2",
        "status_reason": ""
    }
}
6.4 请求示例
{
    "username": "15370796646",
    "signature": "d8f764d0bbaf290099309216ef71c488",
    "timestamp": "1659581760",
    "sub_id": "257043"
}
没有更多了