Skip to content

Get departments by company

Request

Fetches a list of departments associated with the specified company ID. A valid authorization token is required.

Security
Bearer
Query
companyIdinteger, (int32)required

The unique identifier for the company used to filter departments.

curl -i -X GET \
  'https://developer.sustainabilitymaster.ai/_mock/openapi/api/EnterpriseTables/DepartmentByCompany?companyId=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Successfully retrieved the list of departments filtered by company

Bodyapplication/json
Array [
idinteger, (int32)

Unique identifier for the department entry.

Example:1
companyIdinteger, (int32)

ID of the company to which this department belongs.

Example:101
companyNamestring or null

The name of the company.

Example:"Tech Innovations Ltd."
departmentIdinteger, (int32)

ID of the department.

Example:501
departmentNamestring or null

The name of the department.

Example:"Software Engineering"
departmentNumberstring or null

Unique department number or code.

Example:"SE-501"
leaderstring or null

Name of the department leader.

Example:"John Doe"
]
Response
[ { "id": 1, "companyId": 101, "companyName": "Tech Innovations Ltd.", "departmentId": 501, "departmentName": "Software Engineering", "departmentNumber": "SE-501", "leader": "John Doe" } ]