Skip to navigation

Create a filter option

View as Markdown

Create a filter option within a custom filter. The image is optional. Send it as base64 in image, or upload the file to POST /api/core/private/v1alpha/files/ first and send the returned URL in imageUrl; only a URL from that endpoint is accepted, and the file is copied into the option. A file in image wins over imageUrl, and a value in either wins over null in the other; null alone leaves the option without an image

Authentication

AuthorizationToken

Your API key, sent as Authorization: Token <your API key>

Path parameters

filterIdstringRequiredformat: "uuid"
ID of the filter where the option will be created

Request

This endpoint expects an object.
namestringRequired1-150 characters
orderintegerOptional>=0
imagestring or nullOptionalformat: "binary"
imageUrlstring or nullOptionalformat: "uri">=1 character

Response

Details of the filter option
hrefstringRead-only
idstringformat: "uuid"
namestring
orderinteger>=0
slugstring
imagestring or null
imageUrlstring or null
filterstringformat: "uuid"
parentOptionIdstringformat: "uuid"
parentOptionSlugstring
hasResultsboolean or nullOptional

Errors

400
Bad Request Error
403
Forbidden Error
429
Too Many Requests Error