v1

latestOpenAPI 3.1.02026-07-241765501.1 MB
Searchandising campaigns

Retrieve campaigns

🔐 This endpoint requires HTTP authentication (either Basic or Bearer). For authenticating with Bearer token, required scopes are: searchandising.campaigns(r), searchandising.recommendations(r).

Retrieve campaigns.

get/v1/campaigns

Query parameters

keystring required

The key of the index to use.

Example:key_K2pX7vBnU0bgA5xp
sectionstring

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

Example:Products
integer
OR
integer[]
refined_filtersobject

A list of refined filters.

num_results_per_pageinteger

The number of results per page to return.

Example:20
pageinteger

The page of results to return.

Example:1
offsetinteger

The number of results to skip from the beginning. Cannot be used together with page.

cstring

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

Example:cio-js-2.90
pod_idstring[]

A list of pod IDs.

condition_typeRefinedStrategyType[]

A list of condition types. Can be "item", "attribute", or "expression"

{
  "pod_id": [
    "homepage-recs"
  ]
}
refined_queriesstring[]

A list of refined queries.

Response

OK

total_countinteger required

The total count of campaigns.

Example response

{
  "campaigns": [
    {
      "request_tag_value": "premium",
      "start_time": "2024-03-01T00:00:00",
      "end_time": "2024-03-31T23:59:59",
      "name": "Spring Sale",
      "description": "Seasonal promotion campaign",
      "refined_queries": [
        {
          "query": "shoes"
        }
      ],
      "refined_filters": [
        {
          "filter_name": "brand",
          "filter_value": "Nike"
        }
      ],
      "refined_recommendation_contexts": [
        {
          "pod_id": "homepage-recs",
          "condition": {
            "item_id": "nike-shoes"
          }
        }
      ],
      "boost_rules": [
        {
          "request_tag_value": "premium",
          "active": true,
          "start_time": "2024-03-06T16:05:19",
          "end_time": "2024-03-06T17:05:19",
          "campaign_id": 1,
          "rule": {
            "item_ids": [
              "nike-shoes"
            ],
            "boost": -5
          }
        }
      ],
      "blacklist_rules": [
        {
          "request_tag_value": "premium",
          "active": true,
          "start_time": "2024-03-06T16:05:19",
          "end_time": "2024-03-06T17:05:19",
          "campaign_id": 1,
          "rule": {
            "item_ids": [
              "nike-shoes"
            ]
          }
        }
      ],
      "slot_rules": [
        {
          "request_tag_value": "premium",
          "active": true,
          "start_time": "2024-03-06T16:05:19",
          "end_time": "2024-03-06T17:05:19",
          "campaign_id": 1,
          "rule": {
            "item_id": "nike-shoes",
            "variation_slice": {
              "color": [
                "red"
              ]
            },
            "position": 1,
            "labels": {
              "promoted": true
            }
          }
        }
      ],
      "content_rules": [
        {
          "request_tag_value": "premium",
          "active": true,
          "start_time": "2024-03-06T16:05:19",
          "end_time": "2024-03-06T17:05:19",
          "campaign_id": 1,
          "rule": {
            "data": {
              "banner_url": "https://example.com/banner.jpg"
            }
          }
        }
      ],
      "filters_slot_rules": [
        {
          "request_tag_value": "premium",
          "active": true,
          "start_time": "2024-03-06T16:05:19",
          "end_time": "2024-03-06T17:05:19",
          "campaign_id": 1,
          "rule": {
            "position_ranges": [
              {
                "start": 1,
                "end": 3
              }
            ]
          }
        }
      ],
      "whitelist_rule": {
        "request_tag_value": "premium",
        "active": true,
        "start_time": "2024-03-06T16:05:19",
        "end_time": "2024-03-06T17:05:19",
        "campaign_id": 1
      },
      "variation_slicing_rule": {
        "request_tag_value": "premium",
        "active": true,
        "start_time": "2024-03-06T16:05:19",
        "end_time": "2024-03-06T17:05:19",
        "campaign_id": 1,
        "rule": {
          "facet_names": [
            "color"
          ]
        }
      },
      "metadata_json": {
        "goal": "increase_conversions",
        "goal_description": "Boost spring sales"
      }
    }
  ]
}