Skip to main content
Published: December 17 2013, 4:10:00 PMUpdated: September 01 2022, 2:28:52 AM

When relisting a MSKU item, it sometimes picks up the Quantity and Price for an existing SKU from the original listing, and not from the explicit values I am passing in with RelistFixedPriceItem. Why is this?

When relisting an item using RelistFixedPriceItem, any variation delete nodes need to be at the top of the request Variations container. XML ordering is important. If a delete node appears at the bottom of the Variations container, any update nodes may inherit the StartPrice and Quantity from the original listing.

Let's say the item was originally listed with AddFixedPriceItem with one of Variation nodes like the following:

     <Variation>
        <SKU>RLauren_Wom_TShirt_Blu_M</SKU>
        <StartPrice>20.00</StartPrice>
        <Quantity>5</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Size (Women's)</Name>
            <Value>M</Value>
          </NameValueList>
          <NameValueList>
            <Name>Color</Name>
            <Value>Blues</Value>
          </NameValueList>
          <NameValueList>
            <Name>Shade</Name>
            <Value>Dark Blue, Navy</Value>
          </NameValueList>
        </VariationSpecifics>
      </Variation>    

Then the item was ended, and relisted using RelistFixedPriceItem. Let's assume that the intent is to delete one of the Variations, and update the StartPrice and Quantity of of one of the original Variations. Unintended behavior may occur if you use the following syntax with the Delete node at the bottom of the Variations list:

    <Variations>
      <Variation>
        <SKU>RLauren_Wom_TShirt_Blu_M</SKU>
        <StartPrice>25.00</StartPrice>
        <Quantity>8</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Size (Women's)</Name>
            <Value>M</Value>
          </NameValueList>
          <NameValueList>
            <Name>Color</Name>
            <Value>Blues</Value>
          </NameValueList>
          <NameValueList>
            <Name>Shade</Name>
            <Value>Dark Blue, Navy</Value>
          </NameValueList>
        </VariationSpecifics>
      </Variation>
      <Variation>
        <SKU>RLauren_Wom_TShirt_Blu_S</SKU>
        <Delete>true</Delete> <!--This node placement is incorrect. It should be at the top of the Variations list -->
      </Variation>
    </Variations>

In this case, the variation RLauren_Wom_TShirt_Blu_M would not pick up the intended updates, but instead would use the original StartPrice (20.00) and Quantity (5) as verified if you were to make a call to GetItem. To properly make variation updates, always ensure that the Delete node appears at the top of the Variations list, such as:

    <Variations>
      <Variation>
        <SKU>RLauren_Wom_TShirt_Blu_S</SKU>
        <Delete>true</Delete>
      </Variation>
      <Variation>
        <SKU>RLauren_Wom_TShirt_Blu_M</SKU>
        <StartPrice>25.00</StartPrice>
        <Quantity>8</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Size (Women's)</Name>
            <Value>M</Value>
          </NameValueList>
          <NameValueList>
            <Name>Color</Name>
            <Value>Blues</Value>
          </NameValueList>
          <NameValueList>
            <Name>Shade</Name>
            <Value>Dark Blue, Navy</Value>
          </NameValueList>
        </VariationSpecifics>
      </Variation>      
    </Variations>

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