---
title: "Advanced Search Report on finding Booked Candidates for a shift"
method: POST
path: "/agency/{agency_id}/advanced-search-report/booked-candidates"
tags: ["Advanced Search Report Booked Candidates"]
---

# Advanced Search Report on finding Booked Candidates for a shift

`POST /agency/{agency_id}/advanced-search-report/booked-candidates`

## Request

- Base URL: `http://localhost:3010/v1`
- URL: `http://localhost:3010/v1/agency/{agency_id}/advanced-search-report/booked-candidates`
- Auth: HTTP basic

## Request body

- BookedCandidatesReportAdvancedSearchQuery
  - `site_id` string, required
  - `ward_id` string
  - `job_title_id` string, required
  - `min_shift_date_booked` string, date-time: The query param to specify the minimum date for the range to be matched on start_date field, useful for doing 'shift in x days' queries
  - `max_shift_date_booked` string, date-time: The query param to specify the maximum date for the range to be matched on start_date field, useful for doing 'shift in x days' queries
  - `shift_start_date` string, date-time, required: The query param to specify the start date of the current shift, used to match override compliance
  - `compliance_contract_id` string

## Response `200`

list of booked candidates based on search criteria

- BookedCandidatesReportSearchResult[]
  - `agency_id` string, required
  - `candidate_id` string, required
  - `candidate_full_name` string, required
  - `booking_count` number, required
  - `last_shift_date` string, date-time, required
  - `is_job_title_match` boolean, required
  - `compliance_status` 'NO_COMPLIANCE_CONTRACT_SET' | 'NOT_YET_COMPUTED' | 'NOT_APPLICABLE' | 'INCOMPLIANT' | 'COMPLIANT', required
  - `exclusion_status` 'NOT_EXCLUDED' | 'EXCLUDED' | 'UNKNOWN', required

## Other responses

- `204`: No content
- `400`: Validation Error. Usually caused by a missing or invalid parameter.
- `401`: Authorization Error. Thrown if the user does not have access to resource.
- `403`: Permission denied error
- `default`: Server error occurred

---

[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)
