该接口用于已入驻实体添加角色,调用成功过后,角色下类目认证(服务商没有该信息)会进审,接口返回审核 ID,审核通过后角色生效。
创建沙盒环境小程序时请选择“正式小程序能力映射”,详情请关注行业角色系统能力文档。
| 基本 | |
|---|---|
| HTTP URL | 正式环境:https://developer.toutiao.com/auth/entity/add_role 沙盒环境:https://open-sandbox.douyin.com/auth/entity/add_role |
| HTTP Method | POST |
| 权限要求 | AccessToken鉴权 |
certificate_materials、qualification、cooperation_agreement 、cooperation_cases 说明
| 参数名 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| material_type | int | 是 | 资质材料类型,目前支持的类型见上传资料接口 |
| material_expiretime | string | 是 | 资料过期时间,示例:2029-09-10 |
| material_paths | Array | 是 | 资质材料链接,字符串数组 |
// 服务商
{
"appid": "ttd0f3a64e4fccc95f01",
"access_token": "0801121846324163432f483639344945XXXf704f6877757266773d3d",
"entity_id": "E_7216554566647824422",
"industry_role": 3,
"partner_role_info": {
"partner_info": {
"company_type": "企业工商户",
"company_addr": "中国山西晋城",
"cooperation_cases": [
{
"material_type": 1010,
"material_expiretime": "2033-03-03",
"material_paths": [
"certification/resource/f105beee222f1629e7cbfb9e243bc286"
]
}
]
}
},
"institution_role_info": {
"institution_info": {
"record_name": "",
"scene_type": "",
"subject_type": "",
"logo_uri": "",
"trademark_uri": "",
"desc": ""
},
"institution_class_info": {
"industry_class": {
"first_class": 0,
"second_class": 0,
"third_class": 0
},
"employee": {
"employee_material": {
"name": "",
"id_number": "",
"expire_time": "",
"front_path": "",
"back_path": ""
},
"cooperation_agreement": {
"material_type": 0,
"material_expiretime": "",
"material_paths": [""]
}
},
"class_material": {
"material_type": 0,
"material_expiretime": "",
"material_paths": [""]
}
}
}
}
curl --location --request POST 'https://developer.toutiao.com/auth/entity/add_role' \
--header 'Aweme-Check-Type;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '//(机构)
{
"appid": "ttcfc4b97950f8484801",
"access_token": "08011218463241356a4a3557314770326a6d7459645257624e673d3d",
"entity_id": "E_7230706235463548989",
"industry_role": 2,
"partner_role_info": {
"partner_info": {
"company_type": "",
"company_addr": "",
"cooperation_cases": [
{
"material_type": 0,
"material_expiretime": "",
"material_paths": [""]
}
]
}
},
"institution_role_info": {
"institution_info": {
"record_name": "三九小飞棍来喽",
"scene_type": "线上机构",
"subject_type": "企业工商户",
"logo_uri": "certification/resource/e0882488978ce1eb808636028d52b107",
"trademark_uri": "certification/resource/e0882488978ce1eb808636028d52b107",
"desc": "这个简介也必须是十二个字符才可以吗"
},
"institution_class_info": {
"industry_class": {
"first_class": 40000,
"second_class": 40600,
"third_class": 0
},
"employee": {
"employee_material": {
"name": "花玲玲",
"id_number": "320XXXXXXXXXXXXXXX",
"expire_time": "2030-05-05",
"front_path": "certification/resource/e0882488978ce1eb808636028d52b107",
"back_path": "certification/resource/e0882488978ce1eb808636028d52b107"
},
"cooperation_agreement": {
"material_type": 1005,
"material_expiretime": "2031-06-06",
"material_paths": [
"certification/resource/e0882488978ce1eb808636028d52b107"
]
}
},
"class_material": {
"material_type": 1001,
"material_expiretime": "2030-04-04",
"material_paths": [
"certification/resource/e0882488978ce1eb808636028d52b107"
]
}
}
}
}'{
"add_role_taskid": "Role_717907890xxx4238252"
"err": {
"err_code": 0,
"err_msg": ""
}
}