Skip to content

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 segmentEntity typeFlag set on the record
suppliersSUPPLIERis_supplier: true
customersCUSTOMERis_customer: true
employeesEMPLOYEEis_employee: true
merchantsMERCHANTis_merchant: true
entitiesENTITYgeneric, 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.

On 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:

OperationPermissions (any one)
CreateTNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_CREATE
ReadTNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_READ
UpdateTNT_LOG_SUPPLIER_OWNER, TNT_LOG_SUPPLIER_ADMIN, TNT_API_SUPPLIER_UPDATE
DeleteTNT_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.

OperationPath (relative to the base path)
Create a supplierPOST /suppliers/etl-ep
Create an entity, type set in the bodyPOST /etl-ep
Update a supplierPUT /suppliers/etl-ep
Update an entity, type set in the bodyPUT /etl-ep
DeleteDELETE /etl-ep/{guid}
Inactivate (soft delete)PUT /etl-ep/inactivation/{guid}
List all suppliersGET /suppliers/etl-ep
Get one supplierGET /suppliers/etl-ep/{guid}
Query suppliersGET /suppliers/etl-ep/query
List all entities of any typeGET /etl-ep
Get any entity by GUIDGET /etl-ep/{guid}
Add the supplier type to an existing entityPUT /suppliers/etl-ep/{guid}
Set supplier running numbersPUT /suppliers/etl-ep/running-numbers
Query snapshotGET /suppliers/etl-ep/query/snapshot
Query snapshot v2GET /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 filePUT /suppliers/etl-ep/add-files/{hdrGuid}
Delete is not type-scoped on /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.

FieldTypeOn createDescription
guidUUIDOptionalGenerated if omitted. Required on update.
namestringRecommendedSupplier’s registered name.
txn_typestringRequiredExactly INDIVIDUAL or CORPORATE. Any other value, including omitting it, fails with ENTITY_HDR_OBJECT_TXNTYPE_DOES_NOT_EXISTS.
addresses_jsonobjectRecommendedStructured address held on the header, in addition to any address lines.
einvoice_settings_jsonobjectOptionalE-invoice configuration for this supplier. See the E-Invoice API.
supplier_codestringRecommendedYour code for this supplier.
supplier_idstringOptionalExternal supplier identifier.
is_supplierbooleanSet for youSet to true by the suppliers path segment.
nicknamestringOptionalShort or trading name.
descrstringOptionalDescription.
emailstringOptionalPrimary email.
phonestringOptionalPrimary phone.
ccy_codestringOptionalDefault currency, e.g. MYR.
id_nostringOptionalRegistration or identity number.
id_typestringOptionalType of id_no, e.g. BRN, NRIC, PASSPORT.
tax_reg_numberstringOptionalTax registration number.
tax_categorystringOptionalTax category.
gst_numberstringOptionalGST/SST number.
wht_tax_numberstringOptionalWithholding tax number.
default_arap_typestringOptionalDefault AR/AP object type.
default_comp_guidUUIDOptionalDefault company.
default_branch_guidUUIDOptionalDefault branch.
branch_guidstringOptionalBranch this record belongs to.
supplier_lifecycle_status_codestringOptionalYour lifecycle state for the supplier.
website_urlstringOptionalWebsite.
business_nature_codestringOptionalNature of business.
country_alpha2_code / country_alpha3_codestringOptionalCountry, e.g. MY / MYS.
ref_1ref_5stringOptionalFree reference fields.
client_keystringOptionalYour system’s key for this record.
client_sourcestringOptionalYour system’s name.
client_valuestringOptionalFree-form value for your own use.
statusstringOptionalDefaults to ACTIVE.
revisionstringOptionalGenerated if omitted. Send the value you read back when updating.
created_date, updated_datedatetimeServer-assigned
created_by_subject_guid, updated_by_subject_guidUUIDServer-assignedSet 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:

FieldTypeDescription
guidUUIDGenerated if omitted.
entity_hdr_guidUUIDFilled in from the header.
txn_typestringWhat this line is, e.g. a billing or delivery address.
namestringContact or location name.
codestringLine code.
phone, emailstringContact details.
addresses_jsonobjectStructured address.
contact_jsonobjectStructured contact details.
property_jsonobjectArbitrary extra properties.
id_no, id_typestringIdentity of the contact.
ref_1ref_5stringFree reference fields.
statusstringDefaults to ACTIVE.

Create a supplier

POST /core2/tnt/dm/erp/entity/suppliers/etl-ep
curl -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-ep

Send 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-ep

Streams 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/query

In addition to the shared query parameters:

ParameterTypeDescription
namestringExact name match.
name_likestringPartial name match.
nicknamestringMatch on nickname.
supplier_codestringExact supplier code.
entity_codestringMatch on the entity code.
code_likestringPartial code match.
emailstringExact email.
phonestringExact phone.
phone_likestringPartial phone match.
is_phone_encodedbooleanSet when the phone value is encoded.
id_no, id_no_old, id_typestringIdentity number and type.
ccy_codestringCurrency.
txn_typestringTransaction type.
descrstringMatch on description.
is_supplier, is_customer, is_employee, is_merchantbooleanFilter by type flags.
entity_typesstring setFilter by several types at once. Repeat the parameter.
contact_key_guidUUIDFilter by contact key.
ref_1ref_5stringFree reference fields.
hdr_client_key, hdr_client_source, hdr_client_valuestringFilter by your system’s identifiers.
legacy_entity_categorystringLegacy category.
exclude_account_manager_linkedbooleanExclude 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.

Last updated on