Skip to main content
Published: August 16 2010, 4:49:00 AMUpdated: November 28 2020, 8:40:23 PM

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

Here is a Java ReviseFixedPriceItem sample for revising a multi-variation item (adding and deleting a variation). This sample has been written using the Java SDK v673.

Below is the code. Corresponding SOAP request is attached with this article.

/*  © 2010-2012 eBay Inc., All Rights Reserved */
/* Licensed under CDDL 1.0 - */

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.soap.eBLBaseComponents.AmountType;
import com.ebay.soap.eBLBaseComponents.CurrencyCodeType;
import com.ebay.soap.eBLBaseComponents.ItemType;
import com.ebay.soap.eBLBaseComponents.NameValueListArrayType;
import com.ebay.soap.eBLBaseComponents.NameValueListType;
import com.ebay.soap.eBLBaseComponents.SiteCodeType;
import com.ebay.soap.eBLBaseComponents.VariationType;
import com.ebay.soap.eBLBaseComponents.VariationsType;
* Sample code for using ReviseFixedPriceItem to revise a multi-variation item using eBay Java SDK v673.
* The following steps need to be done to delete a field from 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.
* 5. Create a VariationType for each variation that is to be listed.
* 6. Add item specifics for each variation (Refer ReviseItem specifics samples)
* 7. Set all the variations to VariationsType object and set this to the item using ItemType#setVariations(VariationsType)
* 8. Set the item as the itemToBeRevised in the ReviseItemCall object.
* 9. Invoke ReviseItemCall#reviseItem() to execute the revision.

public class ReviseFixedPriceItemVariation {

     public static void reviseMultiVariationItem(){
          ApiContext apiContext = new ApiContext();
          // set API Token to access eBay API Server
          ApiCredential cred = apiContext.getApiCredential();
          apiContext.setApiServerUrl("");// 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(
          ItemType item = new ItemType();
          // Adding a new variation Blue - M 
          VariationType variation1 = new VariationType();
          // Create variation specifics
          NameValueListType sizeVariation = new NameValueListType();
          sizeVariation.setValue(new String[] { "M" });

          NameValueListType colourVariation = new NameValueListType();
          colourVariation.setValue(new String[] { "Blue" });
          NameValueListArrayType nvListArray = new NameValueListArrayType();
          nvListArray.setNameValueList(new NameValueListType[] {sizeVariation,colourVariation});
          // add variation specifics to a variation object

          AmountType amt = new AmountType();
          // Adding a new variation Brown - L
          VariationType variation2 = new VariationType();
          // Create variation specifics
          NameValueListType sizeVariation2 = new NameValueListType();
          sizeVariation2.setValue(new String[] { "L" });

          NameValueListType colourVariation2 = new NameValueListType();
          colourVariation2.setValue(new String[] { "Brown" });
          NameValueListArrayType nvListArray2 = new NameValueListArrayType();
          nvListArray2.setNameValueList(new NameValueListType[] {sizeVariation2,colourVariation2});
          // add variation specifics to a variation object

          AmountType amt2 = new AmountType();
          // Delete an existing variation Brown - M
          VariationType variation3 = new VariationType();
          VariationsType variations  = new VariationsType();
          // add individual variations to a variations object
          variations.setVariation(new VariationType[]{variation1,variation2,variation3});
          try {
          } catch (ApiException e) {
          } catch (SdkException e) {
          } catch (Exception e) {
     public static void main(String[] args) {

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