younifyd
Menu

Replace refined query

Replace refined query

PUT/v1/refined_queries/{refined_query_id}

Use it in a workflow

  1. Add a step and choose the Constructor connector.
  2. Pick the Replace refined query action (under Refined Queries).
  3. Fill in the fields below, then reference the result from later steps as {{replaceRefinedQuery.response.data}}.

Request

Path parameters

refined_query_idinteger (int32)required

Query parameters

response_sectionany

The section of the response to apply rules to, such as `results` or `facets`.

Default "results"

sectionstring

The section of the index to use. Defaults to `Products`.

cstring

The ID of the client and version that the request is coming from, such as `cio-js-2.90`.

Request body

Enter the body as JSON in the step's Body field.

slot_rulesarray<object>

The slotting rules attached to the refined query

request_filtersobject

Facet conditions for the rule to be applied.

request_tag_nameany

Request tag name to be used to activate this entity for, used only with `request_tag_value`.

request_tag_valuestring

Request tag value to be used to activate this entity for, used only with request_tag_name.

activeboolean

Indicates whether this rule is active or not.

start_timestring (date-time)

Date and time when the rule should be enabled.

end_timestring (date-time)

Date and time when the rule should be disabled.

campaign_idinteger
automatically_generatedboolean

Boolean to indicate if this rule is automatically generated or not.

ruleanyrequired

Parameters of the slot rule.

rule_typestring

One ofslot

whitelist_ruleoneOf

The whitelist rule attached to the refined query

blacklist_rulesarray<object>

The blacklist rules attached to the refined query

request_tag_nameany

Request tag name to be used to activate this entity for, used only with `request_tag_value`.

request_tag_valuestring

Request tag value to be used to activate this entity for, used only with request_tag_name.

activeboolean

Indicates whether this rule is active or not.

start_timestring (date-time)

Date and time when the rule should be enabled.

end_timestring (date-time)

Date and time when the rule should be disabled.

campaign_idinteger
automatically_generatedboolean

Boolean to indicate if this rule is automatically generated or not.

ruleanyrequired

Rule definition of the blacklist rule.

rule_typestring

One ofblacklist

boost_rulesarray<object>

The boost rules attached to the refined query. It is allowed to create maximum 50 manual and 50 automatic rules. The number of rules for each of the types includes both active and inactive rules

request_tag_nameany

Request tag name to be used to activate this entity for, used only with `request_tag_value`.

request_tag_valuestring

Request tag value to be used to activate this entity for, used only with request_tag_name.

activeboolean

Indicates whether this rule is active or not.

start_timestring (date-time)

Date and time when the rule should be enabled.

end_timestring (date-time)

Date and time when the rule should be disabled.

campaign_idinteger
automatically_generatedboolean

Boolean to indicate if this rule is automatically generated or not.

ruleanyrequired

Rule definition of the boost rule.

rule_typestring

One ofboost

content_rulesarray<object>

The content rules attached to the refined query

request_tag_nameany

Request tag name to be used to activate this entity for, used only with `request_tag_value`.

request_tag_valuestring

Request tag value to be used to activate this entity for, used only with request_tag_name.

activeboolean

Indicates whether this rule is active or not.

start_timestring (date-time)

Date and time when the rule should be enabled.

end_timestring (date-time)

Date and time when the rule should be disabled.

campaign_idinteger
automatically_generatedboolean

Boolean to indicate if this rule is automatically generated or not.

ruleanyrequired

Parameters of the content rule.

rule_typestring

One ofcontent

variation_slicing_ruleoneOf

The variation slicing rule attached to the refined query

filters_slot_rulesarray<object>

The filters slot rules attached to the refined query

request_tag_nameany

Request tag name to be used to activate this entity for, used only with `request_tag_value`.

request_tag_valuestring

Request tag value to be used to activate this entity for, used only with request_tag_name.

activeboolean

Indicates whether this rule is active or not.

start_timestring (date-time)

Date and time when the rule should be enabled.

end_timestring (date-time)

Date and time when the rule should be disabled.

campaign_idinteger
automatically_generatedboolean

Boolean to indicate if this rule is automatically generated or not.

ruleanyrequired

Parameters of the filters slot rule.

rule_typestring

One offilters_slot

face_out_variation_rulesarray<object>

The face out variation rules attached to the refined query

request_tag_nameany

Request tag name to be used to activate this entity for, used only with `request_tag_value`.

request_tag_valuestring

Request tag value to be used to activate this entity for, used only with request_tag_name.

activeboolean

Indicates whether this rule is active or not.

start_timestring (date-time)

Date and time when the rule should be enabled.

end_timestring (date-time)

Date and time when the rule should be disabled.

campaign_idinteger
automatically_generatedboolean

Boolean to indicate if this rule is automatically generated or not.

ruleanyrequired

Parameters of the face out variation rule.

rule_typestring

One offace_out_variation

querystringrequired
allow_automatic_rulesboolean

Specifies whether to allow automatic creation of rules

Default true

last_reviewed_atstring (date-time)

The date of the last review

last_reviewed_bystring

The user who last reviewed the refined query

next_review_atstring (date-time)

The date of the next review

json
{
  "query": "string",
  "slot_rules": [
    {
      "rule": null,
      "request_filters": {},
      "request_tag_name": null,
      "request_tag_value": "string",
      "active": false,
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "campaign_id": 0,
      "automatically_generated": false,
      "rule_type": "slot"
    }
  ],
  "whitelist_rule": null,
  "blacklist_rules": [
    {
      "rule": null,
      "request_tag_name": null,
      "request_tag_value": "string",
      "active": false,
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "campaign_id": 0,
      "automatically_generated": false,
      "rule_type": "blacklist"
    }
  ],
  "boost_rules": [
    {
      "rule": null,
      "request_tag_name": null,
      "request_tag_value": "string",
      "active": false,
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "campaign_id": 0,
      "automatically_generated": false,
      "rule_type": "boost"
    }
  ],
  "content_rules": [
    {
      "rule": null,
      "request_tag_name": null,
      "request_tag_value": "string",
      "active": false,
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "campaign_id": 0,
      "automatically_generated": false,
      "rule_type": "content"
    }
  ],
  "variation_slicing_rule": null,
  "filters_slot_rules": [
    {
      "rule": null,
      "request_tag_name": null,
      "request_tag_value": "string",
      "active": false,
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "campaign_id": 0,
      "automatically_generated": false,
      "rule_type": "filters_slot"
    }
  ],
  "face_out_variation_rules": [
    {
      "rule": null,
      "request_tag_name": null,
      "request_tag_value": "string",
      "active": false,
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "campaign_id": 0,
      "automatically_generated": false,
      "rule_type": "face_out_variation"
    }
  ],
  "allow_automatic_rules": true,
  "last_reviewed_at": "2025-01-01T00:00:00Z",
  "last_reviewed_by": "string"
}

Response

Returns 200 with a oneOf. Read it in later steps with {{replaceRefinedQuery.response.data.<field>}}.

Need more? See the Constructor guide for connection setup and behaviour shared by every action.

Replace refined query — Constructor — Documentation