文档中心 > API类目 > 酒店API(新)

taobao.xhotel.rates.increment (价格推送接口(批量增量))

Rate库存&价格增量更新接口,用户仅需要更新Rate中发生变化的库存日历&价格日历即可

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
rate_inventory_price_map String 必须 [{"out_rid":"ABCDE_123","rateplan_code":"ABCDE_WHL01","vendor":"","lock_start_time":"","lock_end_time":"","data":{"use_room_inventory":false,"inventory_price":[{"date":"2013-11-18","quota":1,"price":1000,"status":1},{"date":"2013-11-19","quota":1,"price":1000,"status":0}]}},{"out_rid":"ABCDE_234","rateplan_code":"ABCDE_WHL01","vendor":"","data":{"use_room_inventory":false,"inventory_price":[{"date":"2013-11-18","quota":1,"price":1000,"status":1},{"date":"2013-11-19","quota":1,"price":1000,"status":0}]}}] 批量修改价格和房价专有库存信息,json格式,可同时修改多套房型+价格计划的价格:A:use_room_inventory:是否使用房型共享库存,可选值 true false 1、true时:使用房型共享库存 2、false时:使用房价专有库存,此时要求房价专有库存必填。B:date 日期必须为 T---T+180 日内的日期(T为当天),不能重复。 C:price 价格 int类型 取值范围1-99999999 单位为分D:quota 房价专有库存 int 类型 取值范围 0-999(数量库存) 60000(状态库存关) 61000(状态库存开) E:status 价格开关,0为关,1为开。lock_start_time为锁库存开始时间,lock_end_time为锁库存结束时间,如果当前时间在这个时间范围内,那么不允许修改库存。示例值:(1)[{"out_rid":"ABCDE_123","rateplan_code":"ABCDE_WHL01","vendor":"","lock_start_time":"","lock_end_time":"","data":{"use_room_inventory":false,"inventory_price":[{"date":"2013-11-18","quota":1,"price":1000,"status":1},{"date":"2013-11-19","quota":1,"price":1000,"status":0}]}},{"out_rid":"ABCDE_234","rateplan_code":"ABCDE_WHL01","vendor":"","data":{"use_room_inventory":false,"inventory_price":[{"date":"2013-11-18","quota":1,"price":1000,"status":1},{"date":"2013-11-19","quota":1,"price":1000,"status":0}]}}]

响应参数

名称 类型 示例值 描述
gid_and_rpids String [] 111-123 gid和rpid组合数组 gid_rpid

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelRatesIncrementRequest req = new XhotelRatesIncrementRequest();
req.setRateInventoryPriceMap("[{\"out_rid\":\"ABCDE_123\",\"rateplan_code\":\"ABCDE_WHL01\",\"vendor\":\"\",\"lock_start_time\":\"\",\"lock_end_time\":\"\",\"data\":{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":\"2013-11-18\",\"quota\":1,\"price\":1000,\"status\":1},{\"date\":\"2013-11-19\",\"quota\":1,\"price\":1000,\"status\":0}]}},{\"out_rid\":\"ABCDE_234\",\"rateplan_code\":\"ABCDE_WHL01\",\"vendor\":\"\",\"data\":{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":\"2013-11-18\",\"quota\":1,\"price\":1000,\"status\":1},{\"date\":\"2013-11-19\",\"quota\":1,\"price\":1000,\"status\":0}]}}]");
XhotelRatesIncrementResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_rates_increment_response>
    <gid_and_rpids>
        <string>111-123</string>
    </gid_and_rpids>
</xhotel_rates_increment_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

返回
顶部