Create Request Tag Rule
To create a rule for the previous example, you can use the following endpoint:
- Shell
- JavaScript
- Ruby
- Python
- PHP
- Java
- C#
This request will replace existing rules for the user_segment:segment1
key-value pair with the single boost rule provided in the request body.
info
The above command(s) return a 200 Success response on success.
#
HTTP RequestPATCH https://ac.cnstrc.com/refined_tags/[tag_name]/[tag_value]?key=[key]
#
Response format#
URL ParametersParameter | Description |
---|---|
tag_name | The name of the tag you'd like to retrieve rules for. |
tag_value | The value of the tag you'd like to retrieve rules for. |
#
Query JSON ParametersParameter | Required? | Description |
---|---|---|
boost_rules | Yes | List of boost rules that will be applied for matching requests. |
Each boost_rule
object has the following structure:
Parameter | Required? | Description |
---|---|---|
rule | Yes | An object with a boost field and a filters field, documented below. |
active | No | Your rule can be defined but set to inactive if you wish by setting the active field to false. |
automatically_generated | No | Rules that are generated automatically by Constructor are flagged with true. |
start_time | No | Start time when the rule should be enabled. |
end_time | No | End time when the rule should be disabled. |
Each rule
object has the following structure:
Parameter | Required? | Description |
---|---|---|
boost | Yes | A value in the range of -1 to +1 representing the standard deviations by which matching items' ranking score should be decreased or increased. |
filters | Yes | Indicates the properties of the products to which this boost should be applied. For more examples of filter expressions, refer to Retrieve searchandizing rules. |