`custombatch` is a common method that allows you to group several API calls,
known as "entries" into one single HTTP request. Each entry only references a
single method call.

Custom batch is a good choice when:

- You've just started using the API and have a lot of product data to upload.
- You need to synchronize local data with the server by sending lots of updates and deletes.

## Make batch requests

Sending batch requests is similar to sending API calls in parallel. Note that
there is no guarantee that the order of entries defined in the request will
be in the order that they are executed. We recommend that you don't use
interdependent calls in a single batch request (such as creating and updating
the same shipment).

Similarly, the responses received for batched requests may be returned in a
different order to that of the request entries. The `BatchId` can be used to
correlate requests and responses since the responses may be returned out of
sequence.

> [!NOTE]
> **Note:** Batch requests have two failure modes: one for top-level errors and one for errors resulting from individual entries in the batch. If a request fails because of a top-level error, responses for individual entries are not returned.

You can batch requests in the API by calling the appropriate `custombatch`
method:

| Resources and their corresponding custom batch methods ||
|---|---|
| `Accounts` | [`accounts.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/accounts/custombatch) |
| `Accountstatuses` | [`accountstatuses.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses/custombatch) |
| `Accounttax` | [`accounttax.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/accounttax/custombatch) |
| `Datafeeds` | [`datafeeds.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/datafeeds/custombatch) |
| `Datafeedstatuses` | [`datafeedstatuses.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/datafeedstatuses/custombatch) |
| `Localinventory` | [`localinventory.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/localinventory/custombatch) |
| `Liasettings` | [`liasettings.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/liasettings/custombatch) |
| `Pos` | [`pos.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/pos/custombatch) |
| `Products` | [`products.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/products/custombatch) |
| `Productstatuses` | [`productstatuses.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/productstatuses/custombatch) |
| `Shippingsettings` | [`shippingsettings.custombatch`](https://developers.google.com/shopping-content/reference/rest/v2.1/shippingsettings/custombatch) |

## Limits

To avoid errors when uploading large batches, we recommend limiting the size
of `custombatch` requests to a maximum of 1,000 entries. The following maximums
apply to `custombatch` requests:

- 50,000 entries per `custombatch` request
- 32Mb transfer size

Calls that exceed the maximums result in the following `request_too_large`
errors:

- `"Too many requests in a batch."`
- `"Request payload size exceeds the limit: %d bytes."`