Skip to main content

Company API

Endpoints for company structure, organization hierarchy, and company-wide overviews.

Get Company Structure Details

Returns a single company structure node with its children, head employees, and member employees.

GET /company/structures/{id}/details

Response: 200 OK

{
"id": 1,
"title": "Engineering",
"description": "Engineering department",
"type": "Department",
"country": "US",
"timezone": "America/Los_Angeles",
"parent": null,
"heads": [],
"children": [],
"employees": [],
"employeeCount": 25,
"childCount": 4
}

Get Upcoming Approved Leaves

Returns the next 10 upcoming approved leaves across the company.

GET /company_overview/leaves/upcoming

Response: 200 OK

Get Company Structure Tree

Returns the company structure as a hierarchical tree.

GET /company_overview/company-structure

Response: 200 OK with nested company structure tree.

Get Manager Hierarchy

Returns the management hierarchy derived from supervisor relationships.

GET /company_overview/manager-hierarchy

Response: 200 OK with hierarchical manager tree.

Get Top Attendance

Returns the top 10 employees ranked by attendance hours over the last week.

GET /company_overview/top-attendance

Response: 200 OK