Supplier
Suppliers are business entities in BigLedger. One set of endpoints serves every entity type (customers, suppliers, employees, merchants), and the type is a path segment. For suppliers that segment is suppliers.
Base path: https://api-etl.akaun.com/core2/tnt/dm/erp/entity
See ERP Core API for authentication, the response envelope, and shared query parameters.
Entity types
| Path segment | Entity type | Flag set on the record |
|---|---|---|
suppliers | SUPPLIER | is_supplier: true |
customers | CUSTOMER | is_customer: true |
employees | EMPLOYEE | is_employee: true |
merchants | MERCHANT | is_merchant: true |
entities | ENTITY | generic, no flag |
On the typed paths (/suppliers/etl-ep and friends) the path segment sets the flag for you, so do not set is_supplier by hand.
POST /etl-ep and PUT /etl-ep, set the type in the body. These paths read the entity type from the is_customer, is_supplier, is_employee and is_merchant flags, and return CLIENT_ENTITY_TYPE_NOT_EXIST when none is set. The typed paths such as /suppliers/etl-ep set the flag from the URL instead, which is usually the simpler choice.One record can be several types at once: a supplier that is also a customer has both flags, which is what the “add a type to an existing entity” endpoint below is for.
Permissions
The access key’s owner needs one of these for each operation:
| Operation | Permissions (any one) |
|---|---|
| Create | TNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_CREATE |
| Read | TNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_READ |
| Update | TNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_UPDATE |
| Delete | TNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_DELETE |
Other entity types use the matching TNT_*_CUSTOMER_*, TNT_*_EMPLOYEE_* and TNT_*_MERCHANT_* permissions.
Endpoints
All of these already accept an access key.
| Operation | Path (relative to the base path) |
|---|---|
| Create a supplier | POST /suppliers/etl-ep |
| Create an entity, type set in the body | POST /etl-ep |
| Update a supplier | PUT /suppliers/etl-ep |
| Update an entity, type set in the body | PUT /etl-ep |
| Delete | DELETE /etl-ep/{guid} |
| Inactivate (soft delete) | PUT /etl-ep/inactivation/{guid} |
| List all suppliers | GET /suppliers/etl-ep |
| Get one supplier | GET /suppliers/etl-ep/{guid} |
| Query suppliers | GET /suppliers/etl-ep/query |
| List all entities of any type | GET /etl-ep |
| Get any entity by GUID | GET /etl-ep/{guid} |
| Add the supplier type to an existing entity | PUT /suppliers/etl-ep/{guid} |
| Set supplier running numbers | PUT /suppliers/etl-ep/running-numbers |
| Query snapshot | GET /suppliers/etl-ep/query/snapshot |
| Query snapshot v2 | GET /suppliers/etl-ep/query/snapshot-v2 |
| Query snapshot (POST body) | POST /suppliers/etl-ep/query/snapshot |
| Query snapshot v2 (POST body) | POST /suppliers/etl-ep/query/snapshot-v2 |
| Attach a logo or file | PUT /suppliers/etl-ep/add-files/{hdrGuid} |
/etl-ep. There is no DELETE /suppliers/etl-ep/{guid}; use DELETE /etl-ep/{guid} with the entity’s GUID. (Type-scoped deletes do exist on the bearer-token paths, DELETE /{entityType}/{guid} and DELETE /{entityType}/backoffice-ep/{guid}.) Prefer PUT /etl-ep/inactivation/{guid} where the supplier may already be referenced by documents, so those documents keep a valid reference.The EntityContainer
{
"bl_fi_mst_entity_hdr": { },
"bl_fi_mst_entity_line": [ ],
"bl_fi_mst_entity_ext": [ ],
"bl_fi_mst_entity_payment_method": [ ],
"bl_fi_mst_entity_login_subject_links": [ ]
}Only bl_fi_mst_entity_hdr is needed to create a supplier. The others may be omitted or sent as [].
bl_fi_mst_entity_hdr: fields you are likely to need
The fields that apply to a supplier. The same structure serves the other entity types, so fields you do not recognise belong to those.
| Field | Type | On create | Description |
|---|---|---|---|
guid | UUID | Optional | Generated if omitted. Required on update. |
name | string | Recommended | Supplier’s registered name. |
txn_type | string | Required | Exactly INDIVIDUAL or CORPORATE. Any other value, including omitting it, fails with ENTITY_HDR_OBJECT_TXNTYPE_DOES_NOT_EXISTS. |
addresses_json | object | Recommended | Structured address held on the header, in addition to any address lines. |
einvoice_settings_json | object | Optional | E-invoice configuration for this supplier. See the E-Invoice API. |
supplier_code | string | Recommended | Your code for this supplier. |
supplier_id | string | Optional | External supplier identifier. |
is_supplier | boolean | Set for you | Set to true by the suppliers path segment. |
nickname | string | Optional | Short or trading name. |
descr | string | Optional | Description. |
email | string | Optional | Primary email. |
phone | string | Optional | Primary phone. |
ccy_code | string | Optional | Default currency, e.g. MYR. |
id_no | string | Optional | Registration or identity number. |
id_type | string | Optional | Type of id_no, e.g. BRN, NRIC, PASSPORT. |
tax_reg_number | string | Optional | Tax registration number. |
tax_category | string | Optional | Tax category. |
gst_number | string | Optional | GST/SST number. |
wht_tax_number | string | Optional | Withholding tax number. |
default_arap_type | string | Optional | Default AR/AP object type. |
default_comp_guid | UUID | Optional | Default company. |
default_branch_guid | UUID | Optional | Default branch. |
branch_guid | string | Optional | Branch this record belongs to. |
supplier_lifecycle_status_code | string | Optional | Your lifecycle state for the supplier. |
website_url | string | Optional | Website. |
business_nature_code | string | Optional | Nature of business. |
country_alpha2_code / country_alpha3_code | string | Optional | Country, e.g. MY / MYS. |
ref_1 … ref_5 | string | Optional | Free reference fields. |
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. |
status | string | Optional | Defaults to ACTIVE. |
revision | string | Optional | Generated if omitted. Send the value you read back when updating. |
created_date, updated_date | datetime | Server-assigned | |
created_by_subject_guid, updated_by_subject_guid | UUID | Server-assigned | Set from the access key’s owner. |
The xtn_* and job_* columns are employee fields. Ignore them for suppliers.
bl_fi_mst_entity_line: addresses and contacts
Each line is an address or contact person attached to the entity:
| Field | Type | Description |
|---|---|---|
guid | UUID | Generated if omitted. |
entity_hdr_guid | UUID | Filled in from the header. |
txn_type | string | What this line is, e.g. a billing or delivery address. |
name | string | Contact or location name. |
code | string | Line code. |
phone, email | string | Contact details. |
addresses_json | object | Structured address. |
contact_json | object | Structured contact details. |
property_json | object | Arbitrary extra properties. |
id_no, id_type | string | Identity of the contact. |
ref_1 … ref_5 | string | Free reference fields. |
status | string | Defaults to ACTIVE. |
Create a supplier
POST /core2/tnt/dm/erp/entity/suppliers/etl-epcurl -X POST "https://api-etl.akaun.com/core2/tnt/dm/erp/entity/suppliers/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_entity_hdr": {
"name": "Kedai Alat Tulis Sdn Bhd",
"supplier_code": "SUP-0001",
"txn_type": "CORPORATE",
"nickname": "Kedai Alat Tulis",
"email": "accounts@kedaialattulis.example",
"phone": "+60312345678",
"ccy_code": "MYR",
"id_no": "199801012345",
"id_type": "BRN",
"tax_reg_number": "C12345678901",
"country_alpha2_code": "MY",
"status": "ACTIVE"
},
"bl_fi_mst_entity_line": [],
"bl_fi_mst_entity_ext": [],
"bl_fi_mst_entity_payment_method": [],
"bl_fi_mst_entity_login_subject_links": []
}'Response
{
"code": "OK_RESPONSE",
"data": {
"bl_fi_mst_entity_hdr": {
"guid": "e7b2d48f-1c93-4a05-8e67-4f9a3b1d5c26",
"name": "Kedai Alat Tulis Sdn Bhd",
"supplier_code": "SUP-0001",
"is_supplier": true,
"is_customer": false,
"email": "accounts@kedaialattulis.example",
"ccy_code": "MYR",
"status": "ACTIVE",
"revision": "2f6a8c31-9e47-4d50-b83c-1a5e7d9f2b48",
"created_date": "2026-09-14T09:30:00+08:00"
},
"bl_fi_mst_entity_line": []
},
"message": ""
}Keep the returned guid: purchase invoices reference it as doc_entity_hdr_guid.
Update a supplier
PUT /core2/tnt/dm/erp/entity/suppliers/etl-epSend the whole container with guid set.
curl -X PUT "https://api-etl.akaun.com/core2/tnt/dm/erp/entity/suppliers/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_entity_hdr": {
"guid": "e7b2d48f-1c93-4a05-8e67-4f9a3b1d5c26",
"name": "Kedai Alat Tulis Sdn Bhd",
"supplier_code": "SUP-0001",
"txn_type": "CORPORATE",
"email": "finance@kedaialattulis.example",
"phone": "+60312345678",
"ccy_code": "MYR",
"status": "ACTIVE",
"revision": "2f6a8c31-9e47-4d50-b83c-1a5e7d9f2b48"
}
}'Make an existing entity a supplier
If a record already exists as a customer and you now buy from it, add the supplier type rather than creating a second record:
PUT /core2/tnt/dm/erp/entity/suppliers/etl-ep/{guid}curl -X PUT "https://api-etl.akaun.com/core2/tnt/dm/erp/entity/suppliers/etl-ep/e7b2d48f-1c93-4a05-8e67-4f9a3b1d5c26" \
-H "AccessId: YOUR_ACCESS_ID" \
-H "AccessKey: YOUR_ACCESS_KEY" \
-H "tenantCode: YOUR_TENANT_CODE"Inactivate or delete a supplier
Inactivating is the safe option and is what the back office does:
PUT /core2/tnt/dm/erp/entity/etl-ep/inactivation/{guid}A hard delete is also available. Note the path has no type segment:
DELETE /core2/tnt/dm/erp/entity/etl-ep/{guid}List all suppliers
GET /core2/tnt/dm/erp/entity/suppliers/etl-epStreams every supplier the key’s owner may read. No paging: use /suppliers/etl-ep/query.
Get one supplier
GET /core2/tnt/dm/erp/entity/suppliers/etl-ep/{guid}Query suppliers
GET /core2/tnt/dm/erp/entity/suppliers/etl-ep/queryIn addition to the shared query parameters:
| Parameter | Type | Description |
|---|---|---|
name | string | Exact name match. |
name_like | string | Partial name match. |
nickname | string | Match on nickname. |
supplier_code | string | Exact supplier code. |
entity_code | string | Match on the entity code. |
code_like | string | Partial code match. |
email | string | Exact email. |
phone | string | Exact phone. |
phone_like | string | Partial phone match. |
is_phone_encoded | boolean | Set when the phone value is encoded. |
id_no, id_no_old, id_type | string | Identity number and type. |
ccy_code | string | Currency. |
txn_type | string | Transaction type. |
descr | string | Match on description. |
is_supplier, is_customer, is_employee, is_merchant | boolean | Filter by type flags. |
entity_types | string set | Filter by several types at once. Repeat the parameter. |
contact_key_guid | UUID | Filter by contact key. |
ref_1 … ref_5 | string | Free reference fields. |
hdr_client_key, hdr_client_source, hdr_client_value | string | Filter by your system’s identifiers. |
legacy_entity_category | string | Legacy category. |
exclude_account_manager_linked | boolean | Exclude entities linked to an account manager. |
The suppliers path segment already restricts results to suppliers, so you do not also need is_supplier=true.
curl -G "https://api-etl.akaun.com/core2/tnt/dm/erp/entity/suppliers/etl-ep/query" \
-H "AccessId: YOUR_ACCESS_ID" \
-H "AccessKey: YOUR_ACCESS_KEY" \
-H "tenantCode: YOUR_TENANT_CODE" \
--data-urlencode "name_like=Kedai" \
--data-urlencode "status=ACTIVE" \
--data-urlencode "limit=50" \
--data-urlencode "calcTotalRecords=true"Snapshots
GET /suppliers/etl-ep/query/snapshot and .../snapshot-v2 return a flattened, report-shaped projection instead of the nested container, which is cheaper for large exports. Both also accept the criteria in a POST body when the filter is too long for a URL. Use the plain /query endpoint unless you are exporting in bulk.