Organization structure

Get Departments

GET
/departments

Returns a paginated list of departments. Each department includes its full parent hierarchy: organization → company → division → business unit → department.

Optional Filters:

  • organization-ids — limit to departments whose company belongs to these organizations (max 100)
  • company-ids — limit to departments belonging to these companies (max 100)
  • division-ids — limit to departments belonging to these divisions (max 100)
  • business-unit-ids — limit to departments belonging to these business units (max 100)

Multiple filters combine with AND logic; values within one parameter combine with OR.

Access control: Results are limited to departments belonging to companies your integration has access to. When organization-ids is supplied, only departments from organizations containing at least one accessible company are included. Inaccessible IDs in filter parameters are silently excluded; if none match, an empty list is returned.

Error Details:

  • 400 Bad Request — more than 100 IDs supplied to any filter parameter, or page-size outside 1–500
X-API-KEY<token>

Your API key.

In: header

Query Parameters

api-version*string

API version

Default"3.0"
Value in"3.0"
page-number?integer

Page number (1-based). Defaults to 1 if not specified.

Formatint32
Range1 <= value <= 2147483647
page-size?integer

Number of items per page. Defaults to 100 if not specified. Maximum 500.

Formatint32
Range1 <= value <= 500
organization-ids?array<>

Optional. Return only departments whose company belongs to these organizations. Maximum 100 IDs per request.

Itemsitems <= 100
company-ids?array<>

Optional. Return only departments that belong to these companies. Maximum 100 IDs per request.

Itemsitems <= 100
division-ids?array<>

Optional. Return only departments that belong to these divisions. Maximum 100 IDs per request.

Itemsitems <= 100
business-unit-ids?array<>

Optional. Return only departments that belong to these business units. Maximum 100 IDs per request.

Itemsitems <= 100

Response Body

curl -X GET "https://external-app-prod.netchexonline.net/departments?api-version=3.0"
{
  "pageNumber": 0,
  "pageSize": 0,
  "totalItemsCount": 0,
  "items": [
    {
      "id": 0,
      "name": "string",
      "code": "string",
      "businessUnitId": 0,
      "businessUnitName": "string",
      "businessUnitCode": "string",
      "divisionId": 0,
      "divisionName": "string",
      "divisionCode": "string",
      "companyId": 0,
      "companyName": "string",
      "companyCode": "string",
      "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
      "organizationName": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}