> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Folders

In our Accounting API:

* A **folder** represents **one legal entity**.
* Each folder contains isolated accounting data.

The **multi-folder feature** allows a single connection to access and manage **multiple folders/entities** (this is typically useful for accountants).

**How It Works**

1. **Regular Mode** (Single-Folder)
   * Enabled by default — no setup needed.
   * A connection is linked to **one** folder (selected during connector activation).
   * The `folder_id` query parameter is ignored.
   * All API calls operate on this single folder.
2. **Multi-Folder Mode**
   * Allows a consumer to manage **multiple legal entities**.
   * Each API request **MUST include** a `folder_id` **query parameter** to specify the target folder (except for the GET folders endpoint).
   * This ensures full data segregation and prevents cross-entity issues.

**Activation & Configuration**

**To enable multi-folder mode** in a connector (if supported):

<img src="https://mintcdn.com/chift/4WA4OE8CSnc0UowZ/images/SCR-20251002-jbhj.png?fit=max&auto=format&n=4WA4OE8CSnc0UowZ&q=85&s=cc31911547e20ae22d51c4d3d60bb39f" alt="SCR 20251002 Jbhj Pn" width="1284" height="128" data-path="images/SCR-20251002-jbhj.png" />

1. **Uncheck the first checkbox** — usually labeled  *“Let the user specify the folder during activation”*.

   **Once unchecked:**

   * The connection is automatically granted access to **all folders** the end user has permission to access.
   * You fully control **folder switching** from your interface, rather than relying on Chift to enforce folder restrictions.
2. **The second checkbox** (if present) is **optional** and used only by certain connectors (e.g., MyUnisoft) to allow users to **select folders during activation**.
   * This selection is **purely UI-level**; it does **not actually restrict access** if multi-folder is enabled.
   * However, Chift will **automatically block API calls** to folders that were not selected.

**Important Notes**

* **Not all connectors support multi-folder.** Check the connector's documentation page to confirm compatibility.
* **Your implementation must support both modes** (single and multi-folder) for full compatibility.
* **Additional dev work is required** to integrate multi-folder support. (See implementation section below.)

**Implementation Guide**

* Retrieve Available Folders

  Use `GET /folders` to list all folders linked to the connection. Each one represents a legal entity.
* Map Folder IDs Internally

  Create a mapping between each `folder_id` and its corresponding legal entity in your system. When a user selects “Company X,” your API calls should use its `folder_id`.
* One Folder = One Legal Entity

  Do **not** merge data between folders or assume shared context. Each folder is fully isolated (chart of accounts, transactions, etc.).
