---
title: "List Departements as a tree"
method: GET
path: "/api/v3/departments/tree"
tags: ["Departments"]
deprecated: true
---

# List Departements as a tree

`GET /api/v3/departments/tree`

> **Deprecated.**

List all departments as a tree.
Remark: first node is always empty and represents the starting point 
of the tree as multiple departments might be set to the highest level.

## Response `200`

OK

- object
  - `data` object
    - `node` unknown
    - `children` DepartmentTreeNode[], nullable — Max depth: 9 levels
      - `node` object
        - `id` integer — Department id
        - `name` string — Department name
        - `url` string, uri — Department URL
      - `children` object[], nullable — List of DepartmentTreeNode objects

## Other responses

- `400` — Generique error message response
- `401` — Generique error message response
- `500` — Internal Server Error

---

[API](https://skmtc.net/luccasoftware/apis/lucca-expenses.md) · [All operations](https://skmtc.net/luccasoftware/apis/lucca-expenses/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/luccasoftware/lucca-expenses/revisions/110f9897756c/schema)
