cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete specific sizes of a product SKU

Hi , I am using the JAR package provided by eBay to delete specific sizes, but I am encountering the following issue. Has anyone else experienced this, and how can it be resolved?

 

The error message is as follows:

com.ebay.sdk.ApiException: Variation Specifics provided does not match with the variation specifics of the variations on the item.

 

Message 1 of 10
latest reply
1 BEST ANSWER

Accepted Solutions

Delete specific sizes of a product SKU

Hi @stepdream,

 

When you revise a listing, if you need to correct the spelling of a variation value, you first delete the variation, and then you add a new variation instead.

 

For example, suppose you realize that a set of Shoes  that you listed with Size = 5  should use Size = 5 Men. In this case, you would delete the variations with Size = 5 (or set their quantity to zero if they are not eligible for deletion,) and add new variations with Size = 5 Men instead.

Best Regards,
eBay Developer Support

View Best Answer in original post

Message 9 of 10
latest reply
9 REPLIES 9

Delete specific sizes of a product SKU

Hi @stepdream,

 

You can refer to the Knowledge Base article here,  to get the detailed information on error "Variation Specifics provided does not match with the variation specifics of the variations on the item" 

Best Regards,
eBay Developer Support
Message 2 of 10
latest reply

Delete specific sizes of a product SKU

Hi , 

It's too difficult to implement the deletion of existing Sizes using the Java SDK. Now I want to expand the Sizes. How can I make the unused Sizes not be displayed on the eBay website?

 

Thanks

Message 3 of 10
latest reply

Delete specific sizes of a product SKU

Hi , 

It's too difficult to implement the deletion of existing Sizes using the Java SDK. Now I want to expand the Sizes. How can I make the unused Sizes not be displayed on the eBay website?

 

 

 

 List<VariationType> updatedVariations = new ArrayList<>();

            int j=0;
            String[] sizes = new String[item.getVariations().getVariation().length -1];

            for (VariationType variation : variations.getVariation()) {
                String value = variation.getVariationSpecifics().getNameValueList()[0].getValue(0);
                if (!"6".equals(value)) {
                    updatedVariations.add(variation);
                }else {
                    System.out.println("delete "+value);
                }

                NameValueListArrayType specifics = variation.getVariationSpecifics();
                for (NameValueListType nameValue : specifics.getNameValueList()) {
                    if (nameValue.getName().equalsIgnoreCase("Size")) {
                        String size = nameValue.getValue(0); // 获取当前的尺寸
                        System.out.println(size);
                        if (!"6".equals(size)) {
                            sizes[j] = size;
                            j++;
                        }else {
                            System.out.println("delete "+value);
                        }
                    }
                }
            }

            ItemType itemToUpdate = new ItemType();
            //setVariationSpecificsSet
            itemToUpdate.setItemID(item.getItemID());

            String[] restsizes = new String[sizes.length];


            for (int w = 0; w < sizes.length; w++) {
                restsizes[w] = sizes[w];
            }

            NameValueListType sizeSet = new NameValueListType();

            sizeSet.setName("Size");
            sizeSet.setValue(restsizes);//

            NameValueListType[] nameValueList = new NameValueListType[1];
            NameValueListArrayType variationSpecificsSet = new NameValueListArrayType();


            nameValueList[0] = sizeSet;
            variationSpecificsSet.setNameValueList(nameValueList);

            variations.setVariation(updatedVariations.toArray(new VariationType[0]));


            itemToUpdate.setVariations(variations);

            VariationsType newVariations = new VariationsType();
            newVariations.setVariation(updatedVariations.toArray(new VariationType[0]));

            item.setVariations(newVariations);

            reviseFixedPriceItemCall.setItemToBeRevised(itemToUpdate);

            try {
                reviseFixedPriceItemCall.reviseFixedPriceItem();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }

 

 

Or can you tell me what's wrong with these codes?

Message 4 of 10
latest reply

Delete specific sizes of a product SKU

Hi @stepdream,

 

If you need to delete a variation that has already been purchased, you should set the Item.Variations.Variation.Quantity to 0. This is because you cannot completely remove a variation with purchase history, as the order line item data must remain accessible to both the buyer and the seller.

 

On the other hand, if a variation has not been purchased, you can delete it by setting the Item.Variations.Variation.Delete field to true. It is important to note that you should not use the DeletedField for this purpose.

 

For detailed instructions and additional information, refer to the "Revise and relist with variations" guide.

 

Best Regards,
eBay Developer Support
Message 5 of 10
latest reply

Delete specific sizes of a product SKU

Hi, 

If I want to change the name of a variation, how do I do it if I use the eBay Java SDK?

 

 

Thanks 

Message 6 of 10
latest reply

Delete specific sizes of a product SKU

H i,

 Thank you very much , I can delete one size . 

Can I directly change the names of the existing sizes?

 

 

 

 

Message 7 of 10
latest reply

Delete specific sizes of a product SKU

Hi , 

Can I just change the name of the size that already exists, e.g. from a size of "5" to a size of "5 Men"? (I want to keep my sales records.)

Which method should I use?

 

Thanks 

Message 8 of 10
latest reply

Delete specific sizes of a product SKU

Hi @stepdream,

 

When you revise a listing, if you need to correct the spelling of a variation value, you first delete the variation, and then you add a new variation instead.

 

For example, suppose you realize that a set of Shoes  that you listed with Size = 5  should use Size = 5 Men. In this case, you would delete the variations with Size = 5 (or set their quantity to zero if they are not eligible for deletion,) and add new variations with Size = 5 Men instead.

Best Regards,
eBay Developer Support
Message 9 of 10
latest reply

Delete specific sizes of a product SKU

@stepdream,

this free online seller tool may help with renaming variations:

https://www.isdntek.com/ebaytools/VariationScanner.htm

But hurry, the tool will quit functioning at the end of the year because a brain injury prevents me from updating to eBay's new APIs.

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 10 of 10
latest reply