For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

ReviseItem Sample

  • Answer ID 845
  • Published 06/18/2015 04:51 PM
  • Updated 06/18/2015 04:51 PM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=845
Product
Sample ReviseItem call to demonstrate how to revise various properties of an Item.

Sample ReviseItem call to demonstrate  how to revise various properties of an Item.


Summary

Sample ReviseItem call to demonstrate  how to revise various properties of an Item.



Detailed Description


To revise an Item, you need to ensure that it follows the guidelines laid out in the documentation section Restrictions on Changing Item Properties During a Revise .  The way to modify a field, depends on which field you are modifying.  For instance, if you need to modify the title, you just need to send in the Title again in the ReviseItem call.  To remove property, if permitted, you need either send in the the container of that property and omit the property, or use DeletedField.

Here is an illustration of some of the common fields that are revised.

Sample AddItem request:
 

<?xml version="1.0" encoding="utf-8"?>

<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">

  <Version>491</Version>

  <Item>

    <ApplicationData>test</ApplicationData>

    <Country>US</Country>

    <Currency>USD</Currency>

    <Description>Item 1</Description>

    <ListingDuration>Days_7</ListingDuration>

    <ListingType>FixedPriceItem</ListingType>

    <PostalCode>95125</PostalCode>

    <PaymentMethods>PersonalCheck</PaymentMethods>

    <PaymentMethods>MOCC</PaymentMethods>

    <PaymentMethods>PayPal</PaymentMethods>

    <PaymentMethods>VisaMC</PaymentMethods>

    <PayPalEmailAddress>test@test.com</PayPalEmailAddress>

    <PrimaryCategory>

      <CategoryID>1411</CategoryID>

    </PrimaryCategory>

    <Quantity>3</Quantity>

    <ShippingDetails>

      <ShippingServiceOptions>

        <ShippingService>ShippingMethodExpress</ShippingService>

        <ShippingServiceCost currencyID="USD">4.99</ShippingServiceCost>

        <ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>

        <ShippingServicePriority>1</ShippingServicePriority>

      </ShippingServiceOptions>

      <ShippingServiceOptions>

        <ShippingService>UPSGround</ShippingService>

        <ShippingServiceCost currencyID="USD">2.99</ShippingServiceCost>

        <ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>

        <ShippingServicePriority>2</ShippingServicePriority>

      </ShippingServiceOptions>

    </ShippingDetails>

    <ShipToLocations>US</ShipToLocations>

    <Site>US</Site>

    <StartPrice currencyID="USD">6.99</StartPrice>

    <Storefront>

      <StoreCategoryID>1</StoreCategoryID>

      <StoreCategory2ID>4</StoreCategory2ID>

    </Storefront>

    <Title>test do not bid 1</Title>

    <PictureDetails>

      <GalleryType>Gallery</GalleryType>

      <GalleryURL>http://www.mydomain.com/pic1.jpg</GalleryURL>

      <PictureURL>http://www.mydomain.com/pic1.jpg</PictureURL>

    </PictureDetails>

  </Item>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

</AddItemRequest>


Here is the ReviseItem call to modify the following:
1.  Remove the PaymentMethod MOCC

2.  Change the Quantity

3.  Remove the ShippingMethod UPS Ground

4.  Change the StartPrice

5.  Change the Title

6.  Change the PictureURLs

 

<?xml version="1.0" encoding="utf-8"?>

<ReviseItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">

  <Version>491</Version>

  <WarningLevel>High</WarningLevel>

  <DeletedField>Item.ApplicationData</DeletedField>

  <Item>

    <ItemID>110012616214</ItemID>

    <Description>Item 1 - revised</Description>

    <!--Removed MOCC

    <PaymentMethods>MOCC</PaymentMethods>

     -->

    <PaymentMethods>PayPal</PaymentMethods>

    <PaymentMethods>PersonalCheck</PaymentMethods>

    <PaymentMethods>VisaMC</PaymentMethods>

    <PrimaryCategory>

      <CategoryID>1411</CategoryID>

    </PrimaryCategory>

    <!--Changed Quantity -->

    <Quantity>2</Quantity>

    <ShippingDetails>

      <ShippingServiceOptions>

        <ShippingService>ShippingMethodExpress</ShippingService>

        <ShippingServiceCost currencyID="USD">4.99</ShippingServiceCost>

        <ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>

        <ShippingServicePriority>1</ShippingServicePriority>

      </ShippingServiceOptions>

      <!--Remove UPSGround

      <ShippingServiceOptions>

        <ShippingService>UPSGround</ShippingService>

        <ShippingServiceCost currencyID="USD">2.99</ShippingServiceCost>

        <ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>

        <ShippingServicePriority>2</ShippingServicePriority>

      </ShippingServiceOptions>

 -->

    </ShippingDetails>

    <!--Changed StartPrice -->

    <StartPrice currencyID="USD">5.99</StartPrice>

    <Storefront>

      <StoreCategoryID>1</StoreCategoryID>

      <StoreCategory2ID>4</StoreCategory2ID>

    </Storefront>

    <!--Changed title  -->

    <Title>title modified</Title>

    <!--Changed picture  -->

    <PictureDetails>

      <GalleryType>Gallery</GalleryType>

      <GalleryURL>http://www.mydomain.com/pic2.jpg</GalleryURL>

      <PictureURL>http://www.mydomain.com/pic2.jpg</PictureURL>

    </PictureDetails>

  </Item>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

</ReviseItemRequest>

Note:

Do not use ModifiedField as this has been deprecated since 439, and using it may cause unexpected results.


Version Info

The code example above was based on the versions specified below:

API Schema Version 491



Additional Resources

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter