Campaigns

Get ruleset (V2)

Changed on

[!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 as a JSON object.

get/v2/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

Internal ID of this entity.

createdstring date-time

The time this entity was created.

userIdinteger

The ID of the user that created this ruleset.

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,
  "userId": 385,
  "campaignId": 320,
  "templateId": 3,
  "promotionRules": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "title": "10% off for loyalty members",
      "blocks": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
        }
      ]
    }
  ],
  "strikethroughRules": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "title": "10% off for loyalty members",
      "blocks": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
        }
      ]
    }
  ],
  "selectors": [
    {
      "name": "discountedCartItems",
      "type": "selector",
      "source": "$Session.CartItems",
      "steps": [
        {
          "type": "filter",
          "predicate": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        }
      ]
    }
  ],
  "bundles": [
    {
      "id": "1b671a64-40d5-491e-99b0-da01ff1f3341",
      "name": "meal_deal",
      "type": "bundle",
      "sources": [
        "{{$mains}}",
        "{{$drinks}}"
      ],
      "counts": [
        1,
        2
      ],
      "matchers": [
        "color"
      ]
    }
  ],
  "parameters": [
    {
      "name": "minCartTotal",
      "value": 50,
      "valueType": "number",
      "maxValue": 10000,
      "description": "Minimum cart total to trigger the campaign.",
      "attribute": 42
    }
  ]
}

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the / response's property type changed from no type to object for status

    • breaking

      the / response's property type changed from no type to object for status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • info

      removed subschema #2: PromotionRuleV2 from the / response property allOf list for the response status

    • info

      removed subschema #2: StrikethroughRuleV2 from the / response property allOf list for the response status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      the response required property became read-only for the status

    • info

      the response required property became read-only for the status

    • info

      the response required property became read-only for the status