文档中心 > API类目 > 智慧园区API

alibaba.campus.space.group.insert (新增分组)

新增分组

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
company_id Number 必须 10000 公司id
campus_id Number 必须 100001 园区id
entity SpaceGroup 可选 实体
  • └ gmt_modified
  • Date
  • 必须
  • 2020-12-12 12:12:12
  • 修改时间
  • └ code
  • String
  • 必须
  • xxx
  • 分组编号
  • └ modifier
  • String
  • 必须
  • -1
  • 修改人
  • └ description
  • String
  • 可选
  • xxx
  • 描述
  • └ uuid
  • String
  • 可选
  • xx
  • uuid
  • └ floor_id
  • Number
  • 可选
  • 100001
  • 楼层id
  • └ id
  • Number
  • 必须
  • 100000
  • 分组id
  • └ creator
  • String
  • 必须
  • -1
  • 创建人
  • └ gmt_create
  • Date
  • 必须
  • 2020-12-12 12:12:12
  • 创建时间
  • └ type_code
  • String
  • 必须
  • 002401
  • 类型编码
  • └ building_id
  • Number
  • 可选
  • 100001
  • 楼宇id
  • └ name
  • String
  • 必须
  • 测试分组
  • 分组名称

响应参数

名称 类型 示例值 描述
res Boolean 是否成功
errorcode String 错误码
content Boolean 内容
error_msg String 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusSpaceGroupInsertRequest req = new AlibabaCampusSpaceGroupInsertRequest();
req.setCompanyId(10000L);
req.setCampusId(100001L);
AlibabaCampusSpaceGroupInsertRequest.SpaceGroup obj1 = new AlibabaCampusSpaceGroupInsertRequest.SpaceGroup();
obj1.setGmtModified(StringUtils.parseDateTime("2020-12-12 12:12:12"));
obj1.setCode("xxx");
obj1.setModifier("-1");
obj1.setDescription("xxx");
obj1.setUuid("xx");
obj1.setFloorId(100001L);
obj1.setId(100000L);
obj1.setCreator("-1");
obj1.setGmtCreate(StringUtils.parseDateTime("2020-12-12 12:12:12"));
obj1.setTypeCode("002401");
obj1.setBuildingId(100001L);
obj1.setName("测试分组");
req.setEntity(obj1);
AlibabaCampusSpaceGroupInsertResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_space_group_insert_response>
    <res></res>
    <errorcode></errorcode>
    <content></content>
    <error_msg></error_msg>
</alibaba_campus_space_group_insert_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

返回
顶部