title: Magento SOAP API - catalog_product_attribute_media.list not finding SKU
body: <p>I've been trying to import several thousand product images into a Magento 1.8.1.0 website using the SOAP API.</p>
  
  <p>Although some have been imported, several hundred were not.</p>
  
  <p>To try and find where this has happened I am using the following API command:</p>
  
  <pre><code>catalog_product_attribute_media.list
  </code></pre>
  
  <p>This is returning an error for some SKU's: "Product not exists". This is a genuine API error documented at <a href="http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute_media#faults" rel="nofollow">http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute_media#faults</a></p>
  
  <p>However, the SKU's where this is happening definitely exist within Magento, as I can search for them and see them in the Admin panel.</p>
  
  <pre><code>$result = $client-&gt;call($session, 'catalog_product_attribute_media.list', '452103');
  </code></pre>
  
  <p>The above code will cause an Exception saying "Product not exists" meaning it can't find anything for the SKU 452103. But if I search for SKU 452103 in the Admin panel it's there!</p>
  
  <p>What's strange is that if I get the Magento <strong>Product ID</strong> for that SKU (in the above example it happens to be 3478) and run the following it works without error:</p>
  
  <pre><code>$result = $client-&gt;call($session, 'catalog_product_attribute_media.list', '3478');
  </code></pre>
  
  <p>Does anyone know what I'm doing wrong or why this might happen? The API documentation says what I'm passing as the second parameter to call() can be <em>either</em> the Product ID or the SKU.</p>
  
  <p>I can only use the SKU in practice because my source data doesn't know what the Magento Product ID's are, but the SKU has been imported without modification. The code above where I've used Product ID = 3478 is just something I put to test whether it would output anything but I had to find this Product ID manually, which isn't practical for the number of images I need to fix.</p>