Ebay ReviseFixedPriceItem 的使用及其分析

 
上次使用ebay ReviseItemcall去revise ebay上的ADs的StartPrice.发现能够将Startprice更新但是缺将ReturnPolicy的detail的值清空了。于是在Ebay call中发现了ReviseFixedPricecall。接着测试了下。
注意:如果你的ebay ADs的类型为Auction的话,请还是使用ReviseItemcall。
ReviseFixedpriceitemCall只可以Revise ADs listingType为FixedPriceItem and StoresFixedPrice不能使Auction

 
ReviseFixedPriceItemCall call = new ReviseFixedPriceItemCall();
		apiContentUtil = new ApiContentUtil();
		call.setApiContext(apiContentUtil.getApiContext());
		ItemType item = new ItemType();
		item.setItemID("110101075520");
		AmountType startPrice = new AmountType();
		startPrice.setValue(129.99);
		item.setStartPrice(startPrice);
		call.setItemToBeRevised(item);
		call.reviseFixedPriceItem();
		System.out.println(call.getRequestXml());
		System.out.println("|\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");
		System.out.println(call.getResponseXml());

其output的xml如下
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
 <S:Header>
  <ebl:RequesterCredentials SOAP-ENV:mustUnderstand="0" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebl="urn:ebay:apis:eBLBaseComponents">
   <ebl:eBayAuthToken>XXXXXXXXXXXX</ebl:eBayAuthToken>
  </ebl:RequesterCredentials>
 </S:Header>
 <S:Body>
  <ReviseFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
   <Version>705</Version>
   <Item>
    <ItemID>110101075520</ItemID>
    <StartPrice>129.99</StartPrice>
   </Item>
  </ReviseFixedPriceItemRequest>
 </S:Body>
</S:Envelope>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header/>
 <soapenv:Body>
  <ReviseFixedPriceItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
   <Timestamp>2012-07-30T03:26:32.191Z</Timestamp>
   <Ack>Success</Ack>
   <Version>781</Version>
   <Build>E781_CORE_BUNDLED_15065257_R1</Build>
   <ItemID>110101075520</ItemID>
   <StartTime>2012-07-27T07:38:12.000Z</StartTime>
   <EndTime>2012-07-30T07:38:12.000Z</EndTime>
   <Fees>
    <Fee>
     <Name>AuctionLengthFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>BoldFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>BuyItNowFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>CategoryFeaturedFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>FeaturedFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>GalleryPlusFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>FeaturedGalleryFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>FixedPriceDurationFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>GalleryFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>GiftIconFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>HighLightFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>InsertionFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>InternationalInsertionFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>ListingDesignerFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>ListingFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>PhotoDisplayFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>PhotoFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>ReserveFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>SchedulingFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>SubtitleFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>BorderFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>ProPackBundleFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>BasicUpgradePackBundleFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>ValuePackBundleFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>PrivateListingFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>ProPackPlusBundleFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
    <Fee>
     <Name>MotorsGermanySearchFee</Name>
     <Fee currencyID="USD">0.0</Fee>
    </Fee>
   </Fees>
  </ReviseFixedPriceItemResponse>
 </soapenv:Body>
</soapenv:Envelope>

发现该call能够完成更新StartPrice同时不去更新或者清空其他信息。

ebay官方网站上解释ReviseItemcall 和ReviseFixedPriceItemCall如下:
    Use this call to change the properties of a currently active fixed-price listing (including multi-variation listings).
    ReviseFixedPriceItem is nearly identical to ReviseItem and you should refer to that call for details on revising items. However, ReviseFixedPriceItem does have these differences from ReviseItem

  • ReviseFixedPriceItem supports only fields that are applicable to basic fixed-price listings and store inventory listings (it does not support fields that are exclusively applicable to auctions, classified ads, or listings with Best Offer).
  • The call gives you an option to track inventory by SKU instead of by ItemID.
  • The call supports the revising of multi-varation listings.
  • If needed, you can revise items in bulk by using the File Transfer API and Bulk Data Exchange API.



猜你喜欢

转载自jiangduxi.iteye.com/blog/1611954