---
title: "Get agencies with shifts for a given site and all its wards"
method: POST
path: "/advanced-search-report/agencies-with-shifts"
tags: ["Advanced Search Report"]
---

# Get agencies with shifts for a given site and all its wards

`POST /advanced-search-report/agencies-with-shifts`

## Request

- Base URL: `http://localhost:3010/v1`
- URL: `http://localhost:3010/v1/advanced-search-report/agencies-with-shifts`
- Auth: HTTP basic

## Headers

- `Authorization` string, string, required
- `Context` string, string, required
- `Accept` 'application/json', required
- `X-Accept-Timezone` string

## Request body

- object
  - `site_id` string, required: Site ID to search for shifts
  - `min_shift_end_date` string, date-time, required: Minimum end date for shifts
  - `status_code` string[], required: Array of status codes to filter shifts

## Response `200`

List of agencies with shifts for the given site

- object[]
  - `agency_id` string, required: Agency ID
  - `agency_name` string, required: Agency name

## Other responses

- `204`: No content
- `400`: Validation Error. Usually caused by a missing or invalid parameter.
- `401`: Failed to authenticate the user making the request
- `403`: Permission denied error
- `default`: unexpected error

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) - [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/revisions/1f079f6b65f5?raw)
