# Import über die API

**URL:** <https://forum.shopware.com/t/import-uber-die-api/25421>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [5. März 2015 um 09:26 UTC](https://forum.shopware.com/t/import-uber-die-api/25421 "2015-03-05T09:26:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [5. März 2015 um 09:26 UTC](https://forum.shopware.com/t/import-uber-die-api/25421/1 "2015-03-05T09:26:35Z")

</div>

Guten Morgen, vielleicht sehe ich den Wald schon vor lauter Bäumen nicht mehr … aber ich bekomme beim Import über die API jedes mal den Fehler 500 ausgeschmissen: Fehler: `HTTP: 500 No Success Errormesage: Expected argument of type "string", "array" given` ` foreach ($SimpleXML\_loaded\_File-\>product as $product) { $client-\>post('articles', array( 'name' =\> $product-\>titel, 'taxId' =\> 1, 'supplier' =\> $product-\>merk, 'mainDetail' =\> array( 'number' =\> $product-\>artikelnummer ) )); }` Allerdings wüsste ich nicht wo ein array ausgegeben wird, wo ein strink erwartet wird. $product-\>titel gibt hier den Titel der XML Datei als String aus. Ebenso supplier als auch Artikelnummer ? \*EDIT\* Natürlich … (string)$product-\>titel
