# Faculteiten/opleidingen

Faculteiten en opleidingen (organisaties) zijn nodig voor een goede koppeling, indien deze niet aanwezig zijn kunnen cursussen en docenten niet worden toegevoegd omdat deze altijd gekoppeld zijn aan een organisatie.&#x20;

Bij Evalytics maken we gebruik van een boomstructuur. Dit betekent dat organisaties onder elkaar gekoppeld zijn. <br>

![Demo instelling heeft twee faculteiten. Onder de faculteiten zijn opleidingen gekoppeld.](https://lh3.googleusercontent.com/A7sGB2YfAEw1yWYvd0l0QyPDabyk1VrRyMvbBAcINa0K8rmFD7knVYp-ZiE0eYatgdwp6B9CZ30K3mpUvXTrnqseuhAEIg_9Bzk1huvPhBnW4_FtectBWyBgnyI6nrMpdeS5PAQ)

{% hint style="info" %}
Organisaties ondersteunen nog geen id naar externalId conversie zoals staat beschreven in het hoofdstuk ‘Algemene Query Parameters’
{% endhint %}

## Organisatie ophalen (lijst)

<mark style="color:blue;">`GET`</mark> `https://api-portal.evalytics.nl/organisation`

Organisaties kunnen worden gevonden op basis van naam, code, id of externId. De zoekresultaten tonen altijd het interne id van de opleiding. Dit id heb je nodig wanneer je een object binnen een organisatie wilt zoeken of toevoegen. Om alle opleidingen te zien, moet de gebruiker/api-key wel gekoppeld zijn aan alle opleidingen.&#x20;

#### Query Parameters

| Name       | Type    | Description                                                     |
| ---------- | ------- | --------------------------------------------------------------- |
| q          | string  | Zoek naar een organisatie                                       |
| parent     | integer | Zoek naar child organisaties die aan de 'parent' gekoppeld zijn |
| code       | string  | Zoek op organisatie code                                        |
| type       | string  | Zoek op type (faculty / department)                             |
| externalId | string  | Zoek op extern id                                               |

{% tabs %}
{% tab title="200 " %}

```
{
  "metadata": {
    "timestamp": "2021-03-25T20:32:13.118Z",
    "resultSet": {
      "count": 2,
      "limit": 30
    }
  },
  "results": [
    {
      "deleted": false,
      "createdBy": "3",
      "modifiedBy": null,
      "parent": 1,
      "topOrganisation": 1,
      "name": "Faculteit A",
      "code": "FA",
      "type": "faculty",
      "availableModules": null,
      "modules": null,
      "externalId": null,
      "id": 2,
      "createdAt": "2020-04-12T19:12:42.000Z",
      "updatedAt": "2020-04-12T19:12:42.000Z"
    },
    {
      "deleted": false,
      "createdBy": "3",
      "modifiedBy": "3",
      "parent": 2,
      "topOrganisation": 1,
      "name": "Opleiding B",
      "code": "ob",
      "type": "department",
      "availableModules": null,
      "modules": null,
      "externalId": "Example",
      "id": 3,
      "createdAt": "2020-04-12T19:12:58.000Z",
      "updatedAt": "2021-01-14T11:07:02.000Z"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Organisatie ophalen (item)

<mark style="color:blue;">`GET`</mark> `https://api-portal.evalytics.nl/organisation/:id`

Je kunt een enkele organisatie ophalen door het id van de organisatie mee te geven. De onderliggende organisaties (children) worden ook meegestuurd in de response.

#### Path Parameters

| Name | Type    | Description           |
| ---- | ------- | --------------------- |
| id   | integer | id van de organisatie |

{% tabs %}
{% tab title="200 " %}

```
{
  "notificationSettings": [],
  "deleted": false,
  "createdBy": "3",
  "modifiedBy": null,
  "parent": 1,
  "topOrganisation": 418,
  "name": "Faculteit A",
  "code": "FA",
  "type": "faculty",
  "availableModules": null,
  "modules": null,
  "externalId": "example",
  "id": 2,
  "createdAt": "2020-04-12T19:12:58.000Z",
  "updatedAt": "2021-01-14T11:07:02.000Z",
  "hasChildren": true,
  "children": [
    {
      "deleted": false,
      "createdBy": "3",
      "modifiedBy": "3",
      "parent": 2,
      "topOrganisation": 1,
      "name": "Opleiding B",
      "code": "ob",
      "type": "department",
      "availableModules": null,
      "modules": null,
      "externalId": "Example",
      "id": 3,
      "createdAt": "2020-04-12T19:12:58.000Z",
      "updatedAt": "2021-01-14T11:07:02.000Z"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Organisatieboom ophalen (lijst)

<mark style="color:blue;">`GET`</mark> `https://api-portal.evalytics.nl/getOrganisationTree`

Haalt een lijst op met alle opleidingen die aan de hoofdorganisatie gekoppeld zijn. Bij de **GET /organisations** krijg je alleen een lijst terug met de opleidingen waar de gebruiker/api-key aan gekoppeld is. Bij dit endpoint hoeft de gebruiker/api-key niet gekoppeld te zijn aan alle organisaties.

#### Path Parameters

| Name | Type   | Description         |
| ---- | ------ | ------------------- |
| q    | string | Zoek op organisatie |

{% tabs %}
{% tab title="200 " %}

```
[
  {
    "deleted": false,
    "createdBy": "3",
    "modifiedBy": null,
    "parent": 123,
    "topOrganisation": 123,
    "name": "Example 1",
    "code": null,
    "type": "department",
    "availableModules": null,
    "modules": null,
    "externalId": null,
    "importLock": false,
    "id": 124,
    "createdAt": "2020-12-03T10:58:46.000Z",
    "updatedAt": "2020-12-03T10:58:46.000Z"
  },
  {
    "deleted": false,
    "createdBy": "3",
    "modifiedBy": null,
    "parent": 123,
    "topOrganisation": 123,
    "name": "Example 2",
    "code": null,
    "type": "department",
    "availableModules": null,
    "modules": null,
    "externalId": null,
    "importLock": false,
    "id": 125,
    "createdAt": "2020-12-03T10:58:46.000Z",
    "updatedAt": "2020-12-03T10:58:46.000Z"
  }
]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.evalytics.nl/onderdelen/faculteiten-opleidingen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
