---
title: "List campaign rulesets"
method: GET
path: "/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets"
tags: ["Campaigns"]
---

# List campaign rulesets

`GET /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/applications/:applicationId/campaigns/:campaignId/rulesets/get.ts> (a function with typed inputs; its response is checked against the schema)

> [!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.

List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign.
**Important:** The response also includes deleted rules.
You should only consider the latest revision of the returned rulesets.

## Path parameters

- `applicationId` integer, required
- `campaignId` integer, required

## Query parameters

- `pageSize` integer
- `skip` integer
- `sort` string

## Response `200`

OK

- object
  - `totalResultSize` integer, required
  - `data` Ruleset[], required
    - `id` integer, required: The internal ID of this entity.
    - `created` string, date-time, required: The time this entity was created.
    - `userId` integer, required: The ID of the user associated with this entity.
    - `rules` Rule[], required: Set of rules to apply.
      - `id` string, uuid: A unique identifier for the rule.
      - `parentId` string, uuid: The ID of the rule that was copied to create this rule.
      - `title` string, required: A short description of the rule.
      - `description` string: A longer, more detailed description of the rule.
      - `bindings` Binding[]: An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
        - `name` string, required: A descriptive name for the value to be bound.
        - `type` string: The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter`
        - `expression` unknown[], required: A Talang expression that is evaluated, and its result is bound to the name of the binding. The first element must be one of the functions or operators supported by Talang, followed by its arguments. The arguments can be strings, numbers, or nested expressions. For example: - `["list", "10014", "10015"]` calls the `list` function to build a list of strings. - `["+", 2, 0]` uses the `+` operator to add two numbers.
          - unknown
        - `valueType` string: The data type of the value. One of the following: - `string` - `number` - `boolean`
        - `minValue` number: The minimum value allowed for this placeholder.
        - `maxValue` number: The maximum value allowed for this placeholder.
        - `attributeId` integer: Identifier of the attribute attached to the placeholder.
        - `description` string: Description of the placeholder field and its value in the template. This text can be shown when creating campaigns from this template.
      - `condition` unknown[], required: A Talang expression that will be evaluated in the context of the given event.
        - unknown
      - `effects` array[], required: An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
        - unknown[]
          - unknown
    - `strikethroughRules` Rule[]: Set of rules to apply for strikethrough.
      - `id` string, uuid: A unique identifier for the rule.
      - `parentId` string, uuid: The ID of the rule that was copied to create this rule.
      - `title` string, required: A short description of the rule.
      - `description` string: A longer, more detailed description of the rule.
      - `bindings` Binding[]: An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
        - `name` string, required: A descriptive name for the value to be bound.
        - `type` string: The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter`
        - `expression` unknown[], required: A Talang expression that is evaluated, and its result is bound to the name of the binding. The first element must be one of the functions or operators supported by Talang, followed by its arguments. The arguments can be strings, numbers, or nested expressions. For example: - `["list", "10014", "10015"]` calls the `list` function to build a list of strings. - `["+", 2, 0]` uses the `+` operator to add two numbers.
          - unknown
        - `valueType` string: The data type of the value. One of the following: - `string` - `number` - `boolean`
        - `minValue` number: The minimum value allowed for this placeholder.
        - `maxValue` number: The maximum value allowed for this placeholder.
        - `attributeId` integer: Identifier of the attribute attached to the placeholder.
        - `description` string: Description of the placeholder field and its value in the template. This text can be shown when creating campaigns from this template.
      - `condition` unknown[], required: A Talang expression that will be evaluated in the context of the given event.
        - unknown
      - `effects` array[], required: An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
        - unknown[]
          - unknown
    - `bindings` Binding[], required: An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
      - `name` string, required: A descriptive name for the value to be bound.
      - `type` string: The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter`
      - `expression` unknown[], required: A Talang expression that is evaluated, and its result is bound to the name of the binding. The first element must be one of the functions or operators supported by Talang, followed by its arguments. The arguments can be strings, numbers, or nested expressions. For example: - `["list", "10014", "10015"]` calls the `list` function to build a list of strings. - `["+", 2, 0]` uses the `+` operator to add two numbers.
        - unknown
      - `valueType` string: The data type of the value. One of the following: - `string` - `number` - `boolean`
      - `minValue` number: The minimum value allowed for this placeholder.
      - `maxValue` number: The maximum value allowed for this placeholder.
      - `attributeId` integer: Identifier of the attribute attached to the placeholder.
      - `description` string: Description of the placeholder field and its value in the template. This text can be shown when creating campaigns from this template.
    - `rbVersion` string: The version of the rulebuilder used to create this ruleset.
    - `activate` boolean: Indicates whether this created ruleset should be activated for the campaign that owns it.
    - `campaignId` integer: The ID of the campaign that owns this entity.
    - `templateId` integer: The ID of the campaign template that owns this entity.
    - `activatedAt` string, date-time: Timestamp indicating when this Ruleset was activated.

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/7ef1b9504c3a?raw)
