https://b-api.longbridge.xyz/book/create_or_modify_account_entries_v2Authorization
Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.
Request body application/json
Pass 0 when adding; when editing, pass the original record id or the copy-source id.
The entry data source; values come from the book_entry_data_source dynamic enum; converted to a number before submission; determines the visibility and required status of subsequent subfields such as payer/payee.
Call GET /v1/datasets/refs/book_entry_data_source to retrieve the current data dictionary, and use the returned entry's key as this field's value.
A toggle controlling whether the payment_* series of fields are displayed/submitted; mutually exclusive with payee (only one of the two can be enabled, unless the data source allows both).
The values come from the book_entry_account_types dynamic enum (which changes in tandem with source_id); whether it is required is determined by the data-source configuration.
Call GET /v1/datasets/refs/book_entry_account_types to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Values come from the book_business_types_by_source dynamic enum (cascading with source_id); required under most data sources.
Call GET /v1/datasets/refs/book_business_types_by_source to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Takes the aaid/origin_id after selecting from the member search.
Values come from the book_business_groups dynamic enum.
Call GET /v1/datasets/refs/book_business_groups to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Value comes from the book_entry_account_types dynamic enum (linked to source_id).
Call GET /v1/datasets/refs/book_entry_account_types to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Value comes from the book_business_types_by_source dynamic enum (linked to source_id).
Call GET /v1/datasets/refs/book_business_types_by_source to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Takes the aaid/origin_id after selecting from the member search.
Text input; required for some data sources.
User account type. Converted to a number before submission.
0 · Not Match1 · Cash2 · Margin3 · House
Multi-select; elements are strings, with values from the tenant_currencies_by_channel dynamic enum.
Call GET /v1/datasets/refs/tenant_currencies_by_channel to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Value comes from the book_brokers dynamic enum; converted to a number before submission.
Call GET /v1/datasets/refs/book_brokers to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Trade direction.
SELL · SELLBUY · BUY
Nature type. Applies only when the data source is a bank.
client · Clienthouse · House
The values come from the book_entry_bank_accounts dynamic enum; only displayed when the data source is a bank.
Call GET /v1/datasets/refs/book_entry_bank_accounts to retrieve the current data dictionary, and use the returned entry's key as this field's value.
A text area, up to 100 characters.
Whether the amount is positive or negative.
PLUS · Positive amountMINUS · Negative amount
Journal-entry summary list, each item corresponding to one summary-concatenation rule; items with type 0 or an empty value are filtered out before submission. Sub-structure: name_type (string, 1=fixed text / 2=referenced field type), name (string, optional, fixed text), name_field_type (string, optional; when using a referenced field type, use an available summary-field type returned for the selected data source).
The values come from the book_account_features dynamic enum (with an additional "All" option).
Call GET /v1/datasets/refs/book_account_features to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Debit account, selected from a tree; before submission the leaf-level account code of the selected path is taken.
Debit amount type. Selecting a value synchronizes the credit amount type accordingly.
AMOUNT_ABS · The absolute value of the billAMOUNT_NEG · The opposite of the bill amountAMOUNT_ORIGIN · Original bill amount
Single-select with values yes/no; whether it is required is determined by the data source configuration; defaults to no.
Allowed values:
yes- Yesno- No
yes · Yesno · No
The values come from the book_account_features dynamic enum (with an additional "All" option).
Call GET /v1/datasets/refs/book_account_features to retrieve the current data dictionary, and use the returned entry's key as this field's value.
Credit account, selected from a tree; before submission the leaf-level account code of the selected path is taken.
Credit amount type. Read-only and kept consistent with the debit amount type.
AMOUNT_ABS · The absolute value of the billAMOUNT_NEG · The opposite of the bill amountAMOUNT_ORIGIN · Original bill amount
Single-select; value yes/no. Whether it is required reuses the judgment of the debit's displayed broker.
Allowed values:
yes- Showno- Not Show
yes · Showno · Not Show
An audit-trail field, not a business parameter; on add it marks the add action ($action=add), and on edit it carries the complete pre-edit input values and marks the edit action ($action=edit).
Responses
HTTP 200The request was processed successfully. The response data does not contain additional business fields.codemessagedatadataobjectdata structureNo nested fields
HTTP 400Bad request. Check the business error code in code and the error details in message.codemessagedatadataobjectdata structureNo nested fields
HTTP 401The user is not authenticated, or the login session has expired.codemessagedatadataobjectdata structureNo nested fields
HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.codemessagedatadataobjectdata structureNo nested fields
HTTP 408The request timed out. Check the business error code in code and the error details in message.codemessagedatadataobjectdata structureNo nested fields