Skip to main content
POST
/
records
/
bulk
Bulk create records
curl --request POST \
  --url https://api.endclose.com/v1/records/bulk \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "records": [
    {
      "date": "2023-12-25",
      "data_stream_key": "<string>",
      "amount": 123,
      "direction": "credit",
      "description": "<string>",
      "external_id": "<string>",
      "metadata": {}
    }
  ]
}
'
{
  "id": 123,
  "status": "pending",
  "total_items": 123,
  "processed_items": 123,
  "successful_items": 123,
  "failed_items": 123,
  "url": "<string>"
}

Authorizations

X-API-KEY
string
header
required

Headers

Idempotency-Key
string

Optional idempotency key. If a bulk request with this key already exists for your environment, the existing request is returned instead of creating a new one.

Body

application/json
records
object[]
required
Required array length: 1 - 1000 elements

Response

Bulk request accepted for processing

Summary returned when a bulk request is created or retrieved via idempotency key

id
integer

Unique identifier for the bulk request

status
enum<string>

Current processing status

Available options:
pending,
processing,
completed
total_items
integer

Number of records submitted

processed_items
integer

Number of records processed so far

successful_items
integer

Number of records successfully created

failed_items
integer

Number of records that failed

url
string

Polling URL to check progress (e.g. /v1/bulk_requests/123)