KKonsol Developers
API referenceCompanies

List companies

GET
/integration/v1/companies

Lists the companies your integration key can reach.

Filter by enterprise with enterprise_id or enterprise_external_ref, or by contact_email. Search by name or registration number with q.

Authorization

integrationKey
headerAuthorizationBearer <token>

Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>. Konsol issues it.

Query Parameters

page?integer
Range1 <= value
Default1
limit?integer
Range1 <= value <= 100
Default20
q?string

Searches by name, folded to a normalized form: case, punctuation, diacritics and whitespace collapsed, with legal-form spellings such as Sdn. Bhd., S/B and Sendirian Berhad treated as equivalent. Every word in the query must match. Also matches business_reg_no as a case-insensitive substring. % and _ carry no wildcard meaning. 2–128 characters.

Length2 <= length <= 128
match?string

normalized (default) matches name folded as q describes. literal matches the raw values with a case-insensitive substring.

Default"normalized"
Value in"normalized""literal"
sort?string

Orders by a field, ascending, or descending with a - prefix. Ties break on id. Without it the list is in id order, or in updated_at order when you send updated_after. sort=updated_at leaves out changes from the last 30 seconds, as updated_after describes; sort=-updated_at does not.

Value in"created_at""-created_at""updated_at""-updated_at""name""-name""status""-status"
external_ref?string

Your identifier, matched exactly.

Match^\S(.*\S)?$
Length1 <= length <= 128
status?string
Value in"active""inactive"
enterprise_id?string
Formatuuid
enterprise_external_ref?string

Your identifier for it, matched exactly; none matching is an empty page.

Match^\S(.*\S)?$
Length1 <= length <= 128
business_reg_no?string
Lengthlength <= 12
contact_email?string

The contact's email, matched exactly, ignoring case.

Lengthlength <= 255
include_deleted?boolean

With true, deleted records are returned too, with deleted_at set. Use it with sort=updated_at to sync deletions.

Defaultfalse
updated_after?string

Returns records changed after this time, in sort=updated_at order. Any other sort, including -updated_at, is a 400. Send a record's updated_at exactly as you received it. With updated_after or sort=updated_at, changes from the last 30 seconds are left out until they are saved, so a sync never skips one.

Formatdate-time
updated_after_id?string

Sent with updated_after, from the same record; without updated_after it is a 400. Among records changed at exactly updated_after, returns only those after this id.

Formatuuid

Response Body

A page of companies

application/json
  1. response
data*array<>
page*integer
Range1 <= value
limit*integer
Range1 <= value <= 100
total_count*integer
Range0 <= value
total_is_capped*boolean
total_pages*integer
Range0 <= value
has_more*boolean
Example Request
curl -X GET 'https://api.konsol.my/integration/v1/companies'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "external_ref": "ACQ-MBB",      "enterprise_id": "2dbe425a-b3bc-4170-8bae-9e5391aafea6",      "name": "string",      "status": "active",      "business_reg_no": "string",      "tax_id_no": "string",      "sst_no": "string",      "contact": {        "person": "string",        "phone": "string",        "email": "user@example.com"      },      "address": {        "line1": "string",        "line2": "string",        "city": "string",        "postcode": "string",        "state": "MY-01",        "country": "MY"      },      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "deleted_at": "2019-08-24T14:15:22Z"    }  ],  "page": 1,  "limit": 1,  "total_count": 0,  "total_is_capped": true,  "total_pages": 0,  "has_more": true}