Skip to main content
Published: August 13 2010, 4:38:00 AMUpdated: November 28 2020, 8:39:34 PM

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

Here is a Java Basic ReviseFixedPriceItem sample. This sample has been written using the Java SDK v673 and demonstrates how to revise the title of an item.

 

Below is the code sample. The request XML is attached to this article.

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

package com.ebay.sample;

import com.ebay.sdk.ApiContext;
import com.ebay.sdk.ApiCredential;
import com.ebay.sdk.ApiException;
import com.ebay.sdk.SdkException;
import com.ebay.sdk.call.ReviseFixedPriceItemCall;
import com.ebay.soap.eBLBaseComponents.ItemType;
import com.ebay.soap.eBLBaseComponents.SiteCodeType;

/**
* Sample code for using ReviseFixedPriceItem to delete a field using eBay Java SDK v673
*
* 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(){
          ApiContext apiContext = new ApiContext(); // Create a new APIContext Object
          
          // set Api Token to access eBay Api Server
          ApiCredential cred = apiContext.getApiCredential();
          cred.seteBayToken("YourToken");
          
          apiContext.setApiServerUrl("https://api.sandbox.ebay.com/wsapi");// Pointing to SandBox for testing
          
          // Enable logging of SOAP requests and responses. Recommended only for testing/debugging.
          apiContext.getApiLogging().setLogSOAPMessages(true);
          
          apiContext.setSite(SiteCodeType.UK); // Set site to UK
          
          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