Skip to content
Business type

Add Booking Type

Adds a booking business type, defining a category of bookable business in the accounting system.

Request parameters

  • Required: id (always 0 when adding), source_id (data source), direction (receipt/payment direction), biz_code (business code), is_account (whether it is booked), account_currencies (booking currencies).
  • Optional: language_en, language_cn, language_hk (business name in each language).
  • See the field definitions for format, value ranges, defaults, and business meaning.

Risk warning

This operation adds a real booking business-type configuration and affects downstream accounting and booking rules. Confirm the parameters before calling.

Result

On success the booking business type is added. Refer to the 200 response definition for returned data.

POSThttps://b-api.lbkrs.com/book/add_booking_types

Authorization

AuthorizationstringheaderRequired

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

Permission

book.booking_types_update

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Request body application/json

idintegerrequired

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

source_idstringrequired

Data source. Options come from the data dictionary book_data_source_editable (retrieve via GET /v1/datasets/refs/book_data_source_editable); the selected source determines the available biz_code values.

Values
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 Payment, Payee Collection

Values
Payment
Payment
Payee
Collecting
biz_codestringrequired

Business code. The available options depend on the selected data source (source_id): member fees, agent fees, settlement contracts, atomic vault and other sources each have their own business-code list, returned by the backend according to the chosen source_id; use the options the service returns.

is_accountstringrequired

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

Allowed values: Y Accounted, N Not accounted

Values
Y
Yes
N
No
account_currenciesarray<string>required

Account currencies. A tree multi-select: either ["ALL"] or a list of specific currency codes (e.g. ["USD","HKD"]). Currency options come from the data dictionary tenant_currencies_by_channel (retrieve via GET /v1/datasets/refs/tenant_currencies_by_channel). Fixed to ["ALL"] when is_account=N. 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
idstring
idsarray<object>
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