Skip to content
Longport Whale
Entry Rules

Create Or Modify Account Entries

Submitted from the "Add/Edit" action on the Entry Rules page; a non-zero id indicates an edit, otherwise it is an add.

POSThttps://b-api.longbridge.xyz/book/create_or_modify_account_entries_v2

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Request body application/json

idstringrequired

Entry Rule ID. Pass 0 when adding; when editing, pass the original record id or the copy-source id.

source_idintegerrequired

Data Source. The entry data source; values come from the pg_book_account_entries_source dynamic enum; converted to a number before submission; determines the visibility and required status of subsequent subfields such as payer/payee.

payerboolean

Is Payer Configured. 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).

payment_account_type_idstring

Payment Account Type ID. The values come from the pg_book_account_type_v2 dynamic enum (which changes in tandem with source_id); whether it is required is determined by the data-source configuration.

payment_booking_type_idstring

Payment Booking Type ID. Values come from the pg_book_types_pickid_v2 dynamic enum (cascading with source_id); required under most data sources.

payment_channel_accountstring

Payment Channel Account. Takes the aaid/origin_id after selecting from the member search.

payment_business_groupstring

Payment Business Group. Values come from the pg_book_business_group dynamic enum.

payee_account_type_idstring

Payee Account Type ID. Value comes from the pg_book_account_type_v2 dynamic enum (linked to source_id).

payee_booking_type_idstring

Payee Booking Type ID. Value comes from the pg_book_types_pickid_v2 dynamic enum (linked to source_id).

payee_channel_accountstring

Payee Channel Account. Takes the aaid/origin_id after selecting from the member search.

channelstring

Channel. Text input; required for some data sources.

user_account_typeinteger

User Account Type. The values come from the book_user_account_type dynamic enum and are converted to a number before submission.

currencyarray<string>

Currency. Multi-select; elements are strings, with values from the global_currency_filter_by_account_channel dynamic enum.

org_idinteger

Broker Org ID. Value comes from the book_broker_show dynamic enum; converted to a number before submission.

trade_directionstring

Trade Direction. Values come from the book_trade_direction dynamic enum.

nature_typestring

Nature Type. Values come from the book_nature_type dynamic enum; displayed only when the data source is a bank.

bank_accountstring

Bank Account. The values come from the book_bank_account dynamic enum; only displayed when the data source is a bank.

remarkstring

Remark. A text area, up to 100 characters.

amount_plus_or_minusstring

Amount Plus or Minus. Value comes from the booking_account_entry_amount_pm dynamic enum, e.g. PLUS/MINUS.

name_typesarray<string>required

Entry Summary (Name Types) Config. 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, taken from the summary-field dynamic enum corresponding to that data source).

debit_featurestringrequired

Debit Account Feature. The values come from the pg_book_feature_all dynamic enum (with an additional "All" option).

debit_subject_codestringrequired

Debit Subject Code. Debit account, selected from a tree; before submission the leaf-level account code of the selected path is taken.

debit_amount_typestringrequired

Debit Amount Type. The values come from the book_subject_amount dynamic enum (such as absolute value); once selected, it synchronizes the credit amount type accordingly.

debit_display_brokerstring

Debit Display Broker. Single-select with values yes/no; whether it is required is determined by the data source configuration; defaults to no.

credit_featurestringrequired

Credit Account Feature. The values come from the pg_book_feature_all dynamic enum (with an additional "All" option).

credit_subject_codestringrequired

Credit Subject Code. Credit account, selected from a tree; before submission the leaf-level account code of the selected path is taken.

credit_amount_typestringrequired

Credit Amount Type. Value comes from the book_subject_amount dynamic enum; this field is disabled and kept consistent with the debit amount type.

credit_display_brokerstring

Credit Display Broker. Single-select; value yes/no. Whether it is required reuses the judgment of the debit's displayed broker.

audit_frontend_resourceobject

Audit Frontend Resource. 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 form values and marks the edit action ($action=edit).

Responses

HTTP 200No confirmable field definitions are available for the response yet.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs