Batch Add Rules

curl -X PUT -H "Content-Type: application/json" \
-d '{
"section": "Products",
"rules": [
{
"query": "dog leash",
"position": 2,
"id": "very_cool_dog_leash_id",
"allow_fuzzy_matching": true
},
{ "query": "dog leash",
"position": 3,
"id": "almost_as_cool_dog_leash_id",
"allow_fuzzy_matching": true
},
{ "query": "cat leash",
"position": 1,
"id": "adorable_cat_leash_id",
"allow_fuzzy_matching": true
}
]
}' \
-u"[your token]:" \
"https://ac.cnstrc.com/v1/searchandized_queries/leashes?key=[your API key]"
info

The above command returns a 204 Success response on success. For simplicity sake, a 204 Success response will be returned even if some or all items already exist.

HTTP Request#

PUT https://ac.cnstrc.com/v1/searchandized_queries/[query]?key=[your API key]

JSON Parameters#

ParameterRequired?Description
sectionYesThe section the searchandizing rules will be applied within (typically Products).
rulesYesA list of searchandizing rules with the following attributes:
queryYesThe query to which a product is being searchandized.
positionYesThe position a product should be added at. (use 0 to blacklist the item)
idYesThe id for the product being searchandized.
allow_fuzzy_matchingNoDefaults to true. Disable or enable fuzzy matching.