Campaign templates

List campaign templates

[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Retrieve a list of campaign templates.

get/v1/campaign_templates

Request

Query parameters

pageSizeinteger

The number of items in the response.

skipinteger

The number of items to skip when paging through large result sets.

sortstring

The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with -.

Note: You may not be able to use all fields for sorting. This is due to performance limitations.

state'draft' | 'enabled' | 'disabled'

Filter results by the state of the campaign template.

namestring

Filter results performing case-insensitive matching against the name of the campaign template.

tagsstring

Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the "name" query parameter, a logical OR will be performed to search both tags and name for the provided values.

userIdinteger

Filter results by user ID.

Response

OK

hasMoreboolean required

Example response

{
  "hasMore": true,
  "data": [
    {
      "id": 6,
      "created": "2020-06-10T09:05:27.993483Z",
      "accountId": 3886,
      "userId": 388,
      "name": "Discount campaign",
      "description": "This is a template for a discount campaign.",
      "instructions": "Use this template for discount campaigns. Set the campaign properties according to the campaign goals, and don't forget to set an end date.",
      "activeRulesetId": 5,
      "tags": [
        "discount"
      ],
      "reevaluateOnReturn": true,
      "couponSettings": {
        "validCharacters": [
          "A",
          "B",
          "C",
          "D",
          "E",
          "F",
          "G",
          "H",
          "I",
          "J",
          "K",
          "L",
          "M",
          "N",
          "O",
          "P",
          "Q",
          "R",
          "S",
          "T",
          "U",
          "V",
          "W",
          "X",
          "Y",
          "Z",
          "0",
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9"
        ],
        "couponPattern": "SUMMER-####-####"
      },
      "couponReservationSettings": {
        "reservationLimit": 45
      },
      "referralSettings": {
        "validCharacters": [
          "A",
          "B",
          "C",
          "D",
          "E",
          "F",
          "G",
          "H",
          "I",
          "J",
          "K",
          "L",
          "M",
          "N",
          "O",
          "P",
          "Q",
          "R",
          "S",
          "T",
          "U",
          "V",
          "W",
          "X",
          "Y",
          "Z",
          "0",
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9"
        ],
        "couponPattern": "SUMMER-####-####"
      },
      "limits": [
        {
          "action": "createCoupon",
          "limit": 1000,
          "period": "yearly",
          "entities": [
            "Coupon"
          ]
        }
      ],
      "templateParams": [
        {
          "name": "discount_value",
          "type": "number",
          "description": "This is a template parameter of type `number`.",
          "attributeId": 42
        }
      ],
      "applicationsIds": [
        1,
        2,
        3
      ],
      "campaignCollections": [
        {
          "name": "My collection",
          "description": "My collection of SKUs"
        }
      ],
      "defaultCampaignGroupId": 42,
      "campaignType": "advanced",
      "campaignsCount": 3,
      "updated": "2022-08-24T14:15:22Z",
      "updatedBy": "Jane Doe",
      "validApplicationIds": [
        1,
        2,
        3
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.