Async operations
Learn how to make asynchronous POST requests, which are useful for efficiency and to avoid timeouts for long-running requests.
Asynchronous POST requests are currently only supported in Merge’s Accounting category. This feature is currently in beta. Reach out to your account representative or contact us for more information.
Singular Asynchronous Requests
To make a singular asynchronous request, append /async at the end of the respective synchronous POST endpoint. For asynchronous requests, the server returns a task_id, a unique identifier used to track the status of the async operation.
Endpoint
POST /<common_model>/async
Sample response
To check the progress and get the final result, send a request to the task polling endpoint:
GET https://api.merge.dev/api/accounting/async-tasks/{task_id}.
Bulk Asynchronous Requests
For high-volume write operations, certain Common Models support the Bulk POST feature, which allows you to create or update multiple objects in a single API call rather than making separate requests for each one. Use this instead of singular async requests when you need to write many objects at once — it minimizes API overhead and helps you stay within third-party rate limits.
Integration support
The bulk write endpoint currently supports the following integrations and Common Models. If you have specific Common Models or integrations you’d like to see coverage for, please let us know by reaching out to your CSM or support@merge.dev!
Endpoint
POST /<common_model>/bulk
Sample request body
The request body must adhere to the following requirements:
- Max payload size of 5 MB or 100 objects
- Each object must contain a unique
item_idthat maps to the item’s ID in the third-party system - Each object should be identical in structure to the payload used in the single-object POST endpoint for the corresponding Common Model
Sample response
To check the status or error messages returned from the 3rd party integration, utilize the batch polling endpoint:
GET /<common_model>/bulk/{batch_id}
Sample polling response
Possible overall statuses
ENQUEUED- The request has been received and a task has been enqueued for processingIN_PROGRESS- The enqueued task is being processedPARTIAL_SUCCESS- The task has been processed, but not all objects were written successfullySUCCESS- The task has been processed, and all objects were written successfullyFAILED- The task has been processed, but ran into an error while processingRATE_LIMITED- The request was received but ran into rate limits while processing. Rate-limited objects are automatically retried.
Possible per-object status values
PENDING- This object has not been processed yetSUCCESS- This object was successfully POSTedFAILURE- This object was not successfully POSTed
Integration-Specific Behavior
For integration-specific behavior, data, and best practices, visit this help center article.
Webhooks
Instead of polling the async task status endpoints, you can subscribe to webhook events that fire automatically when async operations complete:
- AsyncPost.completed — fires when a single async POST request reaches a terminal state (COMPLETED or FAILURE).
- AsyncBulkPost.completed — fires when a bulk async POST batch reaches a terminal state (SUCCESS, PARTIAL_SUCCESS, or FAILED).
For full payload examples and instructions, see Merge Webhooks.