Welcome Guest. Sign in or Signup

1 Answers

Java SDK: AddFixedPriceItem sample for listing an item with product identifier (ePID) in US

Asked by: 268 views Programming

Java SDK AddFixedPriceItem sample for listing an item with an product identifier (ePID).

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

public class AppAddItemWithePID {

    public static ApiContext createApiContext() {
        ApiContext apiContext = new ApiContext();
        ApiLogging apiLogging = new ApiLogging();

        CallRetry cr = new CallRetry();
        cr.setDelayTime(1000); // Wait for one second between each retry-call.

        String[] apiErrorCodes = new String[]{“502”};
        // Set trigger exceptions for CallRetry.

        // Build a dummy SdkSoapException so that we can get its Class.
        Class[] tcs = new Class[]{com.ebay.sdk.SdkSoapException.class};

        // set the server url and credentials for Sandbox
        ApiCredential cred = apiContext.getApiCredential();
        cred.seteBayToken(“YOUR TOKEN”);

        // Set site to US

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

        return apiContext;

    private static FeesType addFixedItem() throws ApiException, SdkException, Exception {

        FeesType fee = null;
        AddFixedPriceItemCall request = new AddFixedPriceItemCall(createApiContext());

        ItemType item = new ItemType();
        item.setTitle(“Testing item. Dont bid”);
        item.setDescription(“Testing item. Dont bid”);

        // set the item condition depending on the value from GetCategoryFeatures


        // Track inventory by SKU

        // Specify unique SKU