Skip to content
Entry Rules

Create Or Modify Account Entries

Create Or Modify Account Entries.

Request parameters

  • Required: id (Entry Rule ID), source_id (Data Source), name_types (Entry Summary (Name Types) Config), debit_feature (Debit Account Feature), debit_subject_code (Debit Subject Code), debit_amount_type (Debit Amount Type), credit_feature (Credit Account Feature), credit_subject_code (Credit Subject Code), credit_amount_type (Credit Amount Type)
  • Optional: payer (Is Payer Configured), payment_account_type_id (Payment Account Type ID), payment_booking_type_id (Payment Booking Type ID), payment_channel_account (Payment Channel Account), payment_business_group (Payment Business Group), payee_account_type_id (Payee Account Type ID), payee_booking_type_id (Payee Booking Type ID), payee_channel_account (Payee Channel Account), channel (Channel), user_account_type (User Account Type), currency (Currency), org_id (Broker Org ID), trade_direction (Trade Direction), nature_type (Nature Type), bank_account (Bank Account), remark (Remark), amount_plus_or_minus (Amount Plus or Minus), debit_display_broker (Debit Display Broker), credit_display_broker (Credit Display Broker), audit_frontend_resource (Audit Context)
  • See each field for its format, allowed values, and business meaning.

Result

On success, the endpoint completes the operation. See the 200 response schema for returned data and subsequent state information.

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

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

source_idintegerrequired

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.

payerboolean

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

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.

payment_booking_type_idstring

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.

payment_channel_accountstring

Takes the aaid/origin_id after selecting from the member search.

payment_business_groupstring

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.

payee_account_type_idstring

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.

payee_booking_type_idstring

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.

payee_channel_accountstring

Takes the aaid/origin_id after selecting from the member search.

channelstring

Text input; required for some data sources.

user_account_typeinteger

User account type. Converted to a number before submission.

0 · Not Match1 · Cash2 · Margin3 · House

currencyarray<string>

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.

org_idinteger

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_directionstring

Trade direction.

SELL · SELLBUY · BUY

nature_typestring

Nature type. Applies only when the data source is a bank.

client · Clienthouse · House

bank_accountstring

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.

remarkstring

A text area, up to 100 characters.

amount_plus_or_minusstring

Whether the amount is positive or negative.

PLUS · Positive amountMINUS · Negative amount

name_typesarray<string>required

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).

debit_featurestringrequired

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_subject_codestringrequired

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. 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

debit_display_brokerstring

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

Allowed values:

  • yes - Yes
  • no - No

yes · Yesno · No

credit_featurestringrequired

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_subject_codestringrequired

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. 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

credit_display_brokerstring

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

Allowed values:

  • yes - Show
  • no - Not Show

yes · Showno · Not Show

audit_frontend_resourceobject

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.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs