---
title: "Get agency client suggestions"
method: POST
path: "/agency-group/{agency_group_id}/client-suggestions"
tags: ["Global Search"]
---

# Get agency client suggestions

`POST /agency-group/{agency_group_id}/client-suggestions`

## Request

- Base URL: `http://localhost:3010/v1`
- URL: `http://localhost:3010/v1/agency-group/{agency_group_id}/client-suggestions`
- Auth: HTTP basic

## Request body

- object
  - `search_term` string, required
  - `size` integer
  - `payload` object[], required
    - `index_type` 'client_organisation' | 'client_site' | 'client_ward', required
    - `filters` object
      - `agency_id` string, required
      - `parent_id` string
    - `fields` object[]
      - `name` 'agency_client_reference' | 'client_reference' | 'client_name'
      - `boost` number

## Response `200`

Retrieve specific agency global search client suggestions from elastic

- object
  - `results` object[], required
    - `index_type` string, required
    - `data` object[], required
      - `_id` string, required
      - `agency_id` string, required
      - `agency_group_id` string, required
      - `contact_numbers` string[]
      - `emails` string[]
      - `client_id` string, required
      - `client_type` 'site' | 'ward' | 'organisation', required
      - `agency_client_reference` string
      - `client_reference` string
      - `client_name` string, required
      - `parent_id` string
      - `parent_name` string

## Other responses

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