alitrip.btrip.hotel.order.search (搜索酒店订单列表)

企业获取商旅酒店订单数据

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
rq OpenSearchRq 可选 请求
  • └ start_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 创建开始时间
  • └ apply_id
  • Number
  • 可选
  • 123
  • 审批单id
  • └ page
  • Number
  • 可选
  • 0
  • 页数,从1开始
  • └ page_size
  • Number
  • 可选
  • 10
  • 每页数量,默认10,最大50
  • └ depart_id
  • String
  • 可选
  • depart_1
  • 企业id
  • └ end_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 创建结束时间
  • └ corp_id
  • String
  • 必须
  • corp_1
  • 企业id
  • └ user_id
  • String
  • 可选
  • user_1
  • 用户id
  • └ update_end_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 更新开始时间
  • └ update_start_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 更新结束时间

响应参数

名称 类型 示例值 描述
result BtriphomeResultSupport result 返回结果
  • hotel_order_list
  • OpenHotelOrderRs []
  • module
  • 数据结果
  • └ id
  • Number
  • 123
  • 订单id
  • └ gmt_create
  • Date
  • 2017-05-01 00:00:00
  • 创建时间
  • └ gmt_modified
  • Date
  • 2017-05-01 00:00:00
  • 更新时间
  • └ corp_id
  • String
  • corp_1
  • 企业id
  • └ corp_name
  • String
  • 测试企业
  • 企业名称
  • └ user_id
  • String
  • user_1
  • 用户id
  • └ user_name
  • String
  • 测试用户
  • 用户名称
  • └ depart_id
  • String
  • depart_1
  • 部门id
  • └ depart_name
  • String
  • 测试部门
  • 部门名称
  • └ apply_id
  • Number
  • 123
  • 申请单id
  • └ contact_phone
  • String
  • 13600000000
  • 联系人电话
  • └ contact_name
  • String
  • 测试用户
  • 联系人名称
  • └ city
  • String
  • 北京
  • 酒店所在城市
  • └ hotel_name
  • String
  • 测试酒店
  • 酒店名称
  • └ check_in
  • Date
  • 2017-05-01 00:00:00
  • 入住时间
  • └ check_out
  • Date
  • 2017-05-01 00:00:00
  • 离店时间
  • └ room_type
  • String
  • 标间
  • 房间类型
  • └ room_num
  • Number
  • 2
  • 房间数
  • └ night
  • Number
  • 1
  • 总共住几晚
  • price_info_list
  • OpenPriceInfo []
  • price_info_list
  • 价目详情列表
  • └ pay_type
  • Number
  • 1
  • 结算方式:1个人现付,2:企业现付,4:企业月结,8企业预存
  • └ category
  • String
  • 酒店费用
  • 交易类型
  • └ type
  • Number
  • 1
  • 资金流向:1:支出,2:收入
  • └ price
  • String
  • 100.0
  • 价格
  • └ gmt_create
  • Date
  • 2017-05-01 00:00:00
  • 流水创建时间
  • └ alipay_trade_no
  • String
  • 208810000000000
  • 支付流水号
  • └ passenger_name
  • String
  • 张三,李四
  • 入住人,多个用‘,’分割
  • └ trade_id
  • String
  • 8978877000
  • 订单流水号
  • cost_center
  • OpenCostCenterDo
  • cost_center
  • 成本中心对象
  • └ name
  • String
  • 测试成本中心
  • 成本中心名称
  • └ number
  • String
  • abc
  • 成本中心编号
  • └ corp_id
  • String
  • corp_1
  • 企业id
  • invoice
  • OpenInvoiceDo
  • 发票对象
  • 发票对象
  • └ title
  • String
  • 阿里巴巴
  • 发票抬头
  • └ id
  • Number
  • 123
  • 商旅发票id
  • └ order_status_desc
  • String
  • 预订成功
  • 订单状态描述
  • └ order_type_desc
  • String
  • 信用住
  • 订单类型描述
  • └ guest
  • String
  • 张三,李四
  • 入住顾客,多个用','分割
  • └ thirdpart_itinerary_id
  • String
  • abcdef
  • 第三方行程id
  • └ order_status
  • Number
  • 1
  • 订单状态
  • └ order_type
  • Number
  • 1
  • 订单类型
  • user_affiliate_list
  • OpenUserAffiliateDo []
  • 张三,李四
  • 入住人员列表
  • └ user_id
  • String
  • 123
  • 入住人员Id
  • └ user_name
  • String
  • 张三
  • 入住人员名称
  • └ success
  • Boolean
  • true
  • 成功标识
  • └ result_msg
  • String
  • 成功
  • 返回信息
  • └ result_code
  • Number
  • 0
  • 返回码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripHotelOrderSearchRequest req = new AlitripBtripHotelOrderSearchRequest();
AlitripBtripHotelOrderSearchRequest.OpenSearchRq obj1 = new AlitripBtripHotelOrderSearchRequest.OpenSearchRq();
obj1.setStartTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setApplyId(123L);
obj1.setPage(0L);
obj1.setPageSize(10L);
obj1.setDepartId("depart_1");
obj1.setEndTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setCorpId("corp_1");
obj1.setUserId("user_1");
obj1.setUpdateEndTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setUpdateStartTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
req.setRq(obj1);
AlitripBtripHotelOrderSearchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_btrip_hotel_order_search_response>
    <result>
        <hotel_order_list>
            <open_hotel_order_rs>
                <id>123</id>
                <gmt_create>2017-05-01 00:00:00</gmt_create>
                <gmt_modified>2017-05-01 00:00:00</gmt_modified>
                <corp_id>corp_1</corp_id>
                <corp_name>测试企业</corp_name>
                <user_id>user_1</user_id>
                <user_name>测试用户</user_name>
                <depart_id>depart_1</depart_id>
                <depart_name>测试部门</depart_name>
                <apply_id>123</apply_id>
                <contact_phone>13600000000</contact_phone>
                <contact_name>测试用户</contact_name>
                <city>北京</city>
                <hotel_name>测试酒店</hotel_name>
                <check_in>2017-05-01 00:00:00</check_in>
                <check_out>2017-05-01 00:00:00</check_out>
                <room_type>标间</room_type>
                <room_num>2</room_num>
                <night>1</night>
                <price_info_list>
                    <open_price_info>
                        <pay_type>1</pay_type>
                        <category>酒店费用</category>
                        <type>1</type>
                        <price>100.0</price>
                        <gmt_create>2017-05-01 00:00:00</gmt_create>
                        <alipay_trade_no>208810000000000</alipay_trade_no>
                        <passenger_name>张三,李四</passenger_name>
                        <trade_id>8978877000</trade_id>
                    </open_price_info>
                </price_info_list>
                <cost_center>
                    <name>测试成本中心</name>
                    <number>abc</number>
                    <corp_id>corp_1</corp_id>
                </cost_center>
                <invoice>
                    <title>阿里巴巴</title>
                    <id>123</id>
                </invoice>
                <order_status_desc>预订成功</order_status_desc>
                <order_type_desc>信用住</order_type_desc>
                <guest>张三,李四</guest>
                <thirdpart_itinerary_id>abcdef</thirdpart_itinerary_id>
                <order_status>1</order_status>
                <order_type>1</order_type>
                <user_affiliate_list>
                    <open_user_affiliate_do>
                        <user_id>123</user_id>
                        <user_name>张三</user_name>
                    </open_user_affiliate_do>
                </user_affiliate_list>
            </open_hotel_order_rs>
        </hotel_order_list>
        <success>true</success>
        <result_msg>成功</result_msg>
        <result_code>0</result_code>
    </result>
</alitrip_btrip_hotel_order_search_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

返回
顶部