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

Request

  • Base URL
    https://broker-api.giftcity.sandbox.in.alpaca.markets
  • URL
    https://broker-api.giftcity.sandbox.in.alpaca.markets/v1/journals/batch
  • Auth
    HTTP basic

Headers

Idempotency-Keystring

Optional client-generated key for safe retries and duplicate request detection. This endpoint currently accepts keys up to 128 characters. Alpaca is moving toward a 36-character maximum; new implementations should generate a unique UUIDv7 or UUIDv4 value (36 characters including hyphens) for each logical operation. Do not reuse a key across operations.

Request body

correspondentstring

The 4-character correspondent code

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

Example request

{
  "correspondent": "LPCA"
}

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

[
  {
    "currency": "USD",
    "description": "",
    "entry_type": "JNLC",
    "from_account": "8f8c8cee-2591-4f83-be12-82c659b5e748",
    "id": "56f106e5-25a4-4eee-96fa-25bb05dc86bc",
    "net_amount": "1000",
    "price": null,
    "qty": null,
    "settle_date": null,
    "status": "pending",
    "symbol": null,
    "system_date": null,
    "to_account": "399f85f1-cbbd-4eaa-a934-70027fb5c1de"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.