younifyd
Menu

Update campaign

Update campaign

PATCH/v1/campaigns/{campaign_id}

Use it in a workflow

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

Request

Path parameters

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.

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.

start_timestring (date-time)

The start time of the campaign.

end_timestring (date-time)

The end time of the campaign.

namestring

The name of the campaign.

descriptionstring

The description of the 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.

refined_recommendation_contextsarray<object>

A list of refined recommendation contexts.

pod_idstringrequired

The ID of the pod.

conditiononeOfrequired

Condition of the context

boost_rulesarray<object>

A list of boost 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

blacklist_rulesarray<object>

A list of blacklist 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 blacklist rule.

rule_typestring

One ofblacklist

slot_rulesarray<object>

A list of slot rules.

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

content_rulesarray<object>

A list of content 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

Parameters of the content rule.

rule_typestring

One ofcontent

filters_slot_rulesarray<object>

A list of filters slot 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

Parameters of the filters slot rule.

rule_typestring

One offilters_slot

face_out_variation_rulesarray<object>

A list of face out variation 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

Parameters of the face out variation rule.

rule_typestring

One offace_out_variation

whitelist_ruleoneOf

A whitelist rule.

variation_slicing_ruleoneOf

A variation slicing rule.

metadata_jsonany

Metadata related to the campaign.

json
{
  "request_tag_name": null,
  "request_tag_value": "string",
  "start_time": "2025-01-01T00:00:00Z",
  "end_time": "2025-01-01T00:00:00Z",
  "name": "string",
  "description": "string",
  "refined_queries": [
    {
      "query": "string"
    }
  ],
  "refined_filters": [
    {
      "filter_name": "string",
      "filter_value": "string"
    }
  ],
  "refined_recommendation_contexts": [
    {
      "pod_id": "string",
      "condition": null
    }
  ],
  "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"
    }
  ],
  "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"
    }
  ],
  "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"
    }
  ]
}

Response

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

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.

start_timestring (date-time)

The start time of the campaign.

end_timestring (date-time)

The end time of the campaign.

namestring

The name of the campaign.

descriptionstring

The description of the 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.

refined_recommendation_contextsarray<object>

A list of refined recommendation contexts.

pod_idstringrequired

The ID of the pod.

conditiononeOfrequired

Condition of the context

boost_rulesarray<object>

A list of boost rules.

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.

ruleanyrequired

Rule definition of the boost rule.

rule_typestringrequired

One ofboost

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.

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.

ruleanyrequired

Rule definition of the blacklist rule.

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.

slot_rulesarray<object>

A list of slot rules.

request_filtersobject

Facet conditions for the rule to be applied.

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.

ruleanyrequired

Parameters of the slot rule.

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.

content_rulesarray<object>

A list of content rules.

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.

ruleanyrequired

Parameters of the content rule.

rule_typestringrequired

One ofcontent

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.

filters_slot_rulesarray<object>

A list of filters slot rules.

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.

ruleanyrequired

Parameters of the filters slot rule.

rule_typestringrequired

One offilters_slot

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.

face_out_variation_rulesarray<object>

A list of face out variation rules.

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.

ruleanyrequired

Parameters of the face out variation rule.

rule_typestringrequired

One offace_out_variation

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.

whitelist_ruleany

A whitelist rule.

variation_slicing_ruleany

A variation slicing rule.

metadata_jsonany

Metadata related to the campaign.

idinteger

The ID of the campaign.

created_atstring (date-time)

The creation time of the campaign.

updated_atstring (date-time)

The last updated time of the campaign.

json
{
  "id": 0,
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z",
  "request_tag_name": null,
  "request_tag_value": "string",
  "start_time": "2025-01-01T00:00:00Z",
  "end_time": "2025-01-01T00:00:00Z",
  "name": "string",
  "description": "string",
  "refined_queries": [
    {
      "query": "string"
    }
  ],
  "refined_filters": [
    {
      "filter_name": "string",
      "filter_value": "string"
    }
  ],
  "refined_recommendation_contexts": [
    {
      "pod_id": "string",
      "condition": null
    }
  ]
}

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