Leider habe ich bei der Rest API Batch PUT ein Problem mit meinem JSON. Hier ist mein JSON in der Miniversion:
[{„articles“:[{„name“:„t“,„highlight“:false,„mainDetail“:{„number“:„t“,„active“:true,„inStock“:9,„ean“:„222“,„releaseDate“:„2016-01-01T00:00:00+0200“,„shippingTime“:„1-3“,„prices“:[{„customerGroupKey“:„EK“,„price“:4}]},„attribute“:{„attr1“:„10“},„tax“:{„tax“:19},„supplier“:{„name“:„t“},„images“:[{„path“:„t7.jpg“}],„categories“:{„38“:{„id“:38}}}]},{„articles“:[{„name“:„t2“,„highlight“:false,„mainDetail“:{„number“:„t2“,„active“:true,„inStock“:11,„ean“:„52“,„releaseDate“:„2015-02-14T00:00:00+0200“,„shippingTime“:„1-3“,„prices“:[{„customerGroupKey“:„EK“,„price“:4.99}]},„attribute“:{„attr1“:„15“},„tax“:{„tax“:19},„supplier“:{„name“:„t2“},„images“:[{„path“:„t2.jpg“}],„categories“:{„39“:{„id“:39}}}]},{„articles“:[{„name“:„t3“,„highlight“:false,„mainDetail“:{„number“:„t3“,„active“:true,„inStock“:43,„ean“:„55“,„releaseDate“:„2016-01-01T00:00:00+0200“,„shippingTime“:„1-3“,„prices“:[{„customerGroupKey“:„EK“,„price“:10}]},„attribute“:{„attr1“:„15“},„tax“:{„tax“:19},„supplier“:{„name“:„t3“},„images“:[{„path“:„t3.jpg“}],„categories“:{„38“:{„id“:38}}}]}]
Und hier der Response:
{„success“:true,„data“:[{„success“:false,„message“:„Object(Shopware\Models\Article\Article).name:\n This value should not be blank. (code c1051bb4-d103-4f74-8988-acbcafc7fdc3)\nObject(Shopware\Models\Article\Article).tax:\n This value should not be blank. (code c1051bb4-d103-4f74-8988-acbcafc7fdc3)\nObject(Shopware\Models\Article\Article).mainDetail.number:\n This value should not be blank. (code c1051bb4-d103-4f74-8988-acbcafc7fdc3)“,„trace“:"#0 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Shopware/Components/Api/Resource/Resource.php(527): Shopware\Components\Api\Resource\Article->create(Array)\n#1 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Shopware/Controllers/Api/Rest.php(78): Shopware\Components\Api\Resource\Resource->batch(Array)\n#2 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Library/Enlight/Controller/Action.php(159): Shopware_Controllers_Api_Rest->batchAction()\n#3 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch(‚batchAction‘)\n#4 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))\n#5 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Shopware/Kernel.php(177): Enlight_Controller_Front->dispatch()\n#6 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#7 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)\n#8 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)\n#9 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)\n#10 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)\n#11 /var/www/vhosts/fabianwildschuetz.www78.hostkraft.de/httpdocs/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache
usw.
Ist mein JSON falsch?
danke für Hilfe!
Viele Grüße