Search code examples
ebay-api

eBay SOAP Update Variation Stock Quantity


I am trying to update the stock quantity of a variation item in eBay, but my request fails.

I have a product with variants:

T-Shirt

  1. Black
  2. Blue
  3. Champion Black

I want to change the Champion Black to 319.

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Header>
  <RequesterCredentials xmlns="urn:ebay:apis:eBLBaseComponents">
     <eBayAuthToken>X</eBayAuthToken>
  </RequesterCredentials>
   </soap:Header>
   <soap:Body>
  <ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
     <MessageID>X</MessageID>
     <Version>779</Version>
     <InventoryStatus>
        <SKU>Champion Black</SKU>
        <ItemID>262620802157</ItemID>
        <Quantity>319</Quantity>
     </InventoryStatus>
  </ReviseInventoryStatusRequest>

eBay responds with success, but they say the stock is 337:

   <ReviseInventoryStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
   <Timestamp>2016-10-10T22:35:33.659Z</Timestamp>
   <Ack>Success</Ack>
   <CorrelationID>65055fdd-b574-4e98-85e8-0558b06d365a</CorrelationID>
   <Version>987</Version>
   <Build>E987_UNI_API5_18125388_R1</Build>
   <InventoryStatus>
   <SKU>Champion Black</SKU>
   <ItemID>262620802157</ItemID>
   <StartPrice>10.95</StartPrice>
   <Quantity>337</Quantity>
  </InventoryStatus>

Solution

  • The call is correct. eBay sends back the quantity available plus the quantity sold.