Bulk Requests

📘

Early Access API

Bulk requests are available by invitation only

A bulk_request represents a request to asynchronously operate on a given resource in bulk. When creating a bulk_request, Modern Treasury requires an action_type, a resource_type and an array of resources. Each item in resources represents the input parameters for a single request to perform an action_type operation on resource_type resource.

For example, to create Payment Orders in bulk, the action_type is create, the resource_type is payment_order and each item in the resources array has valid create-payment-order-params.

AttributeDescription
id
string
Unique identifier for the bulk request
action_type
string
The action to be performed with each item in the resources array.
One of create, update or delete.
resource_type
string
The type of resource to being operated on. One of payment_order, expected_payment, transaction or ledger_transaction
status
string
One of pending, processing or completed
total_resource_count
int32
Total number of items in the resources array. Once a bulk request is completed, success_result_count + failed_result_count will be equal to total_result_count.
success_result_count
int32
Total number of successful bulk results so far for this request
failed_result_count
int32
Total number of failed bulk results so far for this request
metadata
object
Additional data represented as key-value pairs. Both the key and value must be strings. See Metadata.
live_mode
boolean
This field will be true if this bulk request was created with a live API key or false if created with a sandbox API key.
{
  "id": "91c9117f-4855-419c-ad57-0801a58553d4",
  "object": "bulk_request",
  "live_mode": true,
  "action_type": "create",
  "resource_type": "payment_order",
  "status": "pending",
  "total_resource_count": 10,
  "success_result_count": 0,
  "failed_result_count": 0,
  "created_at": "2023-08-25T14:02:52Z",
  "updated_at": "2023-08-25T14:02:52Z"
}