Skip to content

getFilters.v1

POST
/shopgate.catalog.getFilters.v1

This pipeline retrieves the possible filters, for a specific category or searchPhrase. Only one of both filter methods can be used at once.

Media typeapplication/json
object
categoryId

The categoryId, but only “flat”, it will not “dive into” subcategories

string
searchPhrase

A search phrase to search for, not compatible with categoryId, use a category-filter, if you want to search inside categories

string
filters

The key is the filterId or name of filter, like categories, manufacturer or other attributes/options/properties like “Größe”. The value has to be an object with a values key, that holds an array of strings (the “id” from the filters-endpoint) or minimum and/or maximum integer values. If the filters object (from the filters-endpoint) delivers a source too, you have to send it too. For categories you have to give the content of the id property, which is the name/path of the category, not the category id itself.

object
key
additional properties
object
minimum

The minimum value for this filter, can not be combined with values.

integer format: int32
maximum

The maximum value for this filter, can not be combined with values.

integer format: int32
values
Array<string>
source

The value of the source property from the filters endpoint

string
Examplegenerated
{
"categoryId": "example",
"searchPhrase": "example",
"filters": {
"additionalProperty": {
"minimum": 1,
"maximum": 1,
"values": [
"example"
],
"source": "example"
}
}
}

Successful response.

Media typeapplication/json
object
output
required
object
filters
Array<object>
object
id
required

The id (or name) of this filter

string
label
required

The label of the filter that is showed to the user

string
type
required

If the type is select, a range will be displayed as a slider with a minimum and a maximum value. If it is multiselect, the customer will have different options to select from and the maximum property limits the number of selectable options for this filter. A value of one for this means that this will be a singleselect.

string
Allowed values: range multiselect
source

The source this filter was generated from, please send it with your values array, when filtering

string
Allowed values: options properties attributes categories manufacturer
minimum

Only used with type range to provide the selectable miminum value for this filter.

integer format: int32
maximum

Used with type range to provide the selectable maximum value for this filter. With type multiselect, this gives the number of selectable values.

integer format: int32
values

The selectable values if type is multiselect

Array<object>
object
id

The id of this value

string
label

The label that is showed to the customer

string
Example
{
"output": {
"filters": [
{
"id": "filter23",
"label": "Price range",
"type": "range",
"minimum": 42,
"maximum": 876
}
]
}
}

An internal error occurred.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: EUNKNOWN
message
string
Example
{
"error": {
"code": "EUNKNOWN",
"message": "An internal error occurred."
}
}