---
title: "The batch response object"
slug: "the-batch-response-object"
abstract: "Describes the structure and properties of a response batch object in the Discover Search and Recommendation."
---
# The batch response object

You get a `batch` JSON object in a Sitecore Discover Search and Recommendation response if you combine multiple requests into a single request. The `batch` object returns results based on the sequence and dependencies of the objects you added in your request. All results are non-duplicate.

The following shows the basic structure of the `batch` object in a response:

```csharp
{
    "batch": [
      {<response_key>: <response_value>}
    ]
}
```

<details>
<summary><h2>Keys</h2></summary>

The following table describes the key in the `batch` response object:

| Key | Type | Description |
| --- | --- | --- |
| `<response_key>` | object | Contains the attribute that needs to be overridden in the batch for a specific request. Discovers overrides the value of this attribute. |

</details>

<details>
<summary><h2>Example</h2></summary>

The following code shows an example of a response where the `content` object is overridden in a batch of two requests.

For the first response, *shirt* and *shirt2* are the `product` contents. For the second response, *shirt3* and *shirt4* are the `product` contents. All other response attributes are the same and are outside of the `batch` object.

```csharp
"batch": [
   {
     "content": {
        "product": {
            "total_item": 15,
            "n_item": 2,
            "value": [
                 {"name": "shirt", "price": 10},
                 {"name": "shirt2", "price": 20}
            ]
        }
   },
   {
     "content": {
        "product": {
            "total_item": 15,
            "n_item": 2,
            "value": [
                 {"name": "shirt3", "price": 40},
                 {"name": "shirt4", "price": 50}
            ]
        }
   }
]
```

</details>