Batch API

The Trifft Batch API allows you to send up to 500 requests at once. This functionality enables efficient and streamlined processing of multiple API calls in a single HTTP request. The Batch API supports any combination of requests from the normal API, including GET, POST, and DELETE methods.

The request to the Batch API should be a JSON array where each element represents an individual request. Each request object within the array must include the following fields:

  • uri: The endpoint of the original request.
  • method: The HTTP method (POST, GET, DELETE) of the original request.
  • payload: The request payload, formatted the same way as in the original request. For GET requests, this can be omitted.

📘

Important Note

Please be aware that the Batch API processes requests asynchronously using different microservices. As a result, the API will not return the results of the processed requests. This means the Batch API is not suitable for GET requests. However, you will still receive validation errors if some or all of the requests are malformed.

We are working on a synchronous API that will be slower but can be used for mass GET requests in a single call. Stay tuned for updates on this feature.

🚧

Rate Limits

The Batch API follows the same rate limits as the normal API. Ensure you are aware of and adhere to these limits to avoid potential throttling.

Language
Authorization
Header
Click Try It! to start a request and see the response here!