dingtalk.oapi.process.approvers.forecast (预测审批人)

预测审批人

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
request ProcessForecastRequest 必须 请求
  • └ agentid
  • Number
  • 可选
  • 11
  • 应用id
  • └ process_code
  • String
  • 必须
  • aa
  • 模板唯一码
  • └ originator_userid
  • String
  • 必须
  • manager
  • 发起人id
  • └ originator_deptid
  • Number
  • 必须
  • 123
  • 发起人所在部门
  • form_component_values
  • FormComponentValueVo []
  • 必须
  • 表单数据
  • └ name
  • String
  • 必须
  • name
  • 组件名称
  • └ value
  • String
  • 必须
  • value
  • 组件值

响应参数

名称 类型 示例值 描述
errcode Number 0 错误码
errmsg String ok 错误信息
result ProcessForecastResponse [] 结果
  • └ node_name
  • String
  • 审批人
  • 节点名称
  • └ node_show_name
  • String
  • 1人审批
  • 节点展示名称
  • approvers
  • UserProfileVo []
  • 审批人列表
  • └ userid
  • String
  • manager
  • 审批人id
  • └ name
  • String
  • 测试
  • 审批人姓名

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/process/approvers/forecast");
OapiProcessApproversForecastRequest req = new OapiProcessApproversForecastRequest();
ProcessForecastRequest obj1 = new ProcessForecastRequest();
obj1.setAgentid(11L);
obj1.setProcessCode("aa");
obj1.setOriginatorUserid("manager");
obj1.setOriginatorDeptid(123L);
List<FormComponentValueVo> list3 = new ArrayList<FormComponentValueVo>();
FormComponentValueVo obj4 = new FormComponentValueVo();
list3.add(obj4);
obj4.setName("name");
obj4.setValue("value");
obj1.setFormComponentValues(list3);
req.setRequest(obj1);
OapiProcessApproversForecastResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • JSON示例
{
    "errcode":0,
    "errmsg":"ok",
    "result":[
        {
                "node_name":"审批人",
                "node_show_name":"1人审批",
                "approvers":[
                    {
                            "userid":"manager",
                            "name":"测试"
                    }
                ]
        }
    ]
}

异常示例

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

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部