Skip to main content
Published: March 17 2011, 4:05:00 PMUpdated: November 28 2020, 9:14:46 PM

Use the ReviseFixedPriceItem call to change the properties of a currently active fixed-price listing.

Here is a Java SDK Basic ReviseFixedPriceItem sample. This sample demonstrates how to revise the title of an item.

/*
© 2011-2013 eBay Inc., All Rights Reserved
Licensed under CDDL 1.0 - http://opensource.org/licenses/cddl1.php
*/

import com.ebay.sdk.*;
import com.ebay.sdk.call.*;
import com.ebay.soap.eBLBaseComponents.*;

/**
*
* The following steps need to be done to add/modify basic field(s) in an existing listing.
*
* 1. Create an ApiContext Object
* 2. Set the auth token and target api url (Webservice endpoint)
* 3. Create a ReviseFixedPriceItemCall object.
* 4. Create an item object and set the SKU for the item whose field(s) is/are to added/modified.
* 5. Modify/add the fields in the item object and set it to the ReviseFixedPriceItemCall object.
* 6. Execute the API call ReviseFixedPriceItemCall#reviseFixedPriceItem() to revise the listing.
*
*/

public class ReviseFixexPriceItemBasic {
public static void reviseFixedPriceItemBasic(){

         // Create a new APIContext Object
          ApiContext apiContext = new ApiContext();            
          ApiCredential cred = apiContext.getApiCredential();
         ApiLogging apiLogging = new ApiLogging();
         apiContext.setApiLogging(apiLogging);
 
          // set the server url and credentials for Sandbox
          apiContext.setApiServerUrl("https://api.sandbox.ebay.com/wsapi");
          cred.seteBayToken("YourToken");
         
          // Set site to US
          apiContext.setSite(SiteCodeType.US);  
            
          ReviseFixedPriceItemCall rfp = new ReviseFixedPriceItemCall(apiContext);
           
          ItemType item = new ItemType();
          item.setSKU("CODE_SAMPLE_REVISE_FPITEM_SKU1");
          item.setTitle("Testing-DO NOT BID - Changed Title");
           
          rfp.setItemToBeRevised(item);
           
          try {
               rfp.reviseFixedPriceItem();
          } catch (ApiException e) {
               e.printStackTrace();
          } catch (SdkException e) {
               e.printStackTrace();
          } catch (Exception e) {
               e.printStackTrace();
          }
           
     }
     public static void main(String[] args) {
          reviseFixedPriceItemBasic();
     }

}

How well did this answer your question?
Answers others found helpful