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
Authentication covers credentials, Data API the envelope and query parameters, and ERP Core API the shared errors and filters.
The fast path:
- Find the GL code the cashbook posts to. It must sit in the chart of accounts of the company you
name: otherwise create fails with
CASHBOOK_HDR_OBJECT_COMPANY_AND_GLCODE_GUID_ARE_INCONGRUENT, which is easy to misread as a permission problem. POST /etl-epwithglcode_guid,comp_guidand acodeunique across non-deleted cashbooks (create a cashbook).- Read with
GET /etl-ep/{guid}orGET /etl-ep/query(which builds the whole page in memory, so keeplimitmodest); the/backoffice-epread variants are not available. The/etl-ependpoints take the permissions in the table below, not the..._CASHBOOK_BACKOFFICE_*family.
Permissions
The access key’s owner needs one of these for each operation:
| Operation | Permissions (any one) |
|---|---|
| Create | API_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
| Operation | Integration path (/etl-ep) | Back-office path |
|---|---|---|
| Create | POST /etl-ep | POST /, POST /backoffice-ep |
| Update | PUT /etl-ep | PUT /, PUT /backoffice-ep |
| Delete | DELETE /etl-ep/{guid} | DELETE /{guid}, DELETE /backoffice-ep/{guid} |
| List all | GET /etl-ep | GET / |
| Get one | GET /etl-ep/{guid} | GET /{guid} |
| Query | GET /etl-ep/query | GET /query |
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
| Field | Type | On create | Description |
|---|---|---|---|
guid | UUID | Optional | Generated if omitted. Required on update. If supplied on create it must not already exist. |
glcode_guid | string (UUID) | Required | GL 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_guid | UUID | Required | Owning company. Must exist. |
code | string | Recommended | Short code. Must be unique across non-deleted cashbooks. |
name | string | Recommended | Display name. |
descr | string | Optional | Description. |
acc_no | string | Optional | Bank account number. |
currency | string | Optional | Currency, e.g. MYR. |
branch_guid | UUID | Optional | Branch. Must exist if supplied. |
guid_bank_hdr | UUID | Optional | Bank master record. |
settlement_method_guid | UUID | Optional | Default settlement method. |
status | string | Optional | Defaults to ACTIVE. |
revision | string | Optional | Generated if omitted. Send the value you read back when updating. |
client_key | string | Optional | Your system’s key for this record. |
client_source | string | Optional | Your system’s name. |
client_value | string | Optional | Free-form value for your own use. |
property_json | object | Optional | Arbitrary extra properties. |
namespace | string | Optional | Namespace for multi-app tenants. |
module_guid | UUID | Optional | Owning module. |
applet_guid | UUID | Optional | Owning applet. |
acl_config | object | Optional | Access-control configuration. |
acl_policy | object | Optional | Access-control policy. |
date_created | datetime | Server-assigned | |
date_updated | datetime | Server-assigned | |
created_by_subject_guid | UUID | Server-assigned | Set from the access key’s owner. |
updated_by_subject_guid | UUID | Server-assigned | Set 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-PRI-KV01",
"name": "Primary bank current account, KV01",
"descr": "Takings banked by branch GS-KV-01",
"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-PRI-KV01",
"name": "Primary bank current account, KV01",
"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-PRI-KV01",
"name": "Primary bank current account, KV01 (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"
}
}'The answer is the cashbook as saved, in the same envelope as create, with a new revision:
{
"code": "OK_RESPONSE",
"data": {
"bl_fi_mst_cashbook_hdr": {
"guid": "1a7e9c53-6b28-4d90-8f41-5c3b7a2e6d19",
"code": "CB-PRI-KV01",
"name": "Primary bank current account, KV01 (MYR)",
"status": "ACTIVE",
"revision": "4F1D8A62-0B37-4C95-A2E4-7C6B1E9D3F58"
},
"bl_fi_mst_cashbook_exts": []
},
"message": ""
}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-epThe answer is the envelope without paging fields. On a tenant with no cashbooks yet it is simply empty:
{
"code": "OK_RESPONSE",
"message": "",
"data": []
}Streams every cashbook, including those the key’s owner may not read: those arrive as their guid and "status": "Permission Denied" only. Note the spelling, which differs from the PERMISSION_DENIED other ERP lists use (Redacted records). No paging: use /etl-ep/query, which instead refuses the whole call without the read permission.
Get one cashbook
GET /core2/tnt/dm/erp/cashbooks/etl-ep/{guid}
curl "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"{
"code": "OK_RESPONSE",
"data": {
"bl_fi_mst_cashbook_hdr": {
"guid": "1a7e9c53-6b28-4d90-8f41-5c3b7a2e6d19",
"code": "CB-PRI-KV01",
"name": "Primary bank current account, KV01 (MYR)",
"comp_guid": "3f2a7c10-9b4e-4d61-8a22-1c5e7f9d0b33",
"glcode_guid": "b6d3f018-4a29-4e75-8c31-9f7a2e5b6d48",
"currency": "MYR",
"status": "ACTIVE"
},
"bl_fi_mst_cashbook_exts": []
},
"message": ""
}Returns 400 with CLIENT_CASHBOOK_NOT_FOUND and "data": false if it does not exist.
Query cashbooks
GET /core2/tnt/dm/erp/cashbooks/etl-ep/query
In addition to the shared query parameters:
| Parameter | Type | Description |
|---|---|---|
keyword | string | Not applied on this endpoint. Filter with code, name or acc_no instead. |
code | string | Exact code match. |
name | string | Exact name match. |
acc_no | string | Bank account number. |
comp_guid | string (UUID) | Filter by company. |
comp_guids | string set | Filter by several companies. Repeat the parameter. |
branch_guid | string (UUID) | Filter by branch. |
branch_guids | string set | Filter by several branches. Repeat the parameter. |
glcode_guid | string (UUID) | Filter by GL code. |
glcode_guids | string set | Filter by several GL codes. Repeat the parameter. |
guids | string set | Fetch a specific set of cashbooks. Repeat the parameter. |
created_date_from / created_date_to | datetime | Creation date range. |
updated_date_from / updated_date_to | datetime | Update date range. |
hdr_client_key | string | Filter by your system’s key. |
hdr_client_source | string | Filter by your system’s name. |
client_value | string | Filter by client value. |
ext_type, ext_code, ext_option | string | Filter on extension rows. |
param_code, param_name, param_type | string | Filter on extension parameters. |
value_string, value_numeric, value_file | string / number | Filter 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"The paged envelope, one container per cashbook:
{
"totalRecords": 1,
"offset": 0,
"limit": 50,
"code": "OK_RESPONSE",
"message": "",
"data": [
{
"bl_fi_mst_cashbook_hdr": {
"guid": "1a7e9c53-6b28-4d90-8f41-5c3b7a2e6d19",
"code": "CB-PRI-KV01",
"name": "Primary bank current account, KV01 (MYR)",
"status": "ACTIVE"
},
"bl_fi_mst_cashbook_exts": []
}
]
}Unlike the other resources, this endpoint builds the full page in memory rather than streaming it, so keep limit modest.
Related
- Accounting API — the generated inventory of this family’s
etl-eproutes, where the six cashbook routes are listed with the chart of accounts and ledgers. It lists paths only; the bodies, requirements and failure modes are here. - Payment Voucher — settles against the cashbooks on this page
- Data API — hosts, headers, paging, the response envelope and limits