Skip to main content
Published: March 17 2011, 4:33:00 PMUpdated: November 28 2020, 9:13:04 PM

The RelistFixedPriceItem call can be used to to relist fixed-price item that has ended. It is recommended to use this call instead of creating a new listing using the AddFixedPriceItem call to take advantage of the recent sales score associated with the listing.

Here is a Java RelistFixedPriceItem sample for re-listing an item with some minor modifications (title updated. subtitle deleted).

/*
© 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.*;

/**
* Sample code to relist an item (with minor modifications) using the RelistFixedPriceItem call
*
* 1. Create an ApiContext Object
* 2. Set the auth token and target api url (Webservice endpoint)
* 3. Create a RelistFixedPriceItemCall object.
* 4. Create an item object and set the SKU for the item whose field(s) is/are to added/modified.
* 5. Set the InventoryTrackingMethod in the item object and set it to the ReviseFixedPriceItemCall object.
* 6. Execute the API call RelistFixedPriceItemCall.relistFixedPriceItem() to relist the listing
*
*/
public class RelistFPItemWithMods {

    public static void relistFixedPriceItem() {
        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");
        ApiCredential cred = apiContext.getApiCredential();
        cred.seteBayToken("YOUR TOKEN");
        apiContext.setApiCredential(cred);

        // Set site to US
        apiContext.setSite(SiteCodeType.US); 

        RelistFixedPriceItemCall relistCall = new RelistFixedPriceItemCall(apiContext);

        ItemType item = new ItemType();

        item.setSKU("CODE_SAMPLE_REVISE_FPITEM_SKU1");
        item.setInventoryTrackingMethod(InventoryTrackingMethodCodeType.SKU);
        item.setTitle("**TEST ITEM-Relisting item with new title-DO NOT BID**");
        try {
            relistCall.setDeletedField(new String[]{"Item.SubTitle"});
            relistCall.setItemToBeRelisted(item);
            relistCall.relistFixedPriceItem();
            System.out.println("The sku : " + item.getSKU() + " is relisted with new ItemID : " + relistCall.getReturnedItemID());
        } catch (ApiException e) {
            e.printStackTrace();
        } catch (SdkException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    public static void main(String[] args) {
        relistFixedPriceItem();
    }
}

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