Campaigns

Get ruleset

[!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 the specified ruleset.

get/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}

Request

Path parameters

applicationIdinteger required

The ID of the Application. It is displayed in your Talon.One deployment URL.

campaignIdinteger required

The ID of the campaign. It is displayed in your Talon.One deployment URL.

rulesetIdinteger required

The ID of the ruleset.

Response

OK

idinteger required

The internal ID of this entity.

createdstring date-time required

The time this entity was created.

userIdinteger required

The ID of the user associated with this entity.

rbVersionstring

The version of the rulebuilder used to create this ruleset.

activateboolean

Indicates whether this created ruleset should be activated for the campaign that owns it.

campaignIdinteger

The ID of the campaign that owns this entity.

templateIdinteger

The ID of the campaign template that owns this entity.

activatedAtstring date-time

Timestamp indicating when this Ruleset was activated.

Example response

{
  "id": 6,
  "created": "2020-06-10T09:05:27.993483Z",
  "userId": 388,
  "rules": [
    {
      "id": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23",
      "parentId": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23",
      "title": "Give discount via coupon",
      "description": "Creates a discount when a coupon is valid",
      "bindings": [
        {
          "name": "Discount percentage",
          "type": "templateParameter",
          "expression": [
            "identity",
            10
          ],
          "valueType": "number",
          "maxValue": 19.9,
          "attributeId": 100,
          "description": "The percentage discount applied to the cart total."
        }
      ],
      "condition": [
        "and",
        [
          "couponValid"
        ]
      ],
      "effects": [
        "catch",
        [
          "noop"
        ],
        [
          "setDiscount",
          "10% off",
          [
            "*",
            [
              ".",
              "Session",
              "Total"
            ],
            [
              "/",
              10,
              100
            ]
          ]
        ]
      ]
    }
  ],
  "strikethroughRules": [
    {
      "id": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23",
      "parentId": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23",
      "title": "Give discount via coupon",
      "description": "Creates a discount when a coupon is valid",
      "bindings": [
        {
          "name": "Discount percentage",
          "type": "templateParameter",
          "expression": [
            "identity",
            10
          ],
          "valueType": "number",
          "maxValue": 19.9,
          "attributeId": 100,
          "description": "The percentage discount applied to the cart total."
        }
      ],
      "condition": [
        "and",
        [
          "couponValid"
        ]
      ],
      "effects": [
        "catch",
        [
          "noop"
        ],
        [
          "setDiscount",
          "10% off",
          [
            "*",
            [
              ".",
              "Session",
              "Total"
            ],
            [
              "/",
              10,
              100
            ]
          ]
        ]
      ]
    }
  ],
  "bindings": [],
  "rbVersion": "v2",
  "activate": true,
  "campaignId": 320,
  "templateId": 3
}

Changes

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