# REST API: Varianten erweitern

**URL:** <https://forum.shopware.com/t/rest-api-varianten-erweitern/25063>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [12. Februar 2015 um 20:37 UTC](https://forum.shopware.com/t/rest-api-varianten-erweitern/25063 "2015-02-12T20:37:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![myGreatShop](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@myGreatShop](https://forum.shopware.com/u/myGreatShop)\
**Post date:** [12. Februar 2015 um 20:37 UTC](https://forum.shopware.com/t/rest-api-varianten-erweitern/25063/1 "2015-02-12T20:37:11Z")

</div>

Hallo zusammen, mit folgendem Beispiel versuche ich einen bestehenden Artikel um Varianten zu erweitern: `$configuratorArticle = array( 'articleId' =\> '3884', 'number' =\> 'swTEST52b03205900ca', 'inStock' =\> 100, 'unitId' =\> 1, 'prices' =\> array( array( 'customerGroupKey' =\> 'EK', 'from' =\> 1, 'to' =\> '-', 'price' =\> 400, ), ), 'configuratorOptions' =\> array( array('group' =\> 'Größe', 'option' =\> '51',), ), ); $client-\>put('variants', ApiClient::METHODE\_POST, $configuratorArticle); ` Ich bekomme nur immer folgende Fehlermeldung: ` [success] =\> [message] =\> Article by id P not found [trace] =\> #0 /www/engine/Shopware/Components/Api/Resource/Resource.php(529): Shopware\Components\Api\Resource\Variant-\>create('POST')` Weiß jemand Rat? Danke schon mal 🙂

---

<div class="post-metadata">

**Author:** ![myGreatShop](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@myGreatShop](https://forum.shopware.com/u/myGreatShop)\
**Post date:** [13. Februar 2015 um 11:57 UTC](https://forum.shopware.com/t/rest-api-varianten-erweitern/25063/2 "2015-02-13T11:57:58Z")

</div>

Mein Fehler. Hatte den METHODE\_POST mit $client-\>put aufgerufen: FALSCH: `$client-\>put('variants', ApiClient::METHODE\_POST, $configuratorArticle);` RICHTIG: `$client-\>call('variants', ApiClient::METHODE\_POST, $configuratorArticle);`
