10-31-2024 08:36 PM
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.
Solved! Go to Best Answer
11-06-2024 03:14 AM
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.
11-04-2024 09:14 AM
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"
11-05-2024 12:27 AM
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
11-05-2024 01:00 AM
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?
11-05-2024 10:14 AM
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.
11-05-2024 12:25 PM
Hi,
If I want to change the name of a variation, how do I do it if I use the eBay Java SDK?
Thanks
11-05-2024 01:10 PM - edited 11-05-2024 01:18 PM
H i,
Thank you very much , I can delete one size .
Can I directly change the names of the existing sizes?
11-05-2024 02:01 PM - edited 11-05-2024 02:15 PM
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
11-06-2024 03:14 AM
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.
11-06-2024 10:54 AM
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.