POST api/v1/Order/HotelOrderByGift

积分、法宝预订免费房

请求信息(Request)

URI 参数

None.

Body 参数

Order
名称描述类型备注
CatTag

订单类型(为null的时候系统自动判断)

BusinessType

None.

RecAddressID

收货地址ID

integer

None.

Memo

客户备注

string

String length: inclusive between 0 and 500

GuestName

预定人的姓名(不一定与当前登录用户的姓名相同)

string

Required

IdCardNo

预定人身份证号码

string

None.

BookingPassword

入住验证码

string

None.

RefereeID

推荐人ID(可不填)

integer

None.

RefereeCode

优惠码(邀请码)

string

None.

SourceID

客户端类型

OrderSourceEnum

None.

SourceAppid

客户端appid

string

None.

SourceOpenid

客户端openid

string

None.

Longitude

经度

decimal number

None.

Latitude

维度

decimal number

None.

Mobile

预定人的手机号码

string

Matching regular expression pattern: ^(0|86|17951)?1[0-9]{10}$

Coupons

优惠券列表

integer 集合

None.

GiftId

法宝id,只有在法宝预订酒店的接口有效

integer

None.

Integral

使用多少积分,只有在积分预订酒店的接口有效,目前只支持全部用积分

integer

None.

IntegralMoney

积分抵扣的金额,计算用,不用客户端提交

decimal number

None.

DelayCheckout

延迟N小时退房(500积分/小时)

integer

None.

RaiseId

订单加价购买额外产品id

integer

None.

ComboId

套餐id

integer

None.

RaiseAmount

订单加价购买额外产品

decimal number

None.

RaiseProduct

订单加价购买额外产品名称

string

None.

DealOrders

关联团购订单

OrderItem 集合

None.

HotelOrders

关联酒店订单

OrderItem 集合

None.

TravelOrders

关联旅游订单

OrderItem 集合

None.

请求格式

application/json, text/json

Sample:
{
  "CatTag": 0,
  "RecAddressID": 1,
  "Memo": "sample string 1",
  "GuestName": "sample string 2",
  "IdCardNo": "sample string 3",
  "BookingPassword": "sample string 4",
  "RefereeID": 5,
  "RefereeCode": "sample string 6",
  "SourceID": 0,
  "SourceAppid": "sample string 7",
  "SourceOpenid": "sample string 8",
  "Longitude": 1.1,
  "Latitude": 1.1,
  "Mobile": "sample string 9",
  "Coupons": [
    1,
    2
  ],
  "GiftId": 1,
  "Integral": 1,
  "IntegralMoney": 1.0,
  "DelayCheckout": 1,
  "RaiseId": 1,
  "ComboId": 1,
  "RaiseAmount": 1.0,
  "RaiseProduct": "sample string 10",
  "DealOrders": [
    {
      "ItemID": 1,
      "RoomID": "sample string 2",
      "ItemCount": 3,
      "StartDate": "2025-05-04T17:54:24.2461175+08:00",
      "EndDate": "2025-05-04T17:54:24.2461175+08:00",
      "SpecificationKey": "sample string 4",
      "SpecificationName": "sample string 5"
    },
    {
      "ItemID": 1,
      "RoomID": "sample string 2",
      "ItemCount": 3,
      "StartDate": "2025-05-04T17:54:24.2461175+08:00",
      "EndDate": "2025-05-04T17:54:24.2461175+08:00",
      "SpecificationKey": "sample string 4",
      "SpecificationName": "sample string 5"
    }
  ],
  "HotelOrders": [
    {
      "ItemID": 1,
      "RoomID": "sample string 2",
      "ItemCount": 3,
      "StartDate": "2025-05-04T17:54:24.2461175+08:00",
      "EndDate": "2025-05-04T17:54:24.2461175+08:00",
      "SpecificationKey": "sample string 4",
      "SpecificationName": "sample string 5"
    },
    {
      "ItemID": 1,
      "RoomID": "sample string 2",
      "ItemCount": 3,
      "StartDate": "2025-05-04T17:54:24.2461175+08:00",
      "EndDate": "2025-05-04T17:54:24.2461175+08:00",
      "SpecificationKey": "sample string 4",
      "SpecificationName": "sample string 5"
    }
  ],
  "TravelOrders": [
    {
      "ItemID": 1,
      "RoomID": "sample string 2",
      "ItemCount": 3,
      "StartDate": "2025-05-04T17:54:24.2461175+08:00",
      "EndDate": "2025-05-04T17:54:24.2461175+08:00",
      "SpecificationKey": "sample string 4",
      "SpecificationName": "sample string 5"
    },
    {
      "ItemID": 1,
      "RoomID": "sample string 2",
      "ItemCount": 3,
      "StartDate": "2025-05-04T17:54:24.2461175+08:00",
      "EndDate": "2025-05-04T17:54:24.2461175+08:00",
      "SpecificationKey": "sample string 4",
      "SpecificationName": "sample string 5"
    }
  ]
}

application/xml, text/xml

Sample:
<Order xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application.DTOs">
  <BookingPassword>sample string 4</BookingPassword>
  <CatTag>None</CatTag>
  <ComboId>1</ComboId>
  <Coupons xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Coupons>
  <DealOrders>
    <OrderItem>
      <EndDate>2025-05-04T17:54:24.2461175+08:00</EndDate>
      <ItemCount>3</ItemCount>
      <ItemID>1</ItemID>
      <RoomID>sample string 2</RoomID>
      <SpecificationKey>sample string 4</SpecificationKey>
      <SpecificationName>sample string 5</SpecificationName>
      <StartDate>2025-05-04T17:54:24.2461175+08:00</StartDate>
    </OrderItem>
    <OrderItem>
      <EndDate>2025-05-04T17:54:24.2461175+08:00</EndDate>
      <ItemCount>3</ItemCount>
      <ItemID>1</ItemID>
      <RoomID>sample string 2</RoomID>
      <SpecificationKey>sample string 4</SpecificationKey>
      <SpecificationName>sample string 5</SpecificationName>
      <StartDate>2025-05-04T17:54:24.2461175+08:00</StartDate>
    </OrderItem>
  </DealOrders>
  <DelayCheckout>1</DelayCheckout>
  <GiftId>1</GiftId>
  <GuestName>sample string 2</GuestName>
  <HotelOrders>
    <OrderItem>
      <EndDate>2025-05-04T17:54:24.2461175+08:00</EndDate>
      <ItemCount>3</ItemCount>
      <ItemID>1</ItemID>
      <RoomID>sample string 2</RoomID>
      <SpecificationKey>sample string 4</SpecificationKey>
      <SpecificationName>sample string 5</SpecificationName>
      <StartDate>2025-05-04T17:54:24.2461175+08:00</StartDate>
    </OrderItem>
    <OrderItem>
      <EndDate>2025-05-04T17:54:24.2461175+08:00</EndDate>
      <ItemCount>3</ItemCount>
      <ItemID>1</ItemID>
      <RoomID>sample string 2</RoomID>
      <SpecificationKey>sample string 4</SpecificationKey>
      <SpecificationName>sample string 5</SpecificationName>
      <StartDate>2025-05-04T17:54:24.2461175+08:00</StartDate>
    </OrderItem>
  </HotelOrders>
  <IdCardNo>sample string 3</IdCardNo>
  <Integral>1</Integral>
  <IntegralMoney>1</IntegralMoney>
  <Latitude>1.1</Latitude>
  <Longitude>1.1</Longitude>
  <Memo>sample string 1</Memo>
  <Mobile>sample string 9</Mobile>
  <RaiseAmount>1</RaiseAmount>
  <RaiseId>1</RaiseId>
  <RaiseProduct>sample string 10</RaiseProduct>
  <RecAddressID>1</RecAddressID>
  <RefereeCode>sample string 6</RefereeCode>
  <RefereeID>5</RefereeID>
  <SourceAppid>sample string 7</SourceAppid>
  <SourceID>Android</SourceID>
  <SourceOpenid>sample string 8</SourceOpenid>
  <TravelOrders>
    <OrderItem>
      <EndDate>2025-05-04T17:54:24.2461175+08:00</EndDate>
      <ItemCount>3</ItemCount>
      <ItemID>1</ItemID>
      <RoomID>sample string 2</RoomID>
      <SpecificationKey>sample string 4</SpecificationKey>
      <SpecificationName>sample string 5</SpecificationName>
      <StartDate>2025-05-04T17:54:24.2461175+08:00</StartDate>
    </OrderItem>
    <OrderItem>
      <EndDate>2025-05-04T17:54:24.2461175+08:00</EndDate>
      <ItemCount>3</ItemCount>
      <ItemID>1</ItemID>
      <RoomID>sample string 2</RoomID>
      <SpecificationKey>sample string 4</SpecificationKey>
      <SpecificationName>sample string 5</SpecificationName>
      <StartDate>2025-05-04T17:54:24.2461175+08:00</StartDate>
    </OrderItem>
  </TravelOrders>
</Order>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Order'.

响应信息(Response)

资源描述

如果Status==2表示用户资料尚未填写姓名

RequestResultOfOrderResult
名称描述类型备注
Data

OrderResult

None.

Status

状态(0:成功,1:失败)

integer

None.

Message

导致失败的相关消息

string

None.

Total

集合总数,用于分页时使用

integer

None.

响应格式

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected for property 'HotelRoom' with type 'WLife.Application.DTOs.HotelRoomDTO'. Path 'Data.Order.HotelOrders[0].PreAllocatedRooms[0].RoomType.Combos[0].Products[0]'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected for property 'HotelRoom' with type 'WLife.Application.DTOs.HotelRoomDTO'. Path 'Data.Order.HotelOrders[0].PreAllocatedRooms[0].RoomType.Combos[0].Products[0]'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: “System.Collections.Generic.List`1[[WLife.Application.DTOs.DealSpecificationDTO, WLife.Application, Version=1.0.0.33, Culture=neutral, PublicKeyToken=null]]”类型的对象图包含循环,如果禁用引用跟踪,择无法对其进行序列化。

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: “System.Collections.Generic.List`1[[WLife.Application.DTOs.DealSpecificationDTO, WLife.Application, Version=1.0.0.33, Culture=neutral, PublicKeyToken=null]]”类型的对象图包含循环,如果禁用引用跟踪,择无法对其进行序列化。