酒店查询接口
房型新增接口(ID重复变更新)
房型更新接口(ID不存在自动新增)
房型查询接口
房型库存推送接口(全量推送)
room实体查询
房型共享库存推送接口(批量全量)
价格计划rateplan查询
新增专享房价
价格推送接口(全量更新)
价格推送接口(批量全量)
查询rpId
复杂价格推送接口(批量全量)
复杂房价推送接口(批量增量)
复杂价格推送接口(全量更新)
复杂房价查询接口
根据gid查询卖家下所有的rpId
酒店新增接口(ID重复自动更新)
酒店更新接口(ID不存在自动新增)
酒店产品库rate查询
酒店产品库rateplan添加
价格计划rateplan更新或添加
酒店基础信息查询接口
价格推送接口(批量增量)
价格计划rateplan删除
rate删除接口
房型库存推送接口(批量增量)
酒店房型与房价查询
上传信息计算飞猪国际城市
下载飞猪国际城市结果
飞猪商品各实体通用配置
民宿房型信息添加
非标准民宿房源添加
飞猪酒店多维度服务时间维护接口
查询实体对应的服务时间数据
通用评价接口
删除酒店接口
商家删除房型数据接口
库存更新接口
复杂价格删除
酒店价格库存轻量级增量接口
商家数据-选品整体概况
选品曝光趋势
供应链选品热销标准酒店覆盖情况
不落库商家推送更新酒店rate
商家床型冲突数据接口
根据标签查询实体
民宿房东信息添加
民宿门店信息添加
民宿新增房源
民宿门店删除接口
民宿房东删除接口
民宿房源删除接口
民宿营销活动更新
民宿卖家活动删除
民宿查询营销活动
自促活动申请接口
自促活动解绑接口
自促活动绑定接口
对外开放评论接口
通用调用top接口
top房型状态修改
酒店状态更新
删除 x 元素
查询 x 元素
对外开放评论接口
新增/更新营销活动
直连营销活动解绑资源
直连营销活动绑定资源
直连营销活动和绑定资源查询
民宿状态外呼确认接口
进酒自动化同步房源打标
进酒聚合房源同步多房源关联关系
民宿聚合房源增量rp同步
民宿大模型轮询结果
民宿大模型通用调用
环境 | HTTP请求地址 | HTTPS请求地址 |
---|---|---|
正式环境 | http://gw.api.taobao.com/router/rest | https://eco.taobao.com/router/rest |
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
method | String | 是 | API接口名称。 |
app_key | String | 是 | TOP分配给应用的AppKey。 |
target_app_key | String | 否 | 被调用的目标AppKey,仅当被调用的API为第三方ISV提供时有效。 |
sign_method | String | 是 | 签名的摘要算法,可选值为:hmac,md5。 |
sign | String | 是 | API输入参数签名结果,签名算法介绍请点击这里。 |
session | String | 否 | 用户登录授权成功后,TOP颁发给应用的授权信息,详细介绍请点击这里。当此API的标签上注明:“需要授权”,则此参数必传;“不需要授权”,则此参数不需要传;“可选授权”,则此参数为可选。 |
timestamp | String | 是 | 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8,例如:2015-01-01 12:00:00。淘宝API服务端允许客户端请求最大时间误差为10分钟。 |
format | String | 否 | 响应格式。默认为xml格式,可选值:xml,json。 |
v | String | 是 | API协议版本,可选值:2.0。 |
partner_id | String | 否 | 合作伙伴身份标识。 |
simplify | Boolean | 否 | 是否采用精简JSON返回格式,仅当format=json时有效,默认值为:false。 |
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
param | String | 可选 | {} | 参数 | |
scene | String | 可选 | rankList | 业务场景 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
module | String | success | success |
1 2 3 4 5 6 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); XhotelBnbcommonAddRequest req = new XhotelBnbcommonAddRequest(); req.setParam( "{}" ); req.setScene( "rankList" ); XhotelBnbcommonAddResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 | ITopClient client = new DefaultTopClient(url, appkey, secret); XhotelBnbcommonAddRequest req = new XhotelBnbcommonAddRequest(); req.Param = "{}" ; req.Scene = "rankList" ; XhotelBnbcommonAddResponse rsp = client.Execute(req, sessionKey); Console.WriteLine(rsp.Body); |
1 2 3 4 5 6 7 | $c = new TopClient; $c ->appkey = $appkey ; $c ->secretKey = $secret ; $req = new XhotelBnbcommonAddRequest; $req ->setParam( "{}" ); $req ->setScene( "rankList" ); $resp = $c ->execute( $req , $sessionKey ); |
1 2 3 4 5 6 7 8 9 10 11 12 13 | -H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \ -d 'app_key=12129701' \ -d 'format=json' \ -d 'method=taobao.xhotel.bnbcommon.add' \ -d 'partner_id=apidoc' \ -d 'session=176be49e-1de7-42e7-b6c4-168a7b895041' \ -d 'sign=E120EA57533EF707F0B22AC6BEFBCC4B' \ -d 'sign_method=hmac' \ -d 'timestamp=2025-07-03+23%3A39%3A08' \ -d 'v=2.0' \ -d 'param=%7B%7D' \ -d 'scene=rankList' |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # -*- coding: utf-8 -*- import top.api req = top.api.XhotelBnbcommonAddRequest(url,port) req.set_app_info(top.appinfo(appkey,secret)) req.param = "{}" req.scene = "rankList" try : resp = req.getResponse(sessionkey) print (resp) except Exception,e: print (e) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | pTopRequest pRequest = alloc_top_request(); pTopResponse pResponse = NULL; pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret); set_api_name(pRequest, "taobao.xhotel.bnbcommon.add" ); add_param(pRequest, "param" , "{}" ); add_param(pRequest, "scene" , "rankList" ); pResponse = top_execute(pClient,pRequest,sessionKey); printf( "ret code:%d\n" ,pResponse - >code); if (pResponse - >code = = 0 ){ pTopResponseIterator ite = init_response_iterator(pResponse); pResultItem pResultItem = alloc_result_item(); while (parseNext(ite, pResultItem) = = 0 ){ printf( "%s:%s\n" ,pResultItem - >key,pResultItem - >value); } destroy_response_iterator(ite); destroy_result_item(pResultItem); } destroy_top_request(pRequest); destroy_top_response(pResponse); destroy_taobao_client(pClient); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | TopClient = require( './topClient' ).TopClient; var client = new TopClient({ 'appkey' : 'appkey' , 'appsecret' : 'secret' , }); client.execute( 'taobao.xhotel.bnbcommon.add' , { 'param' : '{}' , 'scene' : 'rankList' }, function(error, response) { if (!error) console.log(response); else console.log(error); }) |
1 2 3 | < xhotel_bnbcommon_add_response > < module >success</ module > </ xhotel_bnbcommon_add_response > |
1 2 3 4 5 | { "xhotel_bnbcommon_add_response" :{ "module" : "success" } } |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
1 2 3 4 5 6 7 8 | { "error_response" :{ "msg" : "Remote service error" , "code" :50, "sub_msg" : "非法参数" , "sub_code" : "isv.invalid-parameter" } } |
错误码 | 错误描述 | 解决方案 |
---|