文档中心 > API类目 > 酒店商品API

taobao.xhotel.rateplan.get (价格计划rateplan查询)

酒店产品库rateplan查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
rpid Number 可选 100000 废弃,使用rateplan_code
vendor String 可选 taobao
  • 最大长度:50
  • 系统商,一般不填写,使用须申请
    rateplan_code String 可选 12345AAA
  • 最大长度:64
  • 卖家自己系统的Code,简称RateCode

    响应参数

    名称 类型 示例值 描述
    rateplan RatePlan rateplan
    • └ rpid
    • Number
    • 123456
    • rateplan_id
    • └ rateplan_code
    • String
    • 123aaa
    • 卖家自己系统的Code,简称RateCode
    • └ name
    • String
    • aaa
    • RP名称
    • └ english_name
    • String
    • aaa
    • 英文名称
    • └ payment_type
    • Number
    • 1
    • 支付类型 可选值 1:预付 5:前台面付
    • └ breakfast_count
    • Number
    • 11
    • 早餐数量
    • └ fee_breakfast_count
    • Number
    • 222
    • 另加早餐数量
    • └ fee_breakfast_amount
    • Number
    • 11
    • 另加早餐金额
    • └ fee_gov_tax_amount
    • Number
    • 11
    • 额外服务-政府税-金额(1-9999)
    • └ fee_gov_tax_percent
    • Number
    • 1
    • 额外服务-政府税-百分比(0%-99%)
    • └ fee_service_amount
    • Number
    • 1
    • 额外服务-服务费-金额(0-9999)
    • └ fee_service_percent
    • Number
    • 1
    • 额外服务-服务费-百分比(0%-99%)
    • └ extend_fee
    • String
    • aaa
    • 额外服务的扩展,是一段JSON
    • └ min_days
    • Number
    • 1
    • 最小入住天数(1-365)
    • └ max_days
    • Number
    • 1
    • 最大入住天数(1-365)
    • └ min_amount
    • Number
    • 1
    • 首日入住房间数(1-99)【废弃】
    • └ min_adv_hours
    • Number
    • 1
    • 最小提前预订小时按入住时间的23:59:59(一般认为24点)来计算
    • └ max_adv_hours
    • Number
    • 1
    • 最大提前预订小时按入住时间的23:59:59(一般认为24点)来计算
    • └ start_time
    • String
    • 2000-01-01 00:00:00
    • 每日生效时间默认00:00:00。生效时间<结束时间
    • └ end_time
    • String
    • 2000-01-01 00:00:00
    • 每日结束时间默认24:00:00。生效时间<结束时间
    • └ cancel_policy
    • String
    • aaa
    • 退订政策
    • └ extend
    • String
    • aaa
    • extend
    • └ status
    • Number
    • 1
    • 状态
    • └ created_time
    • Date
    • 2000-01-01 00:00:00
    • 创建时间
    • └ modified_time
    • Date
    • 2000-01-01 00:00:00
    • 修改时间
    • └ extend_info1
    • String
    • aaa
    • 扩展字段1
    • └ extend_info2
    • String
    • aaa
    • 扩展字段2
    • └ extend_info3
    • String
    • aaa
    • 扩展字段3
    • └ guarantee_type
    • Number
    • 1
    • 担保类型,只支持: 0 无担保 1 峰时首晚担保 2峰时全额担保 3全天首晚担保 4全天全额担保
    • └ guarantee_start_time
    • String
    • 18:00
    • 每日开始担保时间
    • └ member_level
    • String
    • 1,2,3
    • 会员等级。支持多个等级","分隔
    • └ channel
    • String
    • A
    • 销售渠道。如需开通,需要申请权限。目前支持的渠道有 H:飞猪全渠道(选择H,可实现飞猪、高德、支付宝、手淘均可售卖) O:钉钉商旅 。如果有多个用","分开,比如H,O。如果需要投放其他渠道,请联系飞猪运营或者技术支持。
    • └ occupancy
    • Number
    • 3
    • 入住人数
    • └ first_stay
    • Number
    • 1
    • 是否是首住优惠rp。1代表是
    • └ agreement
    • Number
    • 1
    • 是否是协议价。1代表是
    • └ effective_time
    • Date
    • 2015-01-01 00:00:00
    • rateplan生效开始时间
    • └ deadline_time
    • Date
    • 2015-01-01 00:00:00
    • rateplan生效截止时间
    • └ guarantee_mode
    • Number
    • 1
    • 0支付宝担保 1PCI担保
    • └ allotment_release_time
    • String
    • 0
    • 协议保留房提前确认时间
    • └ pack_room_flag
    • Number
    • 0
    • 是否包房RP 1包房RP,0 非包房rp
    • └ bottom_price_flag
    • Number
    • 0
    • 是否底价加价,1是底价加价,0 非底价加价rp
    • └ is_student
    • Number
    • 0
    • 是否为学生价
    • └ invoice_content
    • String
    • 0
    • rp维度的发票信息,type:1.酒店提供发票;2.卖家提供发票,desc:发票描叙,比如:卖家包邮提供发票,格式为:{"type":1;"desc":""}
    • └ source
    • Number
    • 0
    • 来源
    • └ tag_json
    • String
    • {"non-direct-RP":1,"super-could-price-change-RP":0,"base-could-derived-RP":1,"ebk-tail-room-RP":0}
    • key的含义: non-direct-RP 表示非直连RP, super-could-price-change-RP 表示rp的super标,打上这个tag,表明这个rateplan下单的时候支持变价,商家系统直接放开价格校验。 base-could-derived-RP 表示base rateplan标签,打上了这个tag,表明这是一个base的rateplan,基于该rateplan可以衍生出子rateplan . ebk-tail-room-RP 表示 ebk尾房rate plan级别标
    • └ sell_gid
    • Number
    • 0
    • sell 端特殊RP 对应的 gid
    • └ can_checkin_end
    • String
    • 0
    • 可入住的最晚时间(小时房相关字段)
    • └ can_checkin_start
    • String
    • 0
    • 可入住的最早时间(小时房相关字段)
    • └ end_time_daily
    • Date
    • 0
    • 每日生效结束时间(仅时分秒有效)
    • └ rp_type
    • String
    • 1
    • rateplan类型 1为小时房
    • └ hourage
    • String
    • 1
    • 入住的开始跨度(小时房相关字段)
    • └ parent_rpid
    • Number
    • 1
    • 父rpid
    • └ start_time_daily
    • String
    • 0
    • 每日生效开始时间(仅时分秒有效)
    • └ common_allot_release_time
    • String
    • 0
    • 普通保留房提前确认时间
    • └ company_assist
    • Number
    • 1
    • companyAssist
    • └ hotel_company_mapping_d_o_s
    • String
    • []
    • hotelCompanyMappingDOS
    • └ cal_breakfast_str
    • String
    • [{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","breakfast_count":0},{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","breakfast_count":1}]
    • calBreakfastStr
    • └ cal_guarantee_str
    • String
    • [{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","guarantee":{"guaranteeType":2,"guaranteeStartTime":"HH:mm"}},{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","guarantee":{"guaranteeType":3,"guaranteeStartTime":"HH:mm"}}]
    • calGuaranteeStr
    • └ cal_change_rule_str
    • String
    • [{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","cancel_policy":{"cancelPolicyType":1} },{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","cancel_policy":{"cancelPolicyType":4,"policyInfo":{"48":10,"24":20}}}]
    • calChangeRuleStr
    • └ can_checkout_end
    • String
    • 0
    • 可离店的最晚时间(小时房相关字段)
    • └ member_discount_cal
    • String
    • [{"c":"8","t":1,"s": "20191211","e":"20191225"}]
    • 会员价加价规则。c:表示折扣百分比,例子8,意为会员价优惠8%,s:标识起始日期,e:表示截止日期,t:表示加价类型,0:代表折扣。会员价=售价*(1-c%)
    • └ mem_disc_flag
    • Number
    • 1
    • 会员价支持标识,1表示支持会员价规则
    • └ benefits
    • String
    • 酒+X特色
    • 酒+X特色
    • └ activity_type
    • String
    • 4
    • 活动类型: 1通兑,2秒杀,3尾房,4超级房券
    • └ children_price_policy
    • String
    • {"childrenPricePolicyList":[{"max":1,"min":0,"t":"1","v":"30.23"},{"max":17,"min":2,"t":"2","v":"20000"}]}
    • 儿童价格政策 年龄区间必须连续且有一个从0开始 max:年龄区间上限 min:年龄区间下限 t:加价类型,1-百分比金额加价,2-固定金额加价 v:加价因子,固定加价单位为分,百分比加价单位为百分比

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    XhotelRateplanGetRequest req = new XhotelRateplanGetRequest();
    req.setRpid(100000L);
    req.setVendor("taobao");
    req.setRateplanCode("12345AAA");
    XhotelRateplanGetResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <xhotel_rateplan_get_response>
        <rateplan>
            <rpid>123456</rpid>
            <rateplan_code>123aaa</rateplan_code>
            <name>aaa</name>
            <english_name>aaa</english_name>
            <payment_type>1</payment_type>
            <breakfast_count>11</breakfast_count>
            <fee_breakfast_count>222</fee_breakfast_count>
            <fee_breakfast_amount>11</fee_breakfast_amount>
            <fee_gov_tax_amount>11</fee_gov_tax_amount>
            <fee_gov_tax_percent>1</fee_gov_tax_percent>
            <fee_service_amount>1</fee_service_amount>
            <fee_service_percent>1</fee_service_percent>
            <extend_fee>aaa</extend_fee>
            <min_days>1</min_days>
            <max_days>1</max_days>
            <min_amount>1</min_amount>
            <min_adv_hours>1</min_adv_hours>
            <max_adv_hours>1</max_adv_hours>
            <start_time>2000-01-01 00:00:00</start_time>
            <end_time>2000-01-01 00:00:00</end_time>
            <cancel_policy>aaa</cancel_policy>
            <extend>aaa</extend>
            <status>1</status>
            <created_time>2000-01-01 00:00:00</created_time>
            <modified_time>2000-01-01 00:00:00</modified_time>
            <extend_info1>aaa</extend_info1>
            <extend_info2>aaa</extend_info2>
            <extend_info3>aaa</extend_info3>
            <guarantee_type>1</guarantee_type>
            <guarantee_start_time>18:00</guarantee_start_time>
            <member_level>1,2,3</member_level>
            <channel>A</channel>
            <occupancy>3</occupancy>
            <first_stay>1</first_stay>
            <agreement>1</agreement>
            <effective_time>2015-01-01 00:00:00</effective_time>
            <deadline_time>2015-01-01 00:00:00</deadline_time>
            <guarantee_mode>1</guarantee_mode>
            <allotment_release_time>0</allotment_release_time>
            <pack_room_flag>0</pack_room_flag>
            <bottom_price_flag>0</bottom_price_flag>
            <is_student>0</is_student>
            <invoice_content>0</invoice_content>
            <source>0</source>
            <tag_json>{&quot;non-direct-RP&quot;:1,&quot;super-could-price-change-RP&quot;:0,&quot;base-could-derived-RP&quot;:1,&quot;ebk-tail-room-RP&quot;:0}</tag_json>
            <sell_gid>0</sell_gid>
            <can_checkin_end>0</can_checkin_end>
            <can_checkin_start>0</can_checkin_start>
            <end_time_daily>0</end_time_daily>
            <rp_type>1</rp_type>
            <hourage>1</hourage>
            <parent_rpid>1</parent_rpid>
            <start_time_daily>0</start_time_daily>
            <common_allot_release_time>0</common_allot_release_time>
            <company_assist>1</company_assist>
            <hotel_company_mapping_d_o_s>[]</hotel_company_mapping_d_o_s>
            <cal_breakfast_str>[{&quot;date&quot;:&quot;yyyy-MM-dd&quot;,&quot;startDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;endDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;breakfast_count&quot;:0},{&quot;date&quot;:&quot;yyyy-MM-dd&quot;,&quot;startDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;endDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;breakfast_count&quot;:1}]</cal_breakfast_str>
            <cal_guarantee_str>[{&quot;date&quot;:&quot;yyyy-MM-dd&quot;,&quot;startDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;endDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;guarantee&quot;:{&quot;guaranteeType&quot;:2,&quot;guaranteeStartTime&quot;:&quot;HH:mm&quot;}},{&quot;date&quot;:&quot;yyyy-MM-dd&quot;,&quot;startDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;endDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;guarantee&quot;:{&quot;guaranteeType&quot;:3,&quot;guaranteeStartTime&quot;:&quot;HH:mm&quot;}}]</cal_guarantee_str>
            <cal_change_rule_str>[{&quot;date&quot;:&quot;yyyy-MM-dd&quot;,&quot;startDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;endDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;cancel_policy&quot;:{&quot;cancelPolicyType&quot;:1} },{&quot;date&quot;:&quot;yyyy-MM-dd&quot;,&quot;startDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;endDate&quot;:&quot;yyyy-MM-dd&quot;,&quot;cancel_policy&quot;:{&quot;cancelPolicyType&quot;:4,&quot;policyInfo&quot;:{&quot;48&quot;:10,&quot;24&quot;:20}}}]</cal_change_rule_str>
            <can_checkout_end>0</can_checkout_end>
            <member_discount_cal>[{&quot;c&quot;:&quot;8&quot;,&quot;t&quot;:1,&quot;s&quot;: &quot;20191211&quot;,&quot;e&quot;:&quot;20191225&quot;}]</member_discount_cal>
            <mem_disc_flag>1</mem_disc_flag>
            <benefits>酒+X特色</benefits>
            <activity_type>4</activity_type>
            <children_price_policy>{&quot;childrenPricePolicyList&quot;:[{&quot;max&quot;:1,&quot;min&quot;:0,&quot;t&quot;:&quot;1&quot;,&quot;v&quot;:&quot;30.23&quot;},{&quot;max&quot;:17,&quot;min&quot;:2,&quot;t&quot;:&quot;2&quot;,&quot;v&quot;:&quot;20000&quot;}]}</children_price_policy>
        </rateplan>
    </xhotel_rateplan_get_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>

    错误码解释

    错误码 错误描述 解决方案
    isv.invalid-parameter:ERROR_RP_ID_INVALID 参数rpid错误 请检查输入参数
    isv.invalid-parameter:ERROR_SELLER_ID_INVALID sellerId错误 请检查输入参数
    isv.invalid-parameter:ERROR_SELLER_NICK_INVALID 卖家昵称错误 请检查输入参数
    isv.rateplan-error:ERROR_UPDATE_RP_FAIL 更新失败 请稍后重试
    isp.remote-service-error 酒店系统错误 请稍后重试
    isv.invalid-parameter:ERROR_RP_NAME_INVALID 参数name错误 请检查输入参数
    isv.invalid-parameter:ERROR_RP_ENAME_INVLAID 参数ename错误 请检查输入参数
    isv.invalid-parameter:ERROR_PAYMENT_TYPE_INVALID 参数payment_type错误 请检查输入参数
    isv.invalid-parameter:ERROR_BREAKFAST_INVALID 参数breakfast_count错误 请检查输入参数
    isv.invalid-parameter:ERROR_BREAKFAST_AMONUT_INVALID 参数fee_breakfast_count或fee_breakfast_amount错误 请检查输入参数
    isv.remote-service:CONVERT_ERROR 转换对象时出错 请检查输入参数
    isv.invalid-parameter:ERROR_GAV_TAX_INVALID 参数fee_gov_tax_amount或fee_gov_tax_percent错误 请检查输入参数
    isv.invalid-parameter:ERROR_SERVICE_FEE_INVALID 参数fee_service_amount或fee_service_percent错误 请检查输入参数
    isv.invalid-parameter:ERROR_MIN_DAY_INVALID 参数min_day错误 请检查输入参数
    isv.invalid-parameter:ERROR_MAX_DAY_INVALID 参数max_day输入错误 请检查输入参数
    isv.invalid-parameter:ERROR_MIN_AMOUNT_INVALID 参数min_amount错误 请检查输入参数
    isv.invalid-parameter:ERROR_MIN_ADV_HOUR_INVALID 参数min_adv_hour错误 请检查输入参数
    isv.invalid-parameter:ERROR_MAX_ADV_HOUR_INVALID 参数max_adv_hour错误 请检查输入参数
    isv.invalid-parameter:ERROR_CANCEL_POLICY_INVALID 参数cancel_policy错误 请检查输入参数
    isv.invalid-parameter:ERROR_STATUS_INVALID 参数status错误 请检查输入参数
    isv.permission-error:NO_PERMISSIONS_ERROR 权限不够、非法访问 请申请权限或使用正确卖家操作
    isv.invalid-parameter:ERROR_RPCODE_REPEAT code重复 请检查输入参数
    isv.invalid-parameter:ERROR_RP_NOT_EXSIT rp不存在 请检查输入参数
    isv.rateplan-error:ERROR_SYSTEM_EXCEPTION 执行价格计划操作异常 请稍后重试
    isv.invalid-parameter:ERROR_START_END_TIME_INVALID 参数start_time或end_time错误 请检查输入参数

    API工具

    如何获得此API

    FAQ

    返回
    顶部