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

taobao.xhotel.entity.config (飞猪商品各实体通用配置)

飞猪商品各实体通用配置服务

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
entity_code String 可选 abc 实体编码,例如酒店编码,房价编码
config_data String 可选 [{"invoice_status":"1"},{"invoice_has":"1"},{"invoice_canvat":"1"},{"invoice_provider":"2"},{"invoice_channel":"1"},{"invoice_payer":"1"},{"invoice_type":"1,2,3"},{"invoice_desc":"测试发票描叙123"}] 格式为:[{"invoice_status":"1"},{"invoice_has":"1"},{"invoice_canvat":"1"},{"invoice_provider":"2"},{"invoice_channel":"1"},{"invoice_payer":"1"},{"invoice_type":"1,2,3"},{"invoice_desc":"测试发票描叙123"}] key-value形式的配置信息其中invoice_status为发票状态,取值为0(无效),1(有效);invoice_has是否能开发票,1(能),0(不能);invoice_canvat是否能提供增值税专用发票1(能),0(不能);invoice_provider发票提供方1(酒店提供),2(卖家邮寄);invoice_channel开票渠道,1(线下开具),14(全电);invoice_payer邮费承担方,1(卖家承担),2(买家承担-邮费到付), 3(卖家承担,邮费¥XX);invoice_type开票类型 1(代订房费),2(旅游费) 3(差旅费) 4(卖家提供Email版收据) 如果多个请以英文逗号隔开,例如1,2,3。invoice_desc发票补充说明,如果没有可以填写无,长度不要超过20字符。该接口是全量更新的形式,每次更新必须要携带这些节点信息,如果想失效掉该rp上的发票信息,那么可以将invoice_status设置为0。
vendor String 可选 taobao 默认是taobao。和酒店,房型等实体上的vendor保持一致。
entity_id Number 可选 123 实体id,例如酒店id,房型id(飞猪平台的id),rpid等,目前仅支持hid
type Number 可选 5
  • 默认值:0
  • 实体类型:1:卖家维度,2:酒店维度,3:房型维度,4:宝贝维度,5:rp维度。请注意目前仅支持类型2

    响应参数

    名称 类型 示例值 描述

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    XhotelEntityConfigRequest req = new XhotelEntityConfigRequest();
    req.setEntityCode("abc");
    req.setConfigData("[{\"invoice_status\":\"1\"},{\"invoice_has\":\"1\"},{\"invoice_canvat\":\"1\"},{\"invoice_provider\":\"2\"},{\"invoice_channel\":\"1\"},{\"invoice_payer\":\"1\"},{\"invoice_type\":\"1,2,3\"},{\"invoice_desc\":\"测试发票描叙123\"}]");
    req.setVendor("taobao");
    req.setEntityId(123L);
    req.setType(5L);
    XhotelEntityConfigResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <xhotel_entity_config_response>
    </xhotel_entity_config_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

    返回
    顶部