Data API
Is there an API, and what can it do? Yes. This is the reference for its server-to-server half,
the etl-ep endpoints of the BigLedger REST API. If you have not issued an access key yet, start with
Getting Started.
The example that runs through this page is an integration pushing the web orders of GadgetSphere
Online (GSO, the e-commerce arm of a fictional Malaysian electronics retailer) into BigLedger as
sales invoices: create each one, finalise it, and confirm it posted. The part most integrations get
wrong is the middle step — see Draft, then Finalise.
Every path and method on this page is taken from the platform’s own route table, so you can use them exactly as written. The API Reference lists the routes this page leaves out.
The fast path: one web order in, as a posted sales invoice, in three calls to
https://api-etl.akaun.com with the AccessId, AccessKey and tenantCode headers. Map the company’s
default GL codes first: a missing receivable mapping stops the journal after Finalise has answered 200.
Data: Writing Documents owns the three
calls, with the caution that goes with each:
- Create the invoice as a draft, with no
posting_status(Create as a draft). - Finalise it, once (Finalise).
- A minute later, read it back for
posting_journalPOSTED(How you know it worked).
Hosts
| Host | Use it for |
|---|---|
https://api-etl.akaun.com | Data traffic |
https://api.akaun.com | Signing in and managing access keys |
Both serve the same paths. Everything on this page is under api-etl.akaun.com.
Path grammar
/core2/{tnt|platform}/{dm|ms|cm}/<module>[/<sub-module>]/<resource>/<access-endpoint>Read a path off this page or the API Reference rather than composing
one: the scope and layer segments are usually present but 65 of the 1,206 etl-ep routes at the
backend commit of 16 October 2026 (the API Reference counts 1,191 at an earlier commit) sit directly under /core2/dm/… or /core2/ms/…, one uses the cm layer, and most paths carry a
sub-module (erp/fi/fi-items, erp/gen-doc/{docType}, alg/cc/actions) rather than the bare
module-plus-resource shape below.
| Segment | Meaning |
|---|---|
tnt | Tenant-scoped. Needs a tenantCode header. This is where business data lives. |
platform | Platform-scoped: identity, applets, tenants. Most need no tenantCode; the few that are tenant-aware answer CLIENT_TENANT_CODE_IS_EMPTY without it (Authentication). |
dm | Domain model — the normal, current surface |
ms | Micro-service — older, narrower endpoints |
<module> | erp, crm, inv, fi, cms, pgw, fm and others |
<resource> | The thing you are addressing |
<access-endpoint> | Who the endpoint is for |
Access endpoints:
etl-ep | Server-to-server integrations. Yours. |
backoffice-ep | A staff user working in the BigLedger shell |
login-ep | A signed-in user acting on their own records |
login-entity-ep | An external party — a customer or supplier — acting on their own records |
public-ep | Meant for unauthenticated callers. Not a guarantee: some public-ep routes still ask for a credential, so test the one you need |
278 of the 345 etl-ep resource prefixes also have a backoffice-ep twin. Build against
etl-ep: it is the variant that takes an access key. Do not assume that a twin, or the route a
screen calls, behaves identically. The document Finalise route is the clearest case where the
server-to-server route and the route the screens call do different work —
see Data: Writing.
417, not 404, with "code": "SERVER_GENERAL_UNKNOWN_ERROR"
and a message beginning No static resource. If you see that, the path is wrong.The six operations
Most resources on this surface expose the same shape. Taking the item master as the example:
| Operation | Request |
|---|---|
| Create | POST /core2/tnt/dm/erp/fi/fi-items/etl-ep |
| Update | PUT /core2/tnt/dm/erp/fi/fi-items/etl-ep |
| Delete | DELETE /core2/tnt/dm/erp/fi/fi-items/etl-ep/{guid} |
| List all | GET /core2/tnt/dm/erp/fi/fi-items/etl-ep |
| Read one | GET /core2/tnt/dm/erp/fi/fi-items/etl-ep/{guid} |
| Filter and page | GET /core2/tnt/dm/erp/fi/fi-items/etl-ep/query |
A handful of resources add extras, and they are rarer than they look: …/etl-ep/multi for batch
create exists on five resources (contacts in both crm and erp, employees, financial items,
and generic documents), …/etl-ep/query/count on two (entities), and
…/etl-ep/query/snapshot on ten. File attachment endpoints appear where the resource
carries files. Check before you plan around one.
Do not assume all six exist on every resource. There are real gaps and they are not
signposted. Entities are the one you will hit first: POST, PUT, GET and
…/query all work at entity/{entityType}/etl-ep, but there is no delete on the typed path —
delete is only on the type-agnostic DELETE /core2/tnt/dm/erp/entity/etl-ep/{guid}, and there is
also PUT /core2/tnt/dm/erp/entity/etl-ep/inactivation/{guid} if you want to retire a record
rather than remove it.
Contacts are narrower still: on this surface they offer only
POST …/contacts/etl-ep/multi. Only about a third of etl-ep resources carry all six operations,
so probe the one you need before you design around it — a path that is not routed at all returns
417. That does not catch a bad {docType} or {entityType}, because the route exists: an
unknown {docType} comes back as 404, an unknown {entityType} as 400
CLIENT_VALIDATION_GENERAL.
What is on the surface
1,059 endpoint methods across 177 controllers, covering roughly 320 resources. The groups you are most likely to need:
Master data
| Resource | Path under /core2/tnt/dm/erp/ |
|---|---|
| Customers, suppliers, employees, merchants | entity/{entityType}/etl-ep |
| All entities regardless of type | entity/etl-ep |
| Financial items (the sellable/purchasable item master) | fi/fi-items/etl-ep |
| Inventory items | inv/inv-items/etl-ep |
| Companies | companies/etl-ep |
| Branches | branches/etl-ep |
| Locations | locations/etl-ep |
| Chart of accounts, ledgers and cashbooks | chart-of-acc/etl-ep, fi/ledgers/etl-ep, cashbooks/etl-ep |
| Contacts (batch create only) | contacts/etl-ep/multi |
| Labels and label lists | labels/etl-ep, label-lists/etl-ep |
| Pricing scheme links | pricing-scheme-link/etl-ep |
Credit limits and credit terms (write only — POST and PUT; no read, /query or delete. GET fi/entity-credit-availability/etl-ep with entityGuid, companyGuid and docCcy returns a customer’s available credit) | fi/entity-sales-credit-limit/etl-ep and siblings |
{entityType} is one of entities, customers, suppliers, employees, merchants — so a
customer read is GET /core2/tnt/dm/erp/entity/customers/etl-ep/query.
Documents
Every document type goes through one controller, keyed by a URL slug:
| Operation | Request |
|---|---|
| List the document types this platform knows | GET /core2/tnt/dm/erp/gen-doc/etl-ep/server-doc-types |
| Create | POST /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep |
| Create many | POST /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/multi |
| Update | PUT /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep |
| Finalise (post) | PUT /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/update-posting-status/{guid} |
Delete (no posted check, and it reverses nothing: Void a FINAL one) | DELETE /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/{guid} |
| Read one | GET /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/{guid} |
| Filter and page, one type | GET /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/query |
| Filter and page, all types | GET /core2/tnt/dm/erp/gen-doc/etl-ep/query |
| Void | PUT /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/void/{guid} |
| Print to PDF | GET /core2/tnt/dm/erp/gen-doc/{docType}/etl-ep/print-jasper-pdf/{guid}?printableFormatHdrGuid=… |
There are 97 document-type slugs. The common ones:
{docType} slug | Document type |
|---|---|
internal-sales-invoices | INTERNAL_SALES_INVOICE |
internal-sales-cashbills | INTERNAL_SALES_CASHBILL |
internal-sales-orders | INTERNAL_SALES_ORDER |
internal-sales-returns | INTERNAL_SALES_RETURN |
internal-sales-credit-notes | INTERNAL_SALES_CREDIT_NOTE |
internal-sales-debit-notes | INTERNAL_SALES_DEBIT_NOTE |
internal-purchase-orders | INTERNAL_PURCHASE_ORDER |
internal-purchase-invoices | INTERNAL_PURCHASE_INVOICE |
internal-purchase-goods-received-notes | INTERNAL_PURCHASE_GOODS_RECEIVED_NOTE |
internal-stock-adjustment | INTERNAL_STOCK_ADJUSTMENT |
internal-payment-vouchers | INTERNAL_PAYMENT_VOUCHER |
internal-receipt-vouchers | INTERNAL_RECEIPT_VOUCHER |
server-doc-types returns the type names, not the URL slugs. It gives you
INTERNAL_SALES_INVOICE; the URL wants internal-sales-invoices. Use it to confirm a type exists,
then take the slug from the table above. If the type you need is not in that table, open an issue at
BigLedger-Support/public and ask for its slug — do not guess the
pluralisation, because it is not consistent (internal-stock-adjustment is singular).Other modules
crm/ carries membership cards, classes, points transactions and contacts. alg/cc/ carries the
contact-centre resources — agents, conversation events, channels, tasks. cms/ carries website
schemas and post categories. fm/ carries files and labels. pgw/ carries payment providers and
payment transactions. Many carry fewer than six (points and payment transactions, files), so
check the route.
If a resource you need is not listed here, it may still exist — ask for the current route rather than guessing it.
Request and response format
Headers
AccessId: <10 characters>
AccessKey: <25 characters>
tenantCode: <the tenant>
Content-Type: application/json # on POST and PUTFull credential detail in Authentication.
Envelopes
Single object or non-paged list:
{ "code": "OK_RESPONSE", "data": { }, "message": "" }Paged (…/query):
{
"totalRecords": 5217,
"offset": 0,
"limit": 200,
"code": "OK_RESPONSE",
"message": "",
"data": [ ]
}code is a platform response code, not an HTTP status. Match on it.
Responses are streamed, not buffered. A large page arrives progressively and the connection
stays open for the duration — parse incrementally. A failure part-way through can end a page early
after OK_RESPONSE has been sent, so a short page does not prove you reached the end.
Responses are gzip-compressed above 1 KB. Send Accept-Encoding: gzip.
Bodies
Create and update bodies are containers: a header object plus arrays of related rows, keyed by the underlying table names.
{
"bl_fi_generic_doc_hdr": { },
"bl_fi_generic_doc_line": [ ],
"bl_fi_generic_doc_ext": [ ],
"bl_fi_generic_doc_link": [ ]
}bl_fi_generic_doc_line
(singular); item lines are bl_fi_mst_item_lines (plural). Copy the keys from a real response.On a create, the server fills in some fields you leave out, and three of them are worth deciding yourself:
- The header
guid. Leave it out and BigLedger generates one. Better, generate your own UUID and store it before the first attempt: a create that reuses aguidalready in the tenant is refused, so a retry after a timeout cannot make a second invoice. posting_status. Leave it out, or sendDRAFT, which is the default. Never sendFINALon a create (Draft, then Finalise).status. Leave it out and it isACTIVE. It is a different field fromposting_status:statusis the record’s lifecycle, whileposting_statussays whether the document has been posted (DRAFT, thenFINAL, orVOID).
Reading before writing
The same container type comes back from GET, so the reliable way to learn a write body is to
read a record of the same type and mirror it. For GSO, that means fetching one sales invoice
someone keyed on a screen — GET …/gen-doc/internal-sales-invoices/etl-ep/{guid} — and using its
keys as your template. Dates are ISO-8601 strings, never epoch numbers.
Do not resend the copy whole. It carries the original’s identifiers and references (line guids,
base_doc_guid, e-invoice, intercompany and marketplace fields), most of which BigLedger’s own clone resets.
Build the create from the business fields you mean to set, with a new header guid, and leave out
posting_status and every other posting_* flag (posting_journal, posting_inventory,
posting_membership, posting_cashbook): a copied POSTED can stop that posting for the new document.
Draft, then Finalise
Creating a document saves it; only a second call, setting it FINAL, posts it
(Data API: writing documents).
Create as a draft
Leave posting_status out and the create stores a DRAFT (Data: Writing says why).
Finalise
PUT …/etl-ep/update-posting-status/{guid} answers without waiting for the posting job, which may already have started (Data: Writing).
What the etl-ep Finalise does differently
Four differences from the screens’ route (Data: Writing).
How you know it worked
Read posting_journal back a minute later (Data: Writing).
What must exist first, and what it sets off
Permissions, master data and default GL codes before; follow-on jobs, webhooks and e-invoicing after (Data: Writing).
The document chain
bl_fi_generic_doc_link records, line to line, which document a document came from
(Data: Writing).
Query parameters
…/query endpoints share a common set, plus per-resource filters. Paging is limit and offset
(defaults 100 and 0), sorting is orderBy (a column on the record, such as updated_date;
the record’s guid when you send none) and order. status, excluded_statuses and
search_word narrow the result, and querying_timezone (default Asia/Kuala_Lumpur) names the
zone the date filters are read in. calcTotalRecords (default false) adds a total count at the cost
of an extra COUNT query, so send it on the first page only. Three behave in ways you would not guess:
| Parameter | Default | What catches integrations out |
|---|---|---|
limit | 100 | No enforced maximum. Responses stream, so a big page is a long response. |
order | ASC | ASC or DESC, in either letter case. An invalid value is refused with 400 (CLIENT_QUERY_WRONG_FORMAT on a GET). |
status | — | Filter by record status — the lifecycle (ACTIVE and so on), not posting_status |
Most of the resources you will sync also accept date ranges in ISO-8601: updated_date_from /
updated_date_to (when the row last changed — the one to use for incremental pulls),
created_date_from / created_date_to, and, on documents, date_txn_from / date_txn_to (the
business transaction date).
Not every resource supports them. To check, send a range that excludes rows you know exist: if they still come back, that resource ignores the filter.
Document queries add server_doc_type, guid_comp, guid_branch, hdr_posting_status (the
filter for DRAFT / FINAL / VOID),
doc_entity_hdr_guid, hdr_doc_ccy, and the correlation filters below.
Correlating with your own identifiers
Records carry three fields for your side of the mapping — client_key (your primary key for the
record), client_source (which of your systems it came from) and client_value (anything else you
need to carry). They are yours to populate, though some built-in connectors fill them on the
records they create, so pick a client_source of your own. Document queries filter
on all three, as hdr_client_key, hdr_client_source and hdr_client_value.
GET …/gen-doc/internal-sales-invoices/etl-ep/query?hdr_client_source=storefront&hdr_client_key=WEB-2026-0043117client_key on everything you write, and query on hdr_client_key before you
create. Also send a header guid you generated and stored before the first attempt: a create that
reuses an existing guid is refused, so a retry after a timeout cannot produce a second document.Limits
Measured from the platform’s own configuration.
| Request timeout | 2 hours for asynchronous request handling |
| Multipart upload | 2 GB per file and per request |
| Response compression | gzip above 1 KB |
| Page size | Defaults to 100; no maximum enforced |
| Batch create | No maximum enforced on …/etl-ep/multi. One refused document refuses the whole batch |
429
(CLIENT_OVERLOAD_DATABASE), but on etl-ep it can surface as 417 SERVER_GENERAL_UNKNOWN_ERROR
instead, so read a 417’s message before retrying. Nothing backs off on your behalf. A runaway job
competes with the tenant’s own users for the same server. When a call fails, back off before
retrying, lengthen the wait each time, and cap the number of attempts. Pace your jobs, run bulk work outside business hours, and keep concurrency
low.Error codes
| HTTP | code | Meaning |
|---|---|---|
| 200 | OK_RESPONSE | Success |
| 200/404 | OK_NODATA | The request was valid; nothing matched |
| 400 | AUTH_TOKEN_OR_ACCESS_ID_WAS_NOT_PROVIDED | No credential |
| 400 | AUTH_TOKEN_OR_ACCESS_KEY_WAS_NOT_PROVIDED | AccessId without AccessKey |
| 400 | CLIENT_TENANT_CODE_IS_EMPTY | No tenantCode header |
| 401 | CLIENT_AUTH_NO_TOKEN | No credential on a platform endpoint |
| 403 | AUTH_TOKEN_OR_INVALID_ACCESS_ID | No key with that AccessId |
| 403 | AUTH_TOKEN_OR_EXPIRED_ACCESS_ID | The key has passed its validDateEnd |
| 403 | AUTH_TOKEN_OR_ACCESS_ID_TOKEN_NOT_MATCHED | Wrong AccessKey for that AccessId |
| 403 | CLIENT_AUTH_INVALID_TOKEN | Malformed or expired token |
| 403 | CLIENT_AUTH_USER_NOT_AUTHORIZED | Authenticated; the user lacks the permission |
| 404 | CLIENT_TENANT_CODE_DOES_NOT_EXIST | Unknown tenant |
| 404/403 | CLIENT_VALIDATION_GUID_DOES_NOT_EXIST | No record with that GUID |
| 400 | EXCEPTION_INCONSISTENT_DATA | The body failed a consistency check; data lists each failure |
| 417 | SERVER_GENERAL_UNKNOWN_ERROR | Unhandled error — or an unrecognised path |
Check code before HTTP status. A validation failure and a permission failure can share a status,
and on Finalise one code covers both a missing document and a missing permission (below).
A validation refusal carries its detail in data, one entry per failure:
{
"code": "EXCEPTION_INCONSISTENT_DATA",
"message": "…",
"data": [
{ "errorCode": "FISCAL_PERIOD_LOCKED",
"shortMessage": "The selected date falls within a locked fiscal period.",
"longMessage": "…", "targetedObject": null }
]
}When a document call fails — what you see, why, and what to do
| What you see | Why | What to do |
|---|---|---|
417, SERVER_GENERAL_UNKNOWN_ERROR, message beginning No static resource | The path is not routed | Copy the path from this page or the API Reference; do not compose it |
404, OK_NODATA, on create, update, delete or read | BigLedger does not know that {docType} slug | Take the slug from the table under Documents. server-doc-types gives type names, not slugs |
404, CLIENT_VALIDATION_GUID_DOES_NOT_EXIST, on Finalise | One of three things, answered the same way: the slug is not the document’s type, the guid does not exist, or the key’s user may not update it | GET the document with the same slug. If that finds it, the cause is permission |
403, CLIENT_AUTH_USER_NOT_AUTHORIZED, on create or update | The key’s user lacks that permission for this document type, for the company, branch or location the document names | Check the key’s permissions for that branch, not only for the tenant |
400, EXCEPTION_INCONSISTENT_DATA | The document failed validation. On …/multi, nothing in the batch was written | Fix every errorCode in data and send the whole batch again |
400, data naming GENERIC_DOC_HDR_OBJECT_GUID_ALREADY_EXISTS | A document with that header guid already exists | On a retry, your first attempt landed. GET it; do not create it again |
400 on Finalise, data naming FISCAL_PERIOD_LOCKED | The transaction date is in a locked period | Move the draft’s date into an open period, or ask whoever closes the books whether the period should reopen |
400 on Finalise, data naming FOREX_DOC_REQUIRES_NON_ZERO_XRATE | A foreign-currency document with no exchange rate | Set the rate on the draft and finalise again — then read the foreign-currency point on Data: Writing |
400, CLIENT_MALFORMED_JSON_REQUEST | The body is not valid JSON for this resource | Mirror a record read back with GET (Reading before writing) |
200 on Finalise, but posting_journal is still blank minutes later | The journal job failed, has not run yet, or was not queued for this document (not subscribed, or left out by the company’s posting settings): check that a journal is expected first. The usual cause is a default GL code the company lacks, which the job records as MISSING_DEFAULT_GL_CODE. On this route a foreign-currency document, and a company with no primary ledger or no default GL codes, also stop it | Fix the cause, then use Trace Document’s Resolve. A second Finalise here also posts it, but re-queues every follow-on job, not only the stopped one |
429, CLIENT_OVERLOAD_DATABASE | The database is out of connection slots | Back off and retry later — see Limits |
What the API leaves to you
The document endpoints are deliberately general. Some checks a screen relies on run in the screen, or on the
route the screen calls, not on etl-ep. BigLedger keeps one general endpoint per operation rather than
one per screen rule, so this is a design choice and not a gap. It does move those checks onto your
side, and each one needs an owner.
- Not creating the same order twice. Whoever owns the integration settles the key scheme once
and writes it down: a stored header
guidper order, plusclient_sourceandclient_key(for GSO,storefrontand the web order number). Changing the scheme later breaks the duplicate check for everything already sent. - The checks the screen would have made. Two examples: the stock balance at Finalise on this route, and how much of an order a delivery has consumed (the link quantities on Data: Writing). Your integration makes these before it calls, or someone decides they are not needed. An online arm that sells ahead of stock on purpose is a legitimate answer, but it should be somebody’s decision.
- When a document becomes final. The API finalises the moment you ask. Whoever owns GSO’s books
decides whether web orders post on arrival or wait as drafts for review. A draft is cheap to
correct; a
FINALdocument is queued for posting, which may already be running. - Noticing a posting that stopped. Nothing calls you back, and nothing in the product reads the
job-failure table. So the check is yours, daily. Query yesterday’s documents with
hdr_client_source=storefront,hdr_posting_status=FINALand adate_txnrange. Compare the count and total with your own system, and look for any row whoseposting_journalis still blank. The finance person who owns GSO is the right owner. They know it is done when the counts match and everyFINALdocument carriesPOSTED. Anything else goes to Trace Document.