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

alibaba.campus.space.campus.getbyid (根据园区id获取园区信息)

根据园区id获取园区信息 HSF接口名称:com.alibaba.campus.api.space.service.top.CampusApiTopService HSF方法名称:getCampusById

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param0 WorkBenchContext 必须 园区ID
  • └ campus_code
  • String
  • 可选
  • ""
  • ""
  • └ company_id
  • Number
  • 可选
  • 1
  • ""
  • └ campus_id
  • Number
  • 必须
  • 100002
  • 园区ID
param1 Number 可选 100002 园区ID

响应参数

名称 类型 示例值 描述
result PojoResult {} result
  • content
  • Campus
  • {}
  • content
  • └ id
  • Number
  • 1
  • id
  • └ gmt_create
  • Date
  • 2017-11-11
  • gmtCreate
  • └ gmt_modified
  • Date
  • 2017-11-11
  • gmtModified
  • └ creator
  • String
  • ""
  • creator
  • └ modifier
  • String
  • ""
  • modifier
  • └ is_delete
  • Boolean
  • false
  • 是否删除,0未删除,1删除
  • └ type
  • Number
  • 0
  • 来源,0自建 1租赁
  • └ status
  • Number
  • 1
  • 状态,0停用,1启用
  • └ area
  • BigDecimal
  • 2
  • 面积
  • └ order_no
  • Number
  • 1
  • 排序号
  • └ address
  • String
  • ""
  • 地址信息
  • └ city_code
  • String
  • ""
  • 城市编码
  • └ city_name
  • String
  • ""
  • 城市名称
  • └ province_code
  • String
  • ""
  • 省份编码
  • └ province_name
  • String
  • ""
  • 省份名称
  • └ country_code
  • String
  • ""
  • 国家编码
  • └ country_name
  • String
  • ""
  • 国家名称
  • └ code
  • String
  • ""
  • 园区编码
  • └ en_name
  • String
  • ""
  • 园区英文名称
  • └ name
  • String
  • ""
  • 园区名称
  • └ company_name
  • String
  • ""
  • 所属公司名称
  • └ company_id
  • Number
  • 1
  • 所属公司ID
  • └ indoor_area
  • String
  • 1.0
  • 室内面积
  • └ request_id
  • String
  • ""
  • requestId
  • └ error_code
  • String
  • ""
  • errorCode
  • └ error_msg
  • String
  • ""
  • errorMsg
  • └ success
  • Boolean
  • true
  • success
  • └ error_level
  • String
  • ""
  • errorLevel

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusSpaceCampusGetbyidRequest req = new AlibabaCampusSpaceCampusGetbyidRequest();
AlibabaCampusSpaceCampusGetbyidRequest.WorkBenchContext obj1 = new AlibabaCampusSpaceCampusGetbyidRequest.WorkBenchContext();
obj1.setCampusCode("\"\"");
obj1.setCompanyId(1L);
obj1.setCampusId(100002L);
req.setParam0(obj1);
req.setParam1(100002L);
AlibabaCampusSpaceCampusGetbyidResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_space_campus_getbyid_response>
    <result>
        <content>
            <id>1</id>
            <gmt_create>2017-11-11</gmt_create>
            <gmt_modified>2017-11-11</gmt_modified>
            <creator>&quot;&quot;</creator>
            <modifier>&quot;&quot;</modifier>
            <is_delete>false</is_delete>
            <type>0</type>
            <status>1</status>
            <area>2</area>
            <order_no>1</order_no>
            <address>&quot;&quot;</address>
            <city_code>&quot;&quot;</city_code>
            <city_name>&quot;&quot;</city_name>
            <province_code>&quot;&quot;</province_code>
            <province_name>&quot;&quot;</province_name>
            <country_code>&quot;&quot;</country_code>
            <country_name>&quot;&quot;</country_name>
            <code>&quot;&quot;</code>
            <en_name>&quot;&quot;</en_name>
            <name>&quot;&quot;</name>
            <company_name>&quot;&quot;</company_name>
            <company_id>1</company_id>
            <indoor_area>1.0</indoor_area>
        </content>
        <request_id>&quot;&quot;</request_id>
        <error_code>&quot;&quot;</error_code>
        <error_msg>&quot;&quot;</error_msg>
        <success>true</success>
        <error_level>&quot;&quot;</error_level>
    </result>
</alibaba_campus_space_campus_getbyid_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

返回
顶部