To use the premium batch request for cart, you need CoCart Plus or higher. Otherwise feel free to use the standard WordPress batch process. Supports API v2 or higher.
Make multiple cart requests and return 1 complete cart response. Sounds to good to be true but it is. The standard batch processing that WordPress supports is too problematic for developers when it comes to using the cart data to present it. Seriously if you try it yourself, you would not want to use the standard way. We took away the pain of having to track and merge data together for you, so you can go about your programming with ease. It supports both authenticated users and guest customers.

How do I use it?

It’s very simple. Post your requests as you would do a standard WordPress batch request only you are using our special batch endpoint wp-json/cocart/batch instead.
{
    "requests": [
        {
            "method": "POST",
            "path": "/cocart/v2/cart/add-item",
            "body": {
                "id": "35",
                "quantity": "2"
            }
        },
        {
            "method": "POST",
            "path": "/cocart/v2/cart/add-item",
            "body": {
                "id": "36",
                "quantity": "5"
            }
        }
    ]
}

What about guest customers?

Simply provide the cart key to identify the cart for the guest customer the same way you would for a singular cart endpoint.
If you used the standard batch process, you would have to apply the cart key to each request, which we don’t recommend.
In the following request examples, you would replace <cart_key> that identifies the guest customers cart before sending the request:
curl -L 'https://example-store.com/wp-json/cocart/batch?cart_key=<cart_key>' \
-H 'Content-Type: application/json' \
-d '{
    "requests": [
        {
            "method": "POST",
            "path": "/cocart/v2/cart/add-item",
            "body": {
                "id": "35",
                "quantity": "2"
            }
        },
        {
            "method": "POST",
            "path": "/cocart/v2/cart/add-item",
            "body": {
                "id": "36",
                "quantity": "5"
            }
        }
    ]
}'

The results

The results is one complete cart response (if all requests are successful). You should see multiple notices return for each of the requests. Will leave you to decide how you use them.