# REST-API Artikelanlage/Kategorie setzen

**URL:** https://forum.shopware.com/t/rest-api-artikelanlage-kategorie-setzen/11827
**Category:** Shopware 3.5
**Tags:** programming
**Created:** [26. Februar 2013 um 09:00 UTC](https://forum.shopware.com/t/rest-api-artikelanlage-kategorie-setzen/11827 "2013-02-26T09:00:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![schwindt\_mg](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@schwindt\_mg](https://forum.shopware.com/u/schwindt_mg)
#### Post date: [26. Februar 2013 um 09:00 UTC](https://forum.shopware.com/t/rest-api-artikelanlage-kategorie-setzen/11827/1 "2013-02-26T09:00:32Z")

</div>

Hallo zusammen, ich versuche verzweifelt bei der Artikelanlage über die REST-API eine Kategorienzuordnung mitzugeben. Die Anlage des Artikels ansich funktioniert einwandfrei. Baue ich jedoch die JSON-Tags für die Kategorien mit ein, wird die REST-API jedesmal einen Validation Error. `{"success":false,"message":"Validation error","errors":["name: This value should not be blank","tax: This value should not be blank","mainDetail.number: This value should not be blank"]}` `{ "name": "Test", "taxId": "1", "mainDetail": { "number": "WUH123", "unitID": "", "supplierNumber": "HS12345", "instock": "4", "stockMin": "7", "weight": "4", "purchaseUnit": "", "referenceUnit": "", "packUnit": "", "shippingFree": true, "prices": [{ "customerGroupKey": "EK", "from": 1, "to": "beliebig", "price": "4.84", "pseudoPrice": "7.12", "basePrice": "0.5" }] }, "supplierId": "1", "descriptionLong": "Lange Beschreibung", "added": "2013-03-01", "active": true, "highlight": true, "keywords": "Keywords", "categories": [{ "id": "5" }, { "id": "6" }], "laststock": true }` Kann mir hier jmd. weiterhelfen? Vorab besten Dank!
