dingtalk.oapi.industry.studentpool.batchadd (批量添加学员到学员池)

钉钉教培,提供给isv向学员池中批量写入学员的接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
biz_code String 必须 1003 业务code
student_list TrainingStudentDto [] 可选
  • 最大列表长度:20
  • 学员列表
    • └ mobile
    • String
    • 可选
    • 18511111111
    • 学员手机号
    • └ package_ids
    • Number []
    • 可选
    • [12,34]
    • 课包ID列表
    • └ number
    • String
    • 可选
    • 123456
    • 学员编号
    • patriarchs
    • PatriarchDto []
    • 可选
    • 学员联系人列表
    • └ relation
    • String
    • 可选
    • F
    • 联系人与学员的关系
    • └ mobile
    • String
    • 可选
    • 18511111111
    • 联系人手机号
    • └ name
    • String
    • 可选
    • 丁明
    • 联系人名字
    • └ name
    • String
    • 可选
    • 丁小明
    • 学员名字

    响应参数

    名称 类型 示例值 描述
    result String [] ["丁小明"] 校验重名,返回重名人列表
    success Boolean true 是否调用成功
    errcode Number 0 错误码
    errmsg String "成功" 错误信息

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/industry/studentpool/batchadd");
    OapiIndustryStudentpoolBatchaddRequest req = new OapiIndustryStudentpoolBatchaddRequest();
    req.setBizCode("1003");
    List<TrainingStudentDto> list2 = new ArrayList<TrainingStudentDto>();
    TrainingStudentDto obj3 = new TrainingStudentDto();
    list2.add(obj3);
    obj3.setMobile("18511111111");
    obj3.setPackageIds(new Long[] { 12,34 };
    );
    obj3.setNumber("123456");
    List<PatriarchDto> list6 = new ArrayList<PatriarchDto>();
    PatriarchDto obj7 = new PatriarchDto();
    list6.add(obj7);
    obj7.setRelation("F");
    obj7.setMobile("18511111111");
    obj7.setName("丁明");
    list4.setPatriarchs(list6);
    obj3.setName("丁小明");
    req.setStudentList(list2);
    OapiIndustryStudentpoolBatchaddResponse rsp = client.execute(req, access_token);
    System.out.println(rsp.getBody());

    响应示例

    • JSON示例
    {
        "result":{
            "string":[
                "[\"丁小明\"]"
            ]
        },
        "success":true,
        "errcode":0,
        "errmsg":"\"成功\""
    }

    异常示例

    • JSON示例
    {
    	"errcode":88,
    	"errmsg":"ding talk error"
    }

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部