Skip to main content
Published: July 18 2012, 3:43:00 PMUpdated: August 23 2022, 5:47:50 AM

I am getting error -21916608 "Variation cannot be deleted during restricted revise" while making a ReviseFixedPriceItem api call. Why ?

Case 1 : One of the reason could be because of some value(s) is missing in the VariationSpecificSet node while Revising the item.

How to check :

1. Make a GetItem api call with the item-id

2. Note the values in VariationSpecificSet node . Lets assume this is what you see :

- <VariationSpecificsSet>
- <NameValueList>
  <Name>Size</Name>
  <Value>S</Value>
  <Value>M</Value>
  <Value>L</Value>
  </NameValueList>
- <NameValueList>
  <Name>Color</Name>
  <Value>Blues</Value>
  <Value>Pinks</Value>
  </NameValueList>
- <NameValueList>
  <Name>Shade</Name>
  <Value>chalk pink</Value>
  <Value>glass blue</Value>
  </NameValueList>
  </VariationSpecificsSet>
  </Variations>

3. Now check your Revise api call and make sure all these are present while making the call.

If you make the Revise call with the following VariationSpecificsSet node, it will not work.

- <VariationSpecificsSet>
- <NameValueList>
  <Name>Size</Name>
  <Value>S</Value>
  <Value>M</Value> 
  </NameValueList>
- <NameValueList>
  <Name>Color</Name>
  <Value>Blues</Value>
  <Value>Pinks</Value>
  </NameValueList>
- <NameValueList>
  <Name>Shade</Name>
  <Value>chalk pink</Value>
  <Value>glass blue</Value>
  </NameValueList>
  </VariationSpecificsSet>
  </Variations>

The above VariationSpecificsSet doesn't have the highlighted  Large size in the value i.e.  <Value>L</Value> and you may get error 21916608 . Once you add it in the Revise call, it should work fine.

Case 2 : The other reason you might be getting this error is because you were trying to delete a variation that has purchases on it. For example, lets say I listed an item -110100785346 in Sandbox.

This item has a variation as follow:

  <Variation>
        <SKU>RLauren_Wom_TShirt_Pnk_M2</SKU>
        <StartPrice>17.99</StartPrice>
        <Quantity>8</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Size (Women's)</Name>
            <Value>M</Value>
          </NameValueList>
          <NameValueList>
            <Name>Color</Name>
            <Value>Pinks</Value>
          </NameValueList>
          <NameValueList>
            <Name>Shade</Name>
            <Value>Salmon</Value>
          </NameValueList>
        </VariationSpecifics>
            </Variation>
    </Variations>

A buyer purchases an item in this variation. Now if I make the Revise call as follow,
    <Variations>
      <Variation>
        <SKU>RLauren_Wom_TShirt_Pnk_M2</SKU>
        <StartPrice>17.99</StartPrice>
        <Quantity>0</Quantity>
        <VariationSpecifics>
          <NameValueList>
            <Name>Size (Women's)</Name>
            <Value>M</Value>
          </NameValueList>
          <NameValueList>
            <Name>Color</Name>
            <Value>Pinks</Value>
          </NameValueList>
          <NameValueList>
            <Name>Shade</Name>
            <Value>Salmon</Value>
          </NameValueList>
        </VariationSpecifics>
       <Delete>true</Delete> 
      </Variation>
    </Variations>

This will result in error 21916608.  If a variation has any purchases (i.e., an order line item was created and QuantitySold is greather than 0), you can't delete the variation, but you can set its quantity to zero. If a variation has no purchases, you can delete it.

Once you remove the above highlighted <Delete>true</Delete> tags, the request should work.

Case 3 : There is another scenario slightly related to the one above which could lead to the restricted revise error. Consider the use case where you are trying to make the Revise call with two variations where one variation is completely sold out. The request has the following variations :

<Variations>
<Variation>
<SKU>101</SKU>
<StartPrice currencyID="USD">9.97</StartPrice>
<Quantity>0</Quantity>  ----Completely Sold out
<VariationSpecifics>
<NameValueList>
<Name>Color</Name>
<Value>White</Value>
</NameValueList>
<NameValueList>
<Name>Size (Women's)</Name>
<Value>2X</Value>
</NameValueList>
</VariationSpecifics>
<Delete>true</Delete>
</Variation>

<Variation>
<SKU>102</SKU>
<StartPrice currencyID="USD">9.97</StartPrice>
<Quantity>12</Quantity>
<VariationSpecifics>
<NameValueList>
<Name>Color</Name>
<Value>White</Value>
</NameValueList>
<NameValueList>
<Name>Size (Women's)</Name>
<Value>1X</Value>
</NameValueList>
</VariationSpecifics>
</Variation>

 At this time a variation with transactions cannot be deleted. If you want to revise the second variation, you can do it by just having only one variation. So in the above request, you should only specify the variation for SKU-102.

 

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