List departments
Query parameters
organization_id integer | Organization to act on. Required when the API key can reach more than one organization; optional - and defaulted - when it can reach exactly one. |
page integer | 1-based page number. |
per_page integer | Items per page. The engine caps this at 200. |
Responses
200Departments. object401The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
curl -X GET https://api.indpayroll.com/v1/departments \
-H "Authorization: Bearer $INDP_API_KEY"{
"data": [
{
"id": 7,
"organization_id": 42,
"name": "Engineering",
"code": "ENG",
"external_id": "dept-eng",
"head_employee_id": "ext:emp-1001",
"active": true
},
{
"id": 8,
"organization_id": 42,
"name": "Sales",
"code": "SLS",
"external_id": "dept-sls",
"head_employee_id": null,
"active": true
}
],
"meta": {
"page": 1,
"per_page": 50,
"total": 2,
"total_pages": 1
}
}