文档中心 > API类目 > 神鲸应用API

alibaba.campus.core.department.create (创建部门)

创建公司部门

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
department_vo DepartmentVo 可选 部门信息
  • └ company_id
  • Number
  • 可选
  • 1
  • 公司ID
  • └ super_dept_id
  • Number
  • 可选
  • 1
  • 上级部门ID
  • └ dept_manager_id
  • String
  • 可选
  • 1
  • 部门管理员
  • └ dept_name_path
  • String
  • 可选
  • 1
  • 部门名称路径
  • └ dept_manager_name
  • String
  • 可选
  • 1
  • 部门管理员名称
  • └ name
  • String
  • 可选
  • 1
  • 部门名
  • └ dept_id_path
  • String
  • 可选
  • 1
  • 部门路径
  • └ id
  • Number
  • 可选
  • 1
  • 部门ID
  • └ short_name
  • String
  • 可选
  • 1
  • 部门简称
operator_id String 可选 1 操作人

响应参数

名称 类型 示例值 描述
result DepartmentVo 结果
  • └ company_id
  • Number
  • 公司ID
  • └ super_dept_id
  • Number
  • 上级部门ID
  • └ dept_manager_id
  • String
  • 11
  • └ dept_name_path
  • String
  • 1
  • └ dept_manager_name
  • String
  • 1
  • └ name
  • String
  • 部门名称
  • └ dept_id_path
  • String
  • 部门路径
  • └ id
  • Number
  • 部门ID
  • └ short_name
  • String
  • 部门简称

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusCoreDepartmentCreateRequest req = new AlibabaCampusCoreDepartmentCreateRequest();
AlibabaCampusCoreDepartmentCreateRequest.DepartmentVo obj1 = new AlibabaCampusCoreDepartmentCreateRequest.DepartmentVo();
obj1.setCompanyId(1L);
obj1.setSuperDeptId(1L);
obj1.setDeptManagerId("1");
obj1.setDeptNamePath("1");
obj1.setDeptManagerName("1");
obj1.setName("1");
obj1.setDeptIdPath("1");
obj1.setId(1L);
obj1.setShortName("1");
req.setDepartmentVo(obj1);
req.setOperatorId("1");
AlibabaCampusCoreDepartmentCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_core_department_create_response>
    <result>
        <company_id></company_id>
        <super_dept_id></super_dept_id>
        <dept_manager_id></dept_manager_id>
        <dept_name_path></dept_name_path>
        <dept_manager_name></dept_manager_name>
        <name></name>
        <dept_id_path></dept_id_path>
        <id></id>
        <short_name></short_name>
    </result>
</alibaba_campus_core_department_create_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部