POST api/building/add

添加小区

默认返回json数据,若要返回xml格式数据在访问地址后加上xml=true

Request 信息

URI 参数

None.

Body 参数

参数

BuildingAddModel
名称说明数据类型附加信息
BuildingName

需新增的小区名

string

Required

Address

小区地址

string

Required

RegionCode

区域code

string

None.

City

城市

string

Required

Token

token

string

Required

Platform

string

None.

Request 数据格式

application/json, text/json

示例:
{
  "BuildingName": "sample string 1",
  "Address": "sample string 2",
  "RegionCode": "sample string 3",
  "City": "sample string 4",
  "Token": "sample string 5",
  "Platform": "sample string 6"
}

application/xml, text/xml

示例:
<BuildingAddModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Building">
  <Platform xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 6</Platform>
  <Token xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 5</Token>
  <City xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 4</City>
  <Address>sample string 2</Address>
  <BuildingName>sample string 1</BuildingName>
  <RegionCode>sample string 3</RegionCode>
</BuildingAddModel>

application/x-www-form-urlencoded

示例:

Response 信息

输出返回说明

结果(已存在的小区直接返回小区id,不存在的则新增后在返回小区id)

BuildingAddResult
名称说明数据类型附加信息
BuildingId

小区id(成功添加或已存在的小区id)

integer

None.

ErrorCode

API错误码

APIErrorCode

None.

Msg

附带消息

string

None.

Response 返回数据格式

application/json, text/json

示例:
{
  "BuildingId": 1,
  "ErrorCode": 0,
  "Msg": "sample string 2"
}

application/xml, text/xml

示例:
<BuildingAddResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Building">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">SUCCESS</ErrorCode>
  <Msg xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 2</Msg>
  <BuildingId>1</BuildingId>
</BuildingAddResult>