Search API accepts multiple separate requests within single call. To send batched requests, provide multiple elements in top-level items array of request JSON.
API will respond with single result item per query, in same order queries were provided.
As an example, let’s consider two batched requests:
Total value of all deals closed from the beginning of 2017
Highest deal value owned by Jane Doe (here it’s achieved using descending sorting on decimal_value attribute and limit number of results to one, but could be equivalently achieved via max aggregation)
If all queries completed with the same status, this will be HTTP response status of batched query (e.g. if all queries succeeded the API will return HTTP 200 OK and if all queries were malformed, it will return HTTP 400 Bad Request). But if different queries completed with different results, HTTP 207 Multi-status will be returned.
For example, if user mistyped the name of the filter attribute in the first request (close_dat instead of close_date), it would fail, but second request would still complete successfully: