Index

eBay Listing JavaScript methods

Name Parameters Return Type Description
function deleteVariation(variation) variation: Variation void Delete the given variation from the listing (can be retrieved via the variations property).

Sample Script

// Delete all variations that have the term "Green" included in the primary value
function run() {
    for (listing of selectedListings) {
    	const variationsToDelete = [];
	    for (variation of listing.variations) {
	    	if (variation.primaryValue.includes("Green")) {
	    		variationsToDelete.push(variation);
	    	}
	    }
	    
	    for (variation of variationsToDelete) {
	    	consoleLog("Will delete variation " + variation.primaryValue);
	    	listing.deleteVariation(variation);
	    }
    }
 }


<< eBay Listing JavaScript properties Image JavaScript properties >>