taobao.xhotel.cm.ota.hotelrateamountnotif.post (CM价格推送接口)

CM价格推送接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ota_request OpenApi4CMRequest 必须 请求体
  • head
  • Head
  • 可选
  • 请求头
  • └ vendor_key
  • String
  • 必须
  • fliggy
  • 供应商Code
  • └ vendor_code
  • String
  • 必须
  • teqwyuiriwer==
  • 供应商Key
  • └ body
  • String
  • 必须
  • <OTA_HotelRateAmountNotifRQ Version="1.0" EchoToken="traceID" PrimaryLangID="en-us" TimeStamp="2021-10-10T09:30:47Z" xmlns="http://www.opentravel.org/OTA/2003/05"> <RateAmountMessages HotelCode="54394"> <RateAmountMessage> <StatusApplicationControl InvTypeCode="10589645" RatePlanCode="1894567"/> <Rates> <Rate Start="2021-10-19" End="2021-11-20"> <BaseByGuestAmts> <BaseByGuestAmt AgeQualifyingCode="10" AmountAfterTax="100.00" CurrencyCode="EUR" NumberOfGuests="1"/> <BaseByGuestAmt AgeQualifyingCode="10" AmountAfterTax="200.00" CurrencyCode="EUR" NumberOfGuests="2"/> <BaseByGuestAmt AgeQualifyingCode="10" AmountAfterTax="300.00" CurrencyCode="EUR" NumberOfGuests="3"/> <BaseByGuestAmt AgeQualifyingCode="10" AmountAfterTax="400.00" CurrencyCode="EUR" NumberOfGuests="4"/> </BaseByGuestAmts> </Rate> </Rates> </RateAmountMessage> </RateAmountMessages> </OTA_HotelRateAmountNotifRQ>
  • 请求内容

响应参数

名称 类型 示例值 描述
ote_response OpenApi4CMResponse 响应体
  • head
  • Head
  • 响应头
  • └ trace_id
  • String
  • 213da4a617726185866304460d2587
  • traceId
  • └ body
  • String
  • <OTA_HotelRateAmountNotifRS Version="1.0" EchoToken="traceID" PrimaryLangID="en-us" TimeStamp="2021-10-10T09:30:47Z" xmlns="http://www.opentravel.org/OTA/2003/05"> <Success/> <UniqueID ID="12345" Type="505"/> </OTA_HotelRateAmountNotifRS>
  • 响应内容

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelCmOtaHotelrateamountnotifPostRequest req = new XhotelCmOtaHotelrateamountnotifPostRequest();
XhotelCmOtaHotelrateamountnotifPostRequest.OpenApi4CMRequest obj1 = new XhotelCmOtaHotelrateamountnotifPostRequest.OpenApi4CMRequest();
XhotelCmOtaHotelrateamountnotifPostRequest.Head obj2 = new XhotelCmOtaHotelrateamountnotifPostRequest.Head();
obj2.setVendorKey("fliggy");
obj2.setVendorCode("teqwyuiriwer==");
obj1.setHead(obj2);
obj1.setBody("<OTA_HotelRateAmountNotifRQ Version=\"1.0\" EchoToken=\"traceID\" PrimaryLangID=\"en-us\" TimeStamp=\"2021-10-10T09:30:47Z\"     xmlns=\"http://www.opentravel.org/OTA/2003/05\">     <RateAmountMessages HotelCode=\"54394\">         <RateAmountMessage>             <StatusApplicationControl InvTypeCode=\"10589645\" RatePlanCode=\"1894567\"/>             <Rates>               <Rate Start=\"2021-10-19\" End=\"2021-11-20\">                 <BaseByGuestAmts>                   <BaseByGuestAmt AgeQualifyingCode=\"10\" AmountAfterTax=\"100.00\" CurrencyCode=\"EUR\" NumberOfGuests=\"1\"/>                   <BaseByGuestAmt AgeQualifyingCode=\"10\" AmountAfterTax=\"200.00\" CurrencyCode=\"EUR\" NumberOfGuests=\"2\"/>                   <BaseByGuestAmt AgeQualifyingCode=\"10\" AmountAfterTax=\"300.00\" CurrencyCode=\"EUR\" NumberOfGuests=\"3\"/>                   <BaseByGuestAmt AgeQualifyingCode=\"10\" AmountAfterTax=\"400.00\" CurrencyCode=\"EUR\" NumberOfGuests=\"4\"/>                 </BaseByGuestAmts>               </Rate>             </Rates>         </RateAmountMessage>     </RateAmountMessages> </OTA_HotelRateAmountNotifRQ>");
req.setOtaRequest(obj1);
XhotelCmOtaHotelrateamountnotifPostResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_cm_ota_hotelrateamountnotif_post_response>
    <ote_response>
        <head>
            <trace_id>213da4a617726185866304460d2587</trace_id>
        </head>
        <body>&lt;OTA_HotelRateAmountNotifRS Version=&quot;1.0&quot; EchoToken=&quot;traceID&quot; PrimaryLangID=&quot;en-us&quot; TimeStamp=&quot;2021-10-10T09:30:47Z&quot;     xmlns=&quot;http://www.opentravel.org/OTA/2003/05&quot;&gt;     &lt;Success/&gt;     &lt;UniqueID ID=&quot;12345&quot; Type=&quot;505&quot;/&gt; &lt;/OTA_HotelRateAmountNotifRS&gt;</body>
    </ote_response>
</xhotel_cm_ota_hotelrateamountnotif_post_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

返回
顶部