> 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/settings-advanced-minimum-staffing/apply-advanced-minimum-staffing-settings-for-the-department-shop-level.md).

# Apply Advanced Minimum Staffing settings for the department/shop-level

Advanced Minimum Staffing defines the minimum number of employees that must be on the floor in a given hour of a given weekday.

Settings exist on two levels. A client level applies to all departments by default. A department setting (this endpoint) can override this with its own list of Advanced Minimum Staffing settings.

Department settings will overwrite client settings.

```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}/settings/shop/advanced_minimum_staffing":{"put":{"tags":["Settings - Advanced Minimum Staffing"],"summary":"Apply Advanced Minimum Staffing settings for the department/shop-level","description":"Advanced Minimum Staffing defines the minimum number of employees that must be on the floor in a given hour of a given weekday. \n\nSettings exist on two levels. A client level applies to all departments by default. A department setting (this endpoint)  can override this with its own list of Advanced Minimum Staffing settings.\n\nDepartment settings will overwrite client settings.","operationId":"put-clientToken-settings-shop-advanced_minimum_staffing","parameters":[{"name":"clientToken","in":"path","description":"Token in a form of \"c\\<clientId\\>\".","required":true,"schema":{"type":"string"}},{"name":"shop_id","in":"query","description":"Specify the department id or external deparment id (using query parameter use_custom_id=1).","required":false,"schema":{"type":"string"}},{"name":"use_custom_id","in":"query","description":"Add 1 if you want to use external department id to find data for the department.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsAdvancedMinimumStaffing"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"unauthorized"},"description":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"not_found"},"description":{"type":"string"}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"string"}}}}}}}}}}}}},"components":{"schemas":{"SettingsAdvancedMinimumStaffing":{"title":"SettingsAdvancedMinimumStaffing","required":["periods"],"type":"object","properties":{"periods":{"type":"array","items":{"required":["start_date"],"type":"object","properties":{"start_date":{"type":"string","description":"Start date of period.","format":"date"},"end_date":{"type":"string","description":"Period end date. Is Optional. If set, it must not be before start_date. Can be null, omitted or set to \"\" for an open-ended period.","nullable":true},"values":{"type":"array","description":"List of hours requirements. Only listed weekday/hour combinations can carry an advanced value. Each (wday,hour) pair can only appear once per period.","items":{"type":"object","properties":{"wday":{"maximum":7,"minimum":1,"type":"integer","description":"ISO weekday (1=Monday...7=Sunday)"},"hour":{"maximum":23,"minimum":0,"type":"integer","description":"Hour"},"value":{"maximum":999,"minimum":0,"type":"integer","description":"Minimum number of employees."}}}}}}}}}}}}
```


---

# 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/settings-advanced-minimum-staffing/apply-advanced-minimum-staffing-settings-for-the-department-shop-level.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.
