# Suggestion

Provider API v0.6.5 · 1 operation
Kilde: https://plas.redia.dk/provider/v0.6.5/suggestion/

Ingen beskrivelse i specifikationen.

## Get Suggestions

`GET` `/suggestions` · `GetSuggestions`

Get search suggestions for `/work/search`.

The `query` parameter should be the same as for `/work/search`.  
and the `filter` parameter should be the same as for `/work/search`, but some search filter may not be working in suggestions, see which ones by calling configuration. 

The response will be an array of suggestions of the type specified in the `types` parameter, and will be ordered by relevance.

Filters:

These only affects the suggestions of the type `work`:
- plas.audience.literal
- plas.audience.ageRange 
- plas.audience.ageGroup
- plas.mediaTypes
- plas.language
- plas.subjects
- plas.genres
- plas.forms
- plas.agent


### Parametre

- `query` (i `query`, `string`, valgfri) — The suggestion (search) query.
- `size` (i `query`, `integer`, valgfri) — Suggestion size (default 10).
- `types` (i `query`, [`array of SuggestionParameterTypeEnum`](https://plas.redia.dk/provider/v0.6.5/schemas/#SuggestionParameterTypeEnum), valgfri) — List of suggestion types allowed in result.
- `filter` (i `query`, `object`, valgfri) — The suggestion (search) filter.

The possible keys in this map are the filters defined in the `/configuration(/search)` endpoint (field: (search->)suggestions->>available) and are a list of strings of the `SearchFilterType` type.


Fælles for operationerne: `ui_language`, `version`. [Se den fælles kontrakt på versionssiden.](https://plas.redia.dk/provider/v0.6.5/)

### Svar

- `200` [`GetSuggestionsResponseBody`](https://plas.redia.dk/provider/v0.6.5/schemas/#GetSuggestionsResponseBody) — Success

Fejlsvar: 400 · 401 · 404 — [Se den fælles kontrakt på versionssiden.](https://plas.redia.dk/provider/v0.6.5/)
