Last updated:
Stanislav Anisimov
Support for batch requests
Click to expand / collapse

When integrating with external systems, it is important to be able to process data in bulk, without overloading servers and without the need to make dozens of separate calls. We implement support for batch requests - a mechanism that allows you to send several operations at once in one API call.

This is especially useful when working with reports, synchronizing transactions, importing users or events.


What are batch requests

A batch request allows you to combine several requests into one:
json
[
{ "method": "POST", "path": "/users", "body": { "name": "Alice" } },  { "method": "PUT", "path": "/users/42", "body": { "email": "new@mail. com" } },  { "method": "DELETE", "path": "/users/15" }
]

The server processes each of them sequentially or in parallel and returns an array of responses corresponding to the order of the requests.


Integrator Benefits

AdvantageExplanation
Load reductionFewer HTTP connections - faster processing
Mass synchronizationProcessing batches of data: transactions, actions, objects
IntegrityCan be processed in one context or transaction
Ease of loggingSingle point of control, centralized response
Saving resourcesFewer operations, less time to confirm and respond

Implementation and features

Support for 'batch []' in request body or '/batch 'endpoint

Authorization is general or at the level of each operation

Validation of all operations prior to execution

Partial or total atomicity (by configuration)

Responses linked to each query (status, body, errors)


Where especially important

Import data from CRM, ERP, Accounting

Transfer of multiple transactions or logs

Mass updates of profiles, balances, game sessions

Scenarios where speed, integrity, and traffic savings are important


Batch requests are an effective way to reduce the number of calls, speed up integration, and reduce load. We will provide support for this mechanism at the API and infrastructure level - for any data scale.

Popular topics


Main topics