younifyd
Menu

Update facet campaign

Update facet campaign

PATCH/v1/facet_rule_campaigns/{facet_rule_campaign_id}

Use it in a workflow

  1. Add a step and choose the Constructor connector.
  2. Pick the Update facet campaign action (under Facet Campaigns).
  3. Fill in the fields below, then reference the result from later steps as {{updateFacetCampaign.response.data}}.

Request

Path parameters

facet_rule_campaign_idinteger (int32)required

Query parameters

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<oneOf>
blacklist_rulesarray<oneOf>
namestring

The name of the facet campaign.

descriptionstring

The description of the facet campaign.

refined_queriesarray<object>

A list of refined queries.

querystringrequired

A refined query string

refined_filtersarray<object>

A list of refined filters.

filter_namestringrequired

The name of the refined filter.

filter_valuestringrequired

The value of the refined filter.

json
{
  "slot_rules": [
    null
  ],
  "blacklist_rules": [
    null
  ],
  "name": "string",
  "description": "string",
  "refined_queries": [
    {
      "query": "string"
    }
  ],
  "refined_filters": [
    {
      "filter_name": "string",
      "filter_value": "string"
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{updateFacetCampaign.response.data.<field>}}.

idinteger

The ID of the facet rule campaign.

namestring

The name of the facet rule campaign.

descriptionstring

The description of the facet rule campaign.

created_atstring (date-time)

The creation time of the facet rule campaign.

updated_atstring (date-time)

The last updated time of the facet rule campaign.

slot_rulesarray<object>

A list of slot rules.

targetstringrequired

One offacet_groupfacet_option

facet_group_namestring
idintegerrequired

The ID of the rule, must be unique.

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.

ruleobjectrequired2 fields
rule_typestringrequired

One ofslot

created_atstring (date-time)

Date & time in ISO 8601 format for the creation of this rule.

updated_atstring (date-time)

Date & time in ISO 8601 format for last update for this rule.

blacklist_rulesarray<object>

A list of blacklist rules.

targetstringrequired

One offacet_groupfacet_option

facet_group_namestring
idintegerrequired

The ID of the rule, must be unique.

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.

ruleobjectrequired1 fields
rule_typestringrequired

One ofblacklist

created_atstring (date-time)

Date & time in ISO 8601 format for the creation of this rule.

updated_atstring (date-time)

Date & time in ISO 8601 format for last update for this rule.

refined_queriesarray<object>

A list of refined queries.

querystringrequired

A refined query string

refined_filtersarray<object>

A list of refined filters.

filter_namestringrequired

The name of the refined filter.

filter_valuestringrequired

The value of the refined filter.

json
{
  "id": 0,
  "name": "string",
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z",
  "slot_rules": [
    {
      "target": "facet_group",
      "id": 0,
      "rule": {
        "name": "string",
        "position": 0
      },
      "rule_type": "slot",
      "facet_group_name": "string",
      "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
    }
  ],
  "blacklist_rules": [
    {
      "target": "facet_group",
      "id": 0,
      "rule": {
        "name": "string"
      },
      "rule_type": "blacklist",
      "facet_group_name": "string",
      "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
    }
  ],
  "description": "string",
  "refined_queries": [
    {
      "query": "string"
    }
  ],
  "refined_filters": [
    {
      "filter_name": "string",
      "filter_value": "string"
    }
  ]
}

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