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

taobao.xhotel.bnbtag.operation (民宿标签操作)

民宿标签操作

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
tag_list TopTag 可选 标签集
  • └ item_id
  • Number
  • 可选
  • 1
  • 对象id
  • └ type
  • Number
  • 可选
  • 1
  • 类型
  • └ tag_id
  • Number
  • 可选
  • 1
  • 标签ID
  • └ has_approval
  • Boolean
  • 可选
  • false
  • 标签是否需要申请审核
  • └ add_or_remove
  • Boolean
  • 可选
  • true
  • 新增还是
operation String 可选 张三 操作人名

响应参数

名称 类型 示例值 描述
result BnbResult 结果
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ result_code
  • String
  • 200
  • code码
  • └ result_msg
  • String
  • success
  • 错误信息
  • module
  • TopTagResult
  • 结果
  • └ trace_id
  • String
  • 1
  • 链路ID
  • └ success_item_id_set
  • Number []
  • 成功集合
  • └ fail_item_id_set
  • Number []
  • 失败集合

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelBnbtagOperationRequest req = new XhotelBnbtagOperationRequest();
XhotelBnbtagOperationRequest.TopTag obj1 = new XhotelBnbtagOperationRequest.TopTag();
obj1.setItemId(1L);
obj1.setType(1L);
obj1.setTagId(1L);
obj1.setHasApproval(false);
obj1.setAddOrRemove(true);
req.setTagList(obj1);
req.setOperation("张三");
XhotelBnbtagOperationResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_bnbtag_operation_response>
    <result>
        <success>true</success>
        <result_code>200</result_code>
        <result_msg>success</result_msg>
        <module>
            <trace_id>1</trace_id>
        </module>
    </result>
</xhotel_bnbtag_operation_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

返回
顶部