> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/departments/_list.md).

# \_list

Returns a list of Departments and their details.

### Parameters

#### fields

An array of extra fields from the Department data which can be requested and returned:

* email
* meta
* users
* last\_edited
* cdate
* assets
* customers

The id and names of Departments are always returned regardless of request via this parameter.

#### last\_edited

A filter which removes any Departments which have been last edited before the chosen date. (e.g a Departments which was last edited on 2025-03-29 07:38:00 will not be included if "last\_edited" is 2025-04-17 15:00:00)

### Example

```
FM_api('Departments_list',[
    'fields'=>'["id","name","users","assets","last_edited"]',
    'last_edited'=>'2025-07-20 00:00:00'
    ]
);
```

#### On Success

```
[{"id":"427100","name":"Test1","users":null,"assets":"556200","last_edited":"2025-07-20 17:29:57"},{"id":"427101","name":"Test2","users":"92447","assets":null,"last_edited":"2025-07-20 17:29:53"}]
```
