# Extend the Batch article api response

**URL:** <https://forum.shopware.com/t/extend-the-batch-article-api-response/92993>\
**Category:** Shopware 5\
**Tags:** programming\
**Created:** [17. Februar 2022 um 11:46 UTC](https://forum.shopware.com/t/extend-the-batch-article-api-response/92993 "2022-02-17T11:46:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nazeefnezzi](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@nazeefnezzi](https://forum.shopware.com/u/nazeefnezzi)\
**Post date:** [17. Februar 2022 um 11:46 UTC](https://forum.shopware.com/t/extend-the-batch-article-api-response/92993/1 "2022-02-17T11:46:33Z")

</div>

i would like to make a api extention for create article with batch. so if there any method to extend current response message for parent::create() . i would like to manipulate the response data validation error message with json. if there any way to do that ?

```auto
"success": true,
    "data": [
        {
            "success": false,
            "message": "tax" This value should not be blank. \n",
            "trace": path...

```

insted of geting above response i would like to make following way with plugin

```auto
{
   "result":
       {
           "processed": 10,
           "succeeded": 8,
           "failed": {
               "count": 2,
               "errors": [
                   { "articleNumber": "1234567890", "validationFailures": ["...", "..."], "error": { "...": "" } },
                   { "articleNumber": "1234567891", "validationFailures": ["...", "..."], "error": { "...": "" } },
               ]               
            }
       }
}

```

How i can extend Rest.php controller?
