新增组织

更新时间:2023-06-21 07:13:09下载pdf

本文介绍新增组织的 API。

接口描述

输入组织名称后,调用本接口可以返回组织 ID。您将在组织详情查询、修改、删除和项目管理时使用组织 ID。

接口地址

POST: /v1.0/iot-02/community/structure

请求参数

body 说明

参数名类型参数位置是否必填说明
parent_structure_idString false父组织,为空表示根组织
structure_nameString true组织名称
address_codeString false地址(省市区街道的 Code,用逗号分割)参考:http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/
address_detailString false详细地址
contactString false联系人
contact_mobileString false联系人电话
contact_emailString false联系人邮箱

返回参数

参数名类型说明
resultString组织 ID

请求示例

POST: /v1.0/iot-02/community/structure
{
  "parent_structure_id": "",
  "structure_name": "12121",
  "address_detail": "浙江省杭州市西湖区浙商财富中心3幢7x2室",
  "contact": "李四",
  "contact_mobile": "1880000xxxx",
  "address_code": "110000,110100,110118,110118116,110118116209",
  "location": [
    {
      "level": "1",
      "has_children": true,
      "name": "北京市",
      "full_name": "",
      "full_id": "CHN,110000",
      "id": "110000"
    },
    {
      "level": "2",
      "has_children": true,
      "name": "市辖区",
      "full_name": "",
      "full_id": "CHN,110000,110100",
      "id": "110100"
    },
    {
      "level": "3",
      "has_children": true,
      "name": "密云区",
      "full_name": "",
      "full_id": "CHN,110000,110100,110118",
      "id": "110118"
    },
    {
      "level": "4",
      "has_children": true,
      "name": "石城镇",
      "full_name": "",
      "full_id": "CHN,110000,110100,110118,110118116",
      "id": "110118116"
    },
    {
      "level": "5",
      "has_children": false,
      "name": "张家坟村民委员会",
      "full_name": "",
      "full_id": "CHN,110000,110100,110118,110118116,110118116209",
      "id": "110118116209"
    }
  ]
}

返回示例

"137209008401233xxxx"

错误码

参考 错误码