POST api/trade/save

保存二手房

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

Request 信息

URI 参数

None.

Body 参数

参数

TradeSaveModel
名称说明数据类型附加信息
Price

价格

decimal number

Required

Range: inclusive between 0.01 and 100000

IsFreeDuty

是否免税

boolean

None.

IsHot

是否热推

boolean

None.

IsUrgentSale

是否急售

boolean

None.

HouId

房源Id,存在Id视为保存,否则新增

integer

None.

BuildingId

小区Id(若这里为0,BuildingName,Address,RegionCode3个参数传入值则会根据buildingName去匹配小区,不存在的小区则新增[未审核状态])

integer

Required

BuildingName

需【新增的小区】名

string

None.

Address

需【新增的小区】地址

string

None.

RegionCode

需【新增的小区】区域code

string

None.

RoomCount

几室

integer

Range: inclusive between 0 and 9

HollCount

几厅

integer

Range: inclusive between 0 and 9

LooCount

几卫

integer

Range: inclusive between 0 and 9

Cookroom

几厨

integer

Range: inclusive between 0 and 9

Terrace

几阳台

integer

Range: inclusive between 0 and 9

Area

面积

decimal number

Required

Range: inclusive between 0.01 and 999999

HouseKind

房源类型

integer

Required

Deck

装修类型

integer

Required

Direct

房屋朝向

integer

Required

BirthYear

建筑年代

integer

Required

Range: inclusive between 1900 and 2147483647

FloorCount

总楼层

integer

Required

Floor

所在楼层

integer

Required

HouseCommend

房源标题

string

Required

Max length: 36

Min length: 2

Remark

房源描述,3000字以内

string

Required

RoomTypeImgs

户型图片

Collection of HouseImage

None.

HouseImgs

房源图片

Collection of HouseImage

None.

InsideCode

内部编号

string

Max length: 20

SmsCode

个人/房东 发布时的验证码

string

None.

LinkMan

个人/房东 联系人

string

None.

Tel

个人/房东 电话号码

string

None.

City

城市

string

Required

Token

token

string

Required

Platform

string

None.

Request 数据格式

application/json, text/json

示例:
{
  "Price": 1.0,
  "IsFreeDuty": true,
  "IsHot": true,
  "IsUrgentSale": true,
  "HouId": 1,
  "BuildingId": 5,
  "BuildingName": "sample string 6",
  "Address": "sample string 7",
  "RegionCode": "sample string 8",
  "RoomCount": 9,
  "HollCount": 10,
  "LooCount": 11,
  "Cookroom": 12,
  "Terrace": 13,
  "Area": 14.0,
  "HouseKind": 15,
  "Deck": 16,
  "Direct": 17,
  "BirthYear": 18,
  "FloorCount": 19,
  "Floor": 20,
  "HouseCommend": "sample string 21",
  "Remark": "sample string 22",
  "RoomTypeImgs": [
    {
      "ResId": 1,
      "IsMain": true,
      "FileName": "sample string 2",
      "Title": "sample string 3",
      "Ext": "sample string 4",
      "Path": "sample string 5"
    },
    {
      "ResId": 1,
      "IsMain": true,
      "FileName": "sample string 2",
      "Title": "sample string 3",
      "Ext": "sample string 4",
      "Path": "sample string 5"
    }
  ],
  "HouseImgs": [
    {
      "ResId": 1,
      "IsMain": true,
      "FileName": "sample string 2",
      "Title": "sample string 3",
      "Ext": "sample string 4",
      "Path": "sample string 5"
    },
    {
      "ResId": 1,
      "IsMain": true,
      "FileName": "sample string 2",
      "Title": "sample string 3",
      "Ext": "sample string 4",
      "Path": "sample string 5"
    }
  ],
  "InsideCode": "sample string 23",
  "SmsCode": "sample string 24",
  "LinkMan": "sample string 25",
  "Tel": "sample string 26",
  "City": "sample string 27",
  "Token": "sample string 28",
  "Platform": "sample string 29"
}

application/xml, text/xml

示例:
<TradeSaveModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Trade">
  <Platform xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 29</Platform>
  <Token xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 28</Token>
  <City xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 27</City>
  <Address xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 7</Address>
  <Area xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">14</Area>
  <BirthYear xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">18</BirthYear>
  <BuildingId xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">5</BuildingId>
  <BuildingName xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 6</BuildingName>
  <Cookroom xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">12</Cookroom>
  <Deck xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">16</Deck>
  <Direct xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">17</Direct>
  <Floor xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">20</Floor>
  <FloorCount xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">19</FloorCount>
  <HollCount xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">10</HollCount>
  <HouId xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">1</HouId>
  <HouseCommend xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 21</HouseCommend>
  <HouseImgs xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">
    <HouseImage>
      <Ext>sample string 4</Ext>
      <FileName>sample string 2</FileName>
      <IsMain>true</IsMain>
      <Path>sample string 5</Path>
      <ResId>1</ResId>
      <Title>sample string 3</Title>
    </HouseImage>
    <HouseImage>
      <Ext>sample string 4</Ext>
      <FileName>sample string 2</FileName>
      <IsMain>true</IsMain>
      <Path>sample string 5</Path>
      <ResId>1</ResId>
      <Title>sample string 3</Title>
    </HouseImage>
  </HouseImgs>
  <HouseKind xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">15</HouseKind>
  <InsideCode xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 23</InsideCode>
  <LinkMan xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 25</LinkMan>
  <LooCount xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">11</LooCount>
  <RegionCode xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 8</RegionCode>
  <Remark xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 22</Remark>
  <RoomCount xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">9</RoomCount>
  <RoomTypeImgs xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">
    <HouseImage>
      <Ext>sample string 4</Ext>
      <FileName>sample string 2</FileName>
      <IsMain>true</IsMain>
      <Path>sample string 5</Path>
      <ResId>1</ResId>
      <Title>sample string 3</Title>
    </HouseImage>
    <HouseImage>
      <Ext>sample string 4</Ext>
      <FileName>sample string 2</FileName>
      <IsMain>true</IsMain>
      <Path>sample string 5</Path>
      <ResId>1</ResId>
      <Title>sample string 3</Title>
    </HouseImage>
  </RoomTypeImgs>
  <SmsCode xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 24</SmsCode>
  <Tel xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">sample string 26</Tel>
  <Terrace xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">13</Terrace>
  <IsFreeDuty>true</IsFreeDuty>
  <IsHot>true</IsHot>
  <IsUrgentSale>true</IsUrgentSale>
  <Price>1</Price>
</TradeSaveModel>

application/x-www-form-urlencoded

示例:

Response 信息

输出返回说明

结果

EditResult
名称说明数据类型附加信息
HouId

房源id

integer

None.

ErrorCode

API错误码

APIErrorCode

None.

Msg

附带消息

string

None.

Response 返回数据格式

application/json, text/json

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

application/xml, text/xml

示例:
<EditResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.House">
  <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>
  <HouId>1</HouId>
</EditResult>