Skip to content
Details

Create Account Details

Create an accounting entry (also supports creating from a copy_id pre-fill). It changes real accounting-entry data.

Request parameters

  • Required: bookingTypeId (Booking Type ID), txNo (Transaction No.), name (Description), accountAt (Account Date), ledgerDate (Ledger Date), objectCode (Object Code), debitFirstSubjectCode (Debit First-level Subject Code), debitSecondSubjectCode (Debit Second-level Subject Code), debitSubjectCode (Debit Third-level Subject Code), creditFirstSubjectCode (Credit First-level Subject Code), creditSecondSubjectCode (Credit Second-level Subject Code), creditSubjectCode (Credit Third-level Subject Code), amount (Amount)
  • Optional: sourceId (Book Source), aaid (Associated Account ID), remark (Remark), debitName (Debit Subject Full Name), creditName (Credit Subject Full Name), objectType (Object Type), audit_frontend_resource (Audit Frontend Resource Snapshot)
  • 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/createAccountDetailsV2

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

sourceIdnumber

Journal-entry data source, a dropdown selection; values come from the book_source dynamic enumeration and are not fixed.

Call GET /v1/datasets/refs/book_source to retrieve the current data dictionary, and use the returned entry's key as this field's value.

bookingTypeIdstringrequired

Bookkeeping business type, a dropdown selection (cascading with the data source); values come from the book_business_types_by_source dynamic enumeration and are not fixed.

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.

aaidstring

The associated account AAID (not applicable in some scenarios; may be omitted).

txNostringrequired

Specifies Transaction No.. This field is required.

namestringrequired

Specifies Description. This field is required.

accountAtstringrequired

Bookkeeping time, format YYYY-MM-DD 00:00:00.

ledgerDatestringrequired

Accounting date, format YYYY-MM-DD HH:mm:ss.

objectCodestringrequired

Target currency, a dropdown selection; values come from the tenant_currencies_by_channel dynamic enumeration and are not fixed.

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.

debitFirstSubjectCodestringrequired

Specifies Debit First-level Subject Code. This field is required.

debitSecondSubjectCodestringrequired

The debit second-level account, cascading from the first-level account.

debitSubjectCodestringrequired

The debit detail account, cascading from the second-level account.

creditFirstSubjectCodestringrequired

Specifies Credit First-level Subject Code. This field is required.

creditSecondSubjectCodestringrequired

The credit second-level account, cascading from the first-level account.

creditSubjectCodestringrequired

The credit detail account, cascading from the second-level account.

amountstringrequired

Amount involved in this business operation. This field is required.

remarkstring

Remark, up to 100 characters.

debitNamestring

The debit account name, populated automatically with the debit detail account.

creditNamestring

The credit account name, populated automatically with the credit detail account.

objectTypestring

Specifies Object Type.

audit_frontend_resourceobject

A data snapshot for auditing (the original-record snapshot in a copy scenario, an empty object for a pure create), used for backend audit comparison; not a user-entered 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