Storeden Developers

Filters API

Current version: v1.1

Get list of filters

GET
/filters/list.json
Get list of filters Request

$storeden = new Storeden\Storeden($config);
$filters_list = $storeden->get('/filters/list.json');
					
Get list of filters Response

[
    {
        "_id": {
            "$id": "57e14a8216f46aba048b457d"
        },
        "key": "colore",
        "values": [
            "rosso",
            "blu",
            "verde"
        ],
        "images": [
            "https://...",
            "https://..."
        ],
        "categories": [
            "120383",
            "130286",
            "113306"
        ],
		"feedActive": true,
        "feedLabel": "color",
        "feedValues": [
            "red",
            "blue",
			"green"
        ],
        "descriptions": [
            "",
            ""
        ]
    },
    ...
]
					

Create filter

Check filters list to check if filter_key already exists to avoid duplicated filters.

POST
/filters/filter.json
filter_key required (string) [a-z] carachters, no whitespace, - and _ allowed
filter_values required (array) couples [index]:[value]
Create filter Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['filter_key'] = 'keyboard-material';
$payload['filter_values'] = [0 => 'rosewood', 1 => 'maple'];

$result = $storeden->get('/filters/filter.json', $payload);
						
Create filter Response

{
    "$id": "5eaa931e16f46a9009def81b"
}