Retrieve Rules

curl -X GET -H "Content-Type: application/json" \
-u"[your token]:" \
"https://ac.cnstrc.com/refined_filters/group_id/dog%20food?key=[your index key]&section=[section]&response_section=facets"
curl -X GET -H "Content-Type: application/json" \
-u"[your token]:" \
"https://ac.cnstrc.com/refined_filters/group_id?key=[your index key]&section=Products&response_section=facets"
info

The above command returns a 200 Success response on success.

HTTP Requests#

GET https://ac.cnstrc.com/refined_filters/[filter_name]/[filter_value]?key=[your index key]&section=[section]&response_section=facets

GET https://ac.cnstrc.com/refined_filters/[filter_name]?key=[your index key]&section=[section]&response_section=facets

Response format#

{
"refined_filters": [
{
"id": 10111,
"filter_name": "group_id",
"filter_value": "dog food",
"allow_automatic_rules": false,
"blacklist_rules": [
{
"id": 1,
"active": true,
"automatically_generated": false,
"target": "facet_group",
"facet_group_name": null,
"rule": { "name": "Color" },
"rule_type": "BLACKLIST",
"created_at": "2020-04-07T13:45:42",
"updated_at": null,
"start_time": null,
"end_time": null
}
],
"slot_rules": [
{
"id": 2,
"active": true,
"automatically_generated": false,
"target": "facet_option",
"facet_group_name": "Brand",
"rule": { "name": "Fido", "position": 1 },
"rule_type": "SLOT",
"created_at": "2020-04-07T13:45:42",
"updated_at": null,
"start_time": "2020-04-07T13:45:42",
"end_time": "2020-04-17T13:45:42"
}
]
}
],
"total_count": 1
}

URL Parameters#

ParameterDescription
filter_nameThe name of the facet you'd like to retrieve facet configuration rules for.
filter_valueThe value of the facet you'd like to retrieve facet configuration rules for.

Query Parameters#

ParameterRequired?Description
keyYesThe index you'd like to to retrieve results from.
sectionYesThe index section you'd like to retrieve results from (typically Products).
num_results_per_pageNoThe number of rules to return. Defaults to 100.
pageNoThe page of results to return. Defaults to 1.
response_sectionNoThe response section you'll like to retrieve rules for (typically facets for facet configurations)
sort_byNoSort by specific attributes (i.e. id, created_at, updated_at)
sort_orderNoSort in ascending or descending order.