Welcome Guest. Sign in or Signup

1 Answers

Java SDK: AddFixedPriceItem sample for multi-variation listings in US

Asked by: 401 views Programming


Java SDK AddFixedPriceItem sample for multi-variation listings in US.

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

public class AppAddFixedPriceItemWithMultiVariation {

    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

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.

        // set API Token to access eBay API Server
        ApiCredential cred = apiContext.getApiCredential();
        cred.seteBayToken(“YOUR TOKEN”);

        // set the site

        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