方法名称
hotel.order.list
使用说明
仅能搜索半年内的订单。每次调用请求数据不要太多,否则执行时间会比较长。
须使用https访问本接口。
输入参数
| 节点 | 名称 | 类型 | 可为空 | 说明 | 
|---|---|---|---|---|
| CreationTimeFrom | 预定时间开始点 | DateTime | Y | 
                要求格式为yyyy-MM-dd HH:mm:ss | 
        
| CreationTimeTo | 预定时间结束点 | DateTime | Y | 要求格式为yyyy-MM-dd HH:mm:ss预定时间范围尽量控制在一个月范围内,否则会超时 | 
| HotelId | 酒店编号 | String(8) | Y | |
| RoomTypeId | 房型编号 | String(10) | Y | |
| RatePlanId | 产品编号 | Int | Y | |
| ArrivalDateFrom | 入住日期开始点 | Date | Y | 要求格式为yyyy-MM-dd | 
| ArrivalDateTo | 入住日期结束点 | Date | Y | 要求格式为yyyy-MM-dd | 
| DepartureDateFrom | 离店日期开始点 | Date | Y | 要求格式为yyyy-MM-dd | 
| DepartureDateTo | 离店日期结束点 | Date | Y | 要求格式为yyyy-MM-dd | 
| MinUpdateTime | 最后更新时间开始点 | DateTime | Y | 2014-06-20新增要求格式为yyyy-MM-dd HH:mm:ss | 
| MaxUpdateTime | 最后更新时间结束点 | DateTime | Y | 2014-06-20新增要求格式为yyyy-MM-dd HH:mm:ss | 
| Mobile | 联系人手机 | String(20) | Y | |
| CustomerName | 入住人姓名 | String(20) | Y | |
| Status | 订单状态 | String(2) | Y | |
| PageIndex | 分页页码 | Int | N | 分页大小为10 | 
响应结果
| 节点 | 名称 | 类型 | 可为空 | 说明 | 
|---|---|---|---|---|
| Count | 总订单数 | Int | N | |
| Orders | 订单数组 | Order[] | Y | 包含多个Order节点 | 
    
Order节点
| 节点 | 名称 | 类型 | 可为空 | 说明 | 
|---|---|---|---|---|
| OrderId | 订单编号 | Long | N | |
| Status | 状态 | Enum | N | |
| TotalPrice | 总价 | Decimal | N | |
| CurrencyCode | 货币类型 | Enum | N | |
| HotelId | 酒店编号 | String(8) | N | |
| HotelName | 酒店名称 | String(200) | Y | V1.03新增 | 
| RoomTypeId | 房型编号 | String(8) | N | |
| RoomTypeName | 房型名称 | String(50) | Y | V1.03新增 | 
| RatePlanId | 产品编号 | Int | N | |
| RatePlanName | 产品名称 | String(100) | Y | V1.05新增 | 
| ArrivalDate | 入住日期 | Date | N | |
| DepartureDate | 离店日期 | Date | N | |
| CustomerType | 客人类型 | Enum | N | 
                All=统一价; Chinese =内宾价,需提示客人“须持大陆身份证入住”; OtherForeign =外宾价,需提示客人“须持国外护照入住”; HongKong =港澳台客人价,需提示客人“须持港澳台身份证入住”; ChinaGuest =中宾价,需提示客人“须持中国身份证、护照入住”;  | 
        
| NumberOfRooms | 房间数量 | Int | N | |
| NumberOfCustomers | 客人数量 | Int | N | |
| PaymentType | 付款类型 | Enum | N | SelfPay-前台现付、Prepay-预付 | 
| EarliestArrivalTime | 最早到店时间 | DateTime | N | |
| LatestArrivalTime | 最晚到店时间 | DateTime | N | |
| ConfirmationType | 确认类型 | Enum | N | 
                NotAllowedConfirm   不允许确认(合作伙伴自查订单状态后自行联系客人) SMS_cn ----艺龙发短信给客人,出现订单问题的时候会主动联系 NoNeed -- 艺龙发短信给客人,出现订单问题的时候不主动联系 注:除了NotAllowedConfirm,其余的选项艺龙都会发送短信,下单时如果输入了邮箱那么都会发送邮件  | 
        
| NoteToHotel | 给酒店备注 | String(500) | Y | |
| NoteToElong | 给艺龙备注 | String(500) | Y | 
输入示例
https://api-test.elong.com/rest?timestamp=1489648150&format=json
&method=hotel.order.list&signature=a05e1a0b987a9b3c1d8d7793c512c27d
&user={userid}&data={"Version":"1.28","Local":"zh_CN","Request":{"PageIndex":"1"}}
输出示例
{
    "Code":"0",
    "Result":{
        "Count":6730,
        "Orders":[
            {
                "OrderId":400015108,
                "Status":"N",
                "HotelName":"北京好苑建国酒店",
                "RoomTypeName":"高级间",
                "RatePlanName":"12—(限时抢)",
                "HotelId":"40101025",
                "RoomTypeId":"1114",
                "RatePlanId":478787,
                "ArrivalDate":"2016-07-20T00:00:00 08:00",
                "DepartureDate":"2016-07-21T00:00:00 08:00",
                "CustomerType":"All",
                "PaymentType":"SelfPay",
                "NumberOfRooms":1,
                "NumberOfCustomers":1,
                "EarliestArrivalTime":"2016-07-20T14:00:00 08:00",
                "LatestArrivalTime":"2016-07-20T17:00:00 08:00",
                "CurrencyCode":"RMB",
                "TotalPrice":70.0,
                "CustomerPrice":0.0,
                "ConfirmationType":"NoNeed"
            },
            {
                "OrderId":400016945,
                "Status":"V",
                "HotelName":"北京爱家酒店公寓(宝鼎中心店)",
                "RoomTypeName":"套房",
                "RatePlanName":"No Breakfast",
                "HotelId":"90040250",
                "RoomTypeId":"0003",
                "RatePlanId":374286,
                "ArrivalDate":"2016-08-24T00:00:00 08:00",
                "DepartureDate":"2016-08-25T00:00:00 08:00",
                "CustomerType":"Chinese",
                "PaymentType":"SelfPay",
                "NumberOfRooms":2,
                "NumberOfCustomers":2,
                "EarliestArrivalTime":"2016-08-24T10:00:00 08:00",
                "LatestArrivalTime":"2016-08-24T18:00:00 08:00",
                "CurrencyCode":"RMB",
                "TotalPrice":602.0,
                "CustomerPrice":0.0,
                "ConfirmationType":"SMS_cn"
            }
        ]
    },
    "Guid":"e64c030a-0b21-4459-920f-04c73e7e2fc3"
}
常见错误码
该接口常见错误为超时,每次请求数据量不要太大。
