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

# List departments

Get the full list of all departments (shops) for the client with the corresponding {clientToken}.

Please keep in mind that {clientToken} for a department will never change, but department names and department numbers can be changed by an administrator.

We advise retrieving the department list on a frequent basis.

```json
{"openapi":"3.0.0","info":{"title":"SameSystem API V1","version":"1.1.3"},"servers":[{"url":"https://api.samesystem.com/api/v1/","description":""}],"paths":{"/{clientToken}/departments":{"get":{"tags":["Departments"],"summary":"List departments","description":"Get the full list of all departments (shops) for the client with the corresponding {clientToken}.\n\nPlease keep in mind that {clientToken} for a department will never change, but department names and department numbers can be changed by an administrator.\n\nWe advise retrieving the department list on a frequent basis.","operationId":"get-clientToken-departments","parameters":[{"name":"clientToken","in":"path","description":"Token in a form of \"c\\<clientId\\>\".","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"type":"object","properties":{"departments":{"$ref":"#/components/schemas/Department"}}}}}}}}}},"components":{"schemas":{"Department":{"title":"Department","required":["id","name"],"type":"object","properties":{"id":{"type":"number","description":"Internal unique identier"},"name":{"type":"string","description":"Name of the department"},"custom_id":{"type":"string","description":"Custom id/external department id."},"email":{"type":"string","description":"Email to the department"},"phone":{"type":"string","description":"Phone number to the department","nullable":true},"abbr":{"type":"string","description":"Abbreviated department name"},"salary_dpt_nr":{"type":"string","description":"Salary department number"},"salary_dpt_nr2":{"type":"string","description":"Salary department number (MLE)"},"address":{"type":"string","description":"Address of the department"},"postal_code":{"type":"string","description":"Postal code/zip code of the deparment"},"city":{"type":"string","description":"City of the department"},"fax":{"type":"string","nullable":true},"non_lendable":{"type":"boolean","description":"If true lendout is disabled to this department"},"manager":{"type":"object","properties":{"full_name":{"type":"string","description":"Name of the manager"},"wager_earner_no":{"type":"string","description":"Payroll number of the manager"}},"description":"Manager object"},"ctx_token":{"type":"string","description":"The complete ctx_token/clientToken for the department including both the c-part and the d-part to this department"},"dpt_no":{"type":"string","description":"Department number"},"inactive":{"type":"boolean","description":"Set to true if department has been deactivated."},"parent_shop_name":{"type":"string","description":"Name of the parent department","nullable":true},"group_name":{"type":"string","description":"Group name","nullable":true},"company_nr":{"type":"string","description":"Company number"},"cost_center":{"type":"string","description":"Cost center for this department"}},"description":"Department/shop information."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samesystem.dev/api-v1-reference/departments/list-departments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
