Skip to content
Business type

Add Booking Type

Fields come from the request field formFields, with language_en, language_cn, language_hk, and id = 0 added by onSubmit.

Request parameters

  • Required: id (Record ID), source_id (Data Source), direction (Direction (Pay/Receive)), biz_code (Business Code), is_account (Is Accounted), account_currencies (Account Currencies)
  • Optional: language_en (Business Name (English)), language_cn (Business Name (Simplified Chinese)), language_hk (Business Name (Traditional Chinese/HK))
  • See each field for its format, allowed values, default behavior, and business meaning.

Result

On success, the endpoint completes the described business operation. See the 200 response schema for returned data.

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

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

idintegerrequired

On creation the client always passes 0 (values.id = 0 in onSubmit).

source_idstringrequired

Single-select value from optionsMap['book_data_source_editable'], such as 1 for funds or another data-source option.

Allowed values:

  • 1 - Funds

1 · Funds

directionstringrequired

Payment direction. Only one value is supported. This field may be omitted when source_id belongs to the configured clientFeeList.

Allowed values: Payment, Payee (Collecting)

Payment · PaymentPayee · Collecting

biz_codestringrequired

Dropdown populated by getBizCodeOptions. The available business codes are loaded dynamically when source_id changes.

is_accountstringrequired

Whether accounting is enabled. When this field is N, account_currencies must be ["ALL"].

Allowed values:

  • Y - Yes
  • N - No

Y · YesN · No

account_currenciesarray<string>required

A tree multi-select; the value is ["ALL"] or a list of specific currency codes (e.g. ["USD", "HKD"]). Currency options come from optionsMap['tenant_currencies_by_channel']; when is_account=N it is fixed to ["ALL"]. Array elements are strings.

language_enstring

Extracted from the name.en of the option corresponding to biz_code in onSubmit and appended on submission; not a directly entered request field.

language_cnstring

Extracted in onSubmit from name['zh-CN'] of the option matching biz_code and appended to the submission; not a directly entered request field.

language_hkstring

On submit, taken from the name['zh-HK'] of the option corresponding to biz_code and attached to the request; not a directly entered request field.

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