v1

latestOpenAPI 3.0.02026-07-26166415635.8 KB
Journals

Create a Batch Journal Transaction (One-to-Many)

You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only.

Every single request must be valid for the entire batch operation to succeed.

In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal.

Idempotency: When the Idempotency-Key header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns 422 Unprocessable Entity.

Recommended for production: Always supply Idempotency-Key when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).

post/v1/journals/batch

Headers

Idempotency-Keystring

The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries.

Request body

descriptionstring

Journal description, gets returned in the response

entry_type'JNLC' required

Only supports JNLC for now

from_accountstring uuid required

The account id that is the originator of the funds being moved. Most likely is your Sweep Firm Account

Response

an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal.

Example response

[
  {
    "entry_type": "JNLS",
    "from_account": "8fjkjn-4483-4199-840f-6c5fe0b7ca24",
    "id": "h7h5g33f-ef01-4458-9a4b-9598727a406f",
    "price": "128.23",
    "qty": "2",
    "settle_date": "2020-12-24",
    "status": "executed",
    "symbol": "AAPL",
    "to_account": "3gtt65jd-6f2a-433c-8c33-17b66b8941fa"
  }
]