1. Home
  2. Developer
  3. Interface (API) for querying departments

Interface (API) for querying departments

onboard departments can be queried via a JSON interface.

Endpoint API

The endpoint can be reached through the following URLs:

https://<company>.onboard.org/exports/v2/departments.json

In addition, there are separate endpoints for each language. The language can be specified in ISO 639-1 format (e.g., “de,” “it,” or “en”). The endpoint can be reached through the following URLs:

https://<company>.onboard.org/<language>/exports/v2/departments.json

https://<company>.onboard.org/de/exports/v2/departments.json
https://<company>.onboard.org/it/exports/v2/departments.json
https://<company>.onboard.org/en/exports/v2/departments.json
...

The exact API endpoint with tracking parameters is available upon request from our support team.

Some fields are translatable (e.g., “name”). If no language is specified in the URL, all possible translations are returned (e.g., “name_de”, “name_en”). If a language is specified, only the selected language is returned.

Parameters

  • visible_on_career_site: displays only the departments visible on the career page. The value can be true or false.
  • only_roots: displays only the top-level department. The value can be true or false.
  • subtree_id: displays only the overlapping department and its subdivisions.
  • descendants_of_id: displays only the subdivisions of the top-level department.
  • children_of_id: displays only the direct subdivisions of the overlapping department.

Example:

https://<company>.onboard.org/de/exports/v2/departments?show_on_career_site=true

Content

The interface contains all the necessary information about the department:

  • id: unique ID
  • name: name of the department
  • depth: level or depth in the hierarchy (starts at 0)
  • subtree_ids: list of IDs of all departments contained
  • ancestor_id: ID of the main department

Example of interface response:

[
  {
    "id": 123,
    "name": "Marketing",
    "depth": 0,
    "subtree_ids": [123, 456],
    "ancestor_id": null
  },
  {
    "id": 456,
    "name": "Online-Marketing",
    "depth": 1,
    "subtree_ids": [456],
    "ancestor_id": 123
  }
]
Updated on 16/02/2023
Was this article helpful?

Related Articles

Sie können die gesuchte Antwort nicht finden?
Kein Problem! Unser Support-Team hilft Ihnen gerne weiter.
Support-Team kontaktieren