An organisation in KalHR holds one or more companies, and each employee works for one of them. Payroll is run per
company, so you need a company's id to list its payroll runs, and you can use it to filter employees, departments
and leave.
List companies
GET/v1/company/listKey needs Employee Management: ViewReturns every company in your organisation, in one page. It takes no parameters. Deleted companies are left out.
curl "https://api.kalhr.com/v1/company/list" \
-H "Authorization: Bearer $KALHR_API_KEY"Response
{
"isSuccessful": true,
"code": "00",
"message": "Success",
"data": {
"data": [
{
"id": "1f2e3d4c-5b6a-4987-8a6b-5c4d3e2f1a0b",
"name": "Acme Nigeria Ltd",
"address": [
{ "id": "5e4d3c2b-1a0f-4e9d-8c7b-6a5f4e3d2c1b", "name": "12 Admiralty Way, Lekki, Lagos" },
{ "id": "6f5e4d3c-2b1a-4f0e-9d8c-7b6a5f4e3d2c", "name": "Plot 4, Central Business District, Abuja" }
],
"logo": "https://…/acme-logo.png",
"primaryColor": "#6544C5",
"secondaryColor": "#151314"
}
],
"pageNumber": 1,
"pageSize": 2,
"totalRecords": 2,
"totalPages": 1
}
}
| Field | Type | Description |
|---|---|---|
id | uuid | The company's id. Use it as CompanyId or Companies in other endpoints. |
name | string | The company's name |
address | array | Its office locations: each id and name (the address). An employee's officeLocationId is one of these. |
logo | string | Link to the company's logo, when it has one |
primaryColor, secondaryColor | string | Brand colours set in KalHR, as hex |
All companies come in one page: pageSize is the number returned, and totalPages is 1.