# REST-API: Variantenbilder, wie zuweisen?

**URL:** <https://forum.shopware.com/t/rest-api-variantenbilder-wie-zuweisen/31375>\
**Category:** Programmierung\
**Created:** [14. Oktober 2015 um 18:35 UTC](https://forum.shopware.com/t/rest-api-variantenbilder-wie-zuweisen/31375 "2015-10-14T18:35:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guna\_hubert](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@guna\_hubert](https://forum.shopware.com/u/guna_hubert)\
**Post date:** [14. Oktober 2015 um 18:35 UTC](https://forum.shopware.com/t/rest-api-variantenbilder-wie-zuweisen/31375/1 "2015-10-14T18:35:36Z")

</div>

Hallo zusammen, vielleicht erkennt jemand das Problem. Ich lege einen einfachen Artikel mit diesem Call an: ` Array ( [name] =\> Mein cooler Artikel [supplier] =\> Coole Marke [active] =\> 0 [images] =\> Array ( [0] =\> Array ( [mediaId] =\> 1537 ) [1] =\> Array ( [mediaId] =\> 1538 ) [2] =\> Array ( [mediaId] =\> 1539 ) [3] =\> Array ( [mediaId] =\> 1540 ) [4] =\> Array ( [mediaId] =\> 1541 ) [5] =\> Array ( [mediaId] =\> 1542 ) [6] =\> Array ( [mediaId] =\> 1543 ) ) [lastStock] =\> 1 [tax] =\> 19 [priceGroupId] =\> 1 [priceGroupActive] =\> 1 [categories] =\> Array ( [0] =\> Array ( [id] =\> 3 ) ) [mainDetail] =\> Array ( [number] =\> DX10344 [instock] =\> 999 [prices] =\> Array ( [0] =\> Array ( [customerGroupKey] =\> EK [price] =\> 89,95 ) ) ) ) Array ( [success] =\> 1 [data] =\> Array ( [id] =\> 567 [location] =\> https://mein.cooler.shop/test/api/articles/567 ) ) ` Versuche ich dann den Varianten mit einem folgenden Array images über mediaid zuzuweisen erhalte ich die Meldung:

## No Success

One of the passed variant images doesn’t contains a mediaId or link property!

`( [configuratorSet] =\> Array ( [groups] =\> Array ( [0] =\> Array ( [name] =\> Farbe [options] =\> Array ( [0] =\> Array ( [name] =\> schwarz ) [1] =\> Array ( [name] =\> pink ) [2] =\> Array ( [name] =\> gelb ) ) ) ) ) [taxId] =\> 1 [variants] =\> Array ( [0] =\> Array ( [isMain] =\> 1 [number] =\> DX10344 [inStock] =\> 999 [additionaltext] =\> schwarz [configuratorOptions] =\> Array ( [0] =\> Array ( [group] =\> Farbe [option] =\> schwarz ) ) [prices] =\> Array ( [0] =\> Array ( [customerGroupKey] =\> EK [price] =\> 89,95 ) ) [images] =\> Array ( [0] =\> Array ( [mediaid] =\> 1537 ) ) ) [1] =\> Array ( [isMain] =\> [number] =\> DX10344.1 [inStock] =\> 999 [additionaltext] =\> pink [configuratorOptions] =\> Array ( [0] =\> Array ( [group] =\> Farbe [option] =\> pink ) ) [prices] =\> Array ( [0] =\> Array ( [customerGroupKey] =\> EK [price] =\> 89,95 ) ) [images] =\> Array ( [0] =\> Array ( [mediaid] =\> 1539 ) ) ) [2] =\> Array ( [isMain] =\> [number] =\> DX10344.2 [inStock] =\> 999 [additionaltext] =\> gelb [configuratorOptions] =\> Array ( [0] =\> Array ( [group] =\> Farbe [option] =\> gelb ) ) [prices] =\> Array ( [0] =\> Array ( [customerGroupKey] =\> EK [price] =\> 89,95 ) ) [images] =\> Array ( [0] =\> Array ( [mediaid] =\> 1540 ) ) ) ) )` Ist jemanden klar was hierbei fehlt? Vielen Dank und beste Grüße

---

<div class="post-metadata">

**Author:** ![mac](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/mac/32/7855_2.png) [@mac](https://forum.shopware.com/u/mac)\
**Post date:** [15. Oktober 2015 um 07:55 UTC](https://forum.shopware.com/t/rest-api-variantenbilder-wie-zuweisen/31375/2 "2015-10-15T07:55:25Z")

</div>

Hallo Hubert, ändere mal mediaid zu mediaId. Gruß Marco

---

<div class="post-metadata">

**Author:** ![guna\_hubert](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@guna\_hubert](https://forum.shopware.com/u/guna_hubert)\
**Post date:** [15. Oktober 2015 um 09:33 UTC](https://forum.shopware.com/t/rest-api-variantenbilder-wie-zuweisen/31375/3 "2015-10-15T09:33:46Z")

</div>

Hallo Marco, [quote=“mac”]Hallo Hubert, ändere mal mediaid zu mediaId. Gruß Marco[/quote] danke, ich glaube das war’s. Ich war schon an dem Thema dran, hatte aber fälschlicherweise das Gefühl die Parameter wären case-insensitve. Vielen, vielen Dank & beste Grüße
