Skip to content

Cashbook

A cashbook is a bank or cash account belonging to a company, linked to a GL code in that company’s chart of accounts. Payment vouchers settle against cashbooks.

Base path: https://api-etl.akaun.com/core2/tnt/dm/erp/cashbooks

See ERP Core API for authentication, the response envelope, and shared query parameters.


Permissions

The access key’s owner needs one of these for each operation:

OperationPermissions (any one)
CreateAPI_TNT_DM_ERP_FINANCIAL_CASHBOOK_OWNER, ..._CASHBOOK_ADMIN, API_TNT_DM_ERP_FINANCIAL_CASHBOOK_CREATE
Read..._CASHBOOK_OWNER, ..._CASHBOOK_ADMIN, API_TNT_DM_ERP_FINANCIAL_CASHBOOK_READ
Update..._CASHBOOK_OWNER, ..._CASHBOOK_ADMIN, API_TNT_DM_ERP_FINANCIAL_CASHBOOK_UPDATE
Delete..._CASHBOOK_OWNER, ..._CASHBOOK_ADMIN, API_TNT_DM_ERP_FINANCIAL_CASHBOOK_DELETE

A tenant owner or admin passes all of these regardless.

The /backoffice-ep endpoints use a separate permission family (..._CASHBOOK_BACKOFFICE_*). The /etl-ep endpoints documented here use the permissions in the table above.


Endpoints

OperationIntegration path (/etl-ep)Back-office path
CreatePOST /etl-epPOST /, POST /backoffice-ep
UpdatePUT /etl-epPUT /, PUT /backoffice-ep
DeleteDELETE /etl-ep/{guid}DELETE /{guid}, DELETE /backoffice-ep/{guid}
List allGET /etl-epGET /
Get oneGET /etl-ep/{guid}GET /{guid}
QueryGET /etl-ep/queryGET /query
For reads, use GET /{guid} and GET /query, or their /etl-ep equivalents. The /backoffice-ep read variants are not currently available and are omitted from the table above. The /backoffice-ep write endpoints are unaffected.

A further set of /login-cashbook-link-ep endpoints manages which signed-in users are linked to a cashbook. They are bearer-token only and out of scope here.


The CashbookContainer

{
  "bl_fi_mst_cashbook_hdr": { },
  "bl_fi_mst_cashbook_exts": [ ]
}

bl_fi_mst_cashbook_hdr

FieldTypeOn createDescription
guidUUIDOptionalGenerated if omitted. Required on update. If supplied on create it must not already exist.
glcode_guidstring (UUID)RequiredGL code this cashbook posts to. Must exist in bl_fi_mst_glcode and belong to the chart of accounts of comp_guid. See the note below.
comp_guidUUIDRequiredOwning company. Must exist.
codestringRecommendedShort code. Must be unique across non-deleted cashbooks.
namestringRecommendedDisplay name.
descrstringOptionalDescription.
acc_nostringOptionalBank account number.
currencystringOptionalCurrency, e.g. MYR.
branch_guidUUIDOptionalBranch. Must exist if supplied.
guid_bank_hdrUUIDOptionalBank master record.
settlement_method_guidUUIDOptionalDefault settlement method.
statusstringOptionalDefaults to ACTIVE.
revisionstringOptionalGenerated if omitted. Send the value you read back when updating.
client_keystringOptionalYour system’s key for this record.
client_sourcestringOptionalYour system’s name.
client_valuestringOptionalFree-form value for your own use.
property_jsonobjectOptionalArbitrary extra properties.
namespacestringOptionalNamespace for multi-app tenants.
module_guidUUIDOptionalOwning module.
applet_guidUUIDOptionalOwning applet.
acl_configobjectOptionalAccess-control configuration.
acl_policyobjectOptionalAccess-control policy.
date_createddatetimeServer-assigned
date_updateddatetimeServer-assigned
created_by_subject_guidUUIDServer-assignedSet from the access key’s owner.
updated_by_subject_guidUUIDServer-assignedSet from the access key’s owner.
glcode_guid and comp_guid must agree. The GL code must sit in the chart of accounts that the company record points at. If it does not, create fails with CASHBOOK_HDR_OBJECT_COMPANY_AND_GLCODE_GUID_ARE_INCONGRUENT, which is easy to misread as a permission problem.

bl_fi_mst_cashbook_exts holds optional extension rows (ext_type, ext_code, param_code, param_name, value_string, value_numeric, …). Send [] if unused; hdr_guid, guid, status and revision on each row are filled in for you.


Create a cashbook

POST /core2/tnt/dm/erp/cashbooks/etl-ep
curl -X POST "https://api-etl.akaun.com/core2/tnt/dm/erp/cashbooks/etl-ep" \
  -H "AccessId: YOUR_ACCESS_ID" \
  -H "AccessKey: YOUR_ACCESS_KEY" \
  -H "tenantCode: YOUR_TENANT_CODE" \
  -H "Content-Type: application/json" \
  -d '{
    "bl_fi_mst_cashbook_hdr": {
      "code": "CB-MBB-01",
      "name": "Maybank Current Account",
      "descr": "Main operating account",
      "acc_no": "512345678901",
      "currency": "MYR",
      "comp_guid": "3f2a7c10-9b4e-4d61-8a22-1c5e7f9d0b33",
      "glcode_guid": "b6d3f018-4a29-4e75-8c31-9f7a2e5b6d48",
      "status": "ACTIVE"
    },
    "bl_fi_mst_cashbook_exts": []
  }'

Response

{
  "code": "OK_RESPONSE",
  "data": {
    "bl_fi_mst_cashbook_hdr": {
      "guid": "1a7e9c53-6b28-4d90-8f41-5c3b7a2e6d19",
      "code": "CB-MBB-01",
      "name": "Maybank Current Account",
      "acc_no": "512345678901",
      "currency": "MYR",
      "comp_guid": "3f2a7c10-9b4e-4d61-8a22-1c5e7f9d0b33",
      "glcode_guid": "b6d3f018-4a29-4e75-8c31-9f7a2e5b6d48",
      "status": "ACTIVE",
      "revision": "9C4E7B21-3A85-4F60-B17D-2E8C5A9F3B04",
      "date_created": "2026-09-14T09:30:00+08:00"
    },
    "bl_fi_mst_cashbook_exts": []
  },
  "message": ""
}

Update a cashbook

PUT /core2/tnt/dm/erp/cashbooks/etl-ep

Send the whole container with guid set.

curl -X PUT "https://api-etl.akaun.com/core2/tnt/dm/erp/cashbooks/etl-ep" \
  -H "AccessId: YOUR_ACCESS_ID" \
  -H "AccessKey: YOUR_ACCESS_KEY" \
  -H "tenantCode: YOUR_TENANT_CODE" \
  -H "Content-Type: application/json" \
  -d '{
    "bl_fi_mst_cashbook_hdr": {
      "guid": "1a7e9c53-6b28-4d90-8f41-5c3b7a2e6d19",
      "code": "CB-MBB-01",
      "name": "Maybank Current Account (MYR)",
      "acc_no": "512345678901",
      "currency": "MYR",
      "comp_guid": "3f2a7c10-9b4e-4d61-8a22-1c5e7f9d0b33",
      "glcode_guid": "b6d3f018-4a29-4e75-8c31-9f7a2e5b6d48",
      "status": "ACTIVE",
      "revision": "9C4E7B21-3A85-4F60-B17D-2E8C5A9F3B04"
    }
  }'

Delete a cashbook

DELETE /core2/tnt/dm/erp/cashbooks/etl-ep/{guid}
curl -X DELETE "https://api-etl.akaun.com/core2/tnt/dm/erp/cashbooks/etl-ep/1a7e9c53-6b28-4d90-8f41-5c3b7a2e6d19" \
  -H "AccessId: YOUR_ACCESS_ID" \
  -H "AccessKey: YOUR_ACCESS_KEY" \
  -H "tenantCode: YOUR_TENANT_CODE"

Response

{ "code": "OK_RESPONSE", "data": true, "message": "" }

Returns 400 with CLIENT_CASHBOOK_NOT_FOUND when no cashbook has that GUID. Note that this endpoint uses 400, not the 404 other resources return.


List all cashbooks

GET /core2/tnt/dm/erp/cashbooks/etl-ep

Streams every cashbook the key’s owner may read. No paging: use /etl-ep/query.


Get one cashbook

GET /core2/tnt/dm/erp/cashbooks/etl-ep/{guid}

Returns 400 with CLIENT_CASHBOOK_NOT_FOUND if it does not exist.


Query cashbooks

GET /core2/tnt/dm/erp/cashbooks/etl-ep/query

In addition to the shared query parameters:

ParameterTypeDescription
keywordstringNot applied on this endpoint. Filter with code, name or acc_no instead.
codestringExact code match.
namestringExact name match.
acc_nostringBank account number.
comp_guidstring (UUID)Filter by company.
comp_guidsstring setFilter by several companies. Repeat the parameter.
branch_guidstring (UUID)Filter by branch.
branch_guidsstring setFilter by several branches. Repeat the parameter.
glcode_guidstring (UUID)Filter by GL code.
glcode_guidsstring setFilter by several GL codes. Repeat the parameter.
guidsstring setFetch a specific set of cashbooks. Repeat the parameter.
created_date_from / created_date_todatetimeCreation date range.
updated_date_from / updated_date_todatetimeUpdate date range.
hdr_client_keystringFilter by your system’s key.
hdr_client_sourcestringFilter by your system’s name.
client_valuestringFilter by client value.
ext_type, ext_code, ext_optionstringFilter on extension rows.
param_code, param_name, param_typestringFilter on extension parameters.
value_string, value_numeric, value_filestring / numberFilter on extension values.
curl -G "https://api-etl.akaun.com/core2/tnt/dm/erp/cashbooks/etl-ep/query" \
  -H "AccessId: YOUR_ACCESS_ID" \
  -H "AccessKey: YOUR_ACCESS_KEY" \
  -H "tenantCode: YOUR_TENANT_CODE" \
  --data-urlencode "comp_guid=3f2a7c10-9b4e-4d61-8a22-1c5e7f9d0b33" \
  --data-urlencode "status=ACTIVE" \
  --data-urlencode "limit=50" \
  --data-urlencode "calcTotalRecords=true"

Unlike the other resources, this endpoint builds the full page in memory rather than streaming it, so keep limit modest.

Last updated on