Use the ReviseFixedPriceItem call to change the properties of a currently active fixed-price listing.
Here is a Java ReviseFixedPriceItem sample for revising item specifics. This sample has been written using the Java SDK v673 and demonstrates how to revise the title of a listing.
Below is the sample code. The request XML is attached to this article.
/**
* Sample code for Revising Fixed Price item with eBay Java SDK v673.
*
* The following needs to be done for executing RevisFixedPriceItem call to revise item specifics
*
* 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.
* 5. Create a NameValueListType for each Item Specific that is to be defined.
* 6. Create a NameValueListArrayType object and add all the NameValueListType objects to it.
* 7. Set the NameValueListArrayType to the item using ItemType#setItemSpecifics(NameValueListArrayType)
* 8. Execute the revision using ReviseFixedPriceItemCall#reviseFixedPriceItem()
*
*
*/
public class ReviseFPItemSpecificsSample {
public static void reviseFixedPriceItemSpecifics() {
ApiContext apiContext = new ApiContext();
// 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.
apiContext.getApiLogging().setLogSOAPMessages(true);// This will log SOAP requests and responses
apiContext.setSite(SiteCodeType.UK); // Set site to UK
ReviseFixedPriceItemCall reviseFP = new ReviseFixedPriceItemCall(
apiContext);
ItemType item = new ItemType();
item.setSKU("CODE_SAMPLE_REVISE_FPITEM_SKU1"); // We are using SKU to identify items
// Create 3 item specifics for SKU CODE_SAMPLE_REVISE_FP_SKU-1
NameValueListArrayType specificsList = new NameValueListArrayType();