Skip to main content
Published: June 29 2011, 12:09:00 PMUpdated: August 22 2022, 2:34:02 PM

I need to modify a variation definition.  For instance, I need to change the Inseam for my variations 32 " to 34 ".  How can I use the API to make the change?

Summary

If you need to change the definition of a variation, you need to delete the variation and then add a new variation.

Detailed Description

Lets use the following scenario, where an item is listed with the following AddFixedPriceItem request:

<?xml version="1.0" encoding="utf-8"?>
<AddFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <WarningLevel>High</WarningLevel>
  <Item>
    <ConditionID>1000</ConditionID>

    <Country>US</Country>
    <Currency>USD</Currency>
    <Description>test - pants</Description>
    <DispatchTimeMax>2</DispatchTimeMax>
    <
ListingDuration>GTC</ListingDuration>
    <PaymentMethods>PayPal</PaymentMethods>
    <PayPalEmailAddress>test@test.com</PayPalEmailAddress>
    <PictureDetails>
      <PictureURL>http://i1.sandbox.ebayimg.com/03/i/00/99/49/59_12.JPG?set_id=880000500F</PictureURL>
    </PictureDetails>
    <
PrimaryCategory>
      <CategoryID>57989</CategoryID>
    </PrimaryCategory>
    <PostalCode>75211</PostalCode>
    <
ShippingDetails>
      <ShippingServiceOptions>
        <ShippingService>ShippingMethodStandard</ShippingService>
        <ShippingServiceCost currencyID="USD">3.0</ShippingServiceCost>
        <ShippingServiceAdditionalCost currencyID="USD">3.0</ShippingServiceAdditionalCost>
        <ShippingServicePriority>1</ShippingServicePriority>
      </ShippingServiceOptions>
    </ShippingDetails>
    <InventoryTrackingMethod>SKU</InventoryTrackingMethod>
    <
SKU>SKU1</SKU>
    <ReturnPolicy>
      <RefundOption>MoneyBack</RefundOption>
      <ReturnsWithinOption>Days_7</ReturnsWithinOption>
      <ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
    </ReturnPolicy>
    <Title>test - pants</Title>
    <
ItemSpecifics>
      <NameValueList>
        <Name>Style</Name>
        <Value>Casual Pants</Value>
      </NameValueList>
      <NameValueList>
        <Name>Size Type</Name>
        <Value>Regular</Value>
      </NameValueList>
      <NameValueList>
        <Name>Brand</Name>
        <Value>Arizona</Value>
      </NameValueList>
      <NameValueList>
        <Name>Color</Name>
        <Value>Blacks</Value>
      </NameValueList>
      <NameValueList>
        <Name>Shade</Name>
        <Value>Black</Value>
      </NameValueList>
      <NameValueList>
        <Name>Bottoms Size (Men's)</Name>
        <Value>M</Value>
      </NameValueList>

    </
ItemSpecifics>
    <Variations>
      <Variation>
        <SKU>VarSKU1</SKU>
        <StartPrice currencyID="USD">10</StartPrice>
        <Quantity>10</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Inseam</Name>
            <Value>32 "</Value>
        </NameValueList>
       </VariationSpecifics>
      </Variation>
      <Variation>
        <SKU>VarSKU2</SKU>
        <StartPrice currencyID="USD">10</StartPrice>
        <Quantity>5</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Inseam</Name>
            <Value>33 "</Value>
          </NameValueList>
        </VariationSpecifics>
      </Variation>
      <VariationSpecificsSet>
        <NameValueList>
          <Name>Inseam</Name>
          <Value>32 "</Value>
          <Value>33 "</Value>
        </NameValueList>
      </VariationSpecificsSet>
    </Variations>
  </Item>
  <RequesterCredentials>
    <eBayAuthToken>*****</eBayAuthToken>
  </RequesterCredentials>
</AddFixedPriceItemRequest>

 

Now assume that you need to change the Inseam value for varSKU1 from 32 " to 34 ", but need to retain the same SKU ID.



If there is no sale for varSKU1, you can execute the ReviseFixedPriceItem request:

<?xml version="1.0" encoding="utf-8"?>
<ReviseFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <WarningLevel>High</WarningLevel>
  <Item>
    <SKU>SKU1</SKU>
    <Variations>
      <Variation>
        <SKU>VarSKU1</SKU>
        <Delete>true</Delete>
      </Variation>
      <Variation>
        <SKU>VarSKU1</SKU>
        <StartPrice currencyID="USD">10</StartPrice>
        <Quantity>1</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Inseam</Name>
            <!-- <Value>32 "</Value>-->
            <Value>34 "</Value>
          </NameValueList>
        </VariationSpecifics>
      </Variation>
      <VariationSpecificsSet>
        <NameValueList>
          <Name>Inseam</Name>
          <!-- <Value>32 "</Value>-->
          <Value>33 "</Value>
          <Value>34 "</Value>
        </NameValueList>
      </VariationSpecificsSet>
    </Variations>
  </Item>
  <RequesterCredentials>
    <eBayAuthToken>******</eBayAuthToken>
   </RequesterCredentials>
</ReviseFixedPriceItemRequest>


If there is a sale, you will need to end the item and Relist as below:

<?xml version="1.0" encoding="utf-8"?>
<RelistFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <WarningLevel>High</WarningLevel>
  <Item>
    <InventoryTrackingMethod>SKU</InventoryTrackingMethod>

    <SKU>SKU1</SKU>
    <Variations>
      <Variation>
        <SKU>VarSKU1</SKU>
        <Delete>true</Delete>
      </Variation>
      <Variation>
        <SKU>VarSKU1</SKU>
        <StartPrice currencyID="USD">10</StartPrice>
        <Quantity>1</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Inseam</Name>
            <!-- <Value>32 "</Value>-->
            <Value>34 "</Value>
          </NameValueList>
        </VariationSpecifics>
      </Variation>
      <VariationSpecificsSet>
        <NameValueList>
          <Name>Inseam</Name>
          <!-- <Value>32 "</Value>-->
          <Value>33 "</Value>
          <Value>34 "</Value>
        </NameValueList>
      </VariationSpecificsSet>
    </Variations>
  </Item>
  <RequesterCredentials>
    <eBayAuthToken>******</eBayAuthToken>
   </RequesterCredentials>
</RelistFixedPriceItemRequest>

 


 

Additional Information:

Documentation:  Multi-Variation Listings

 

How well did this answer your question?
Answers others found helpful