younifyd
Menu

Get Rule Promotions

Get Rule Promotions

GET/v2/rule-promotions

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Get Rule Promotions action (under Promotions Builder).
  3. Fill in the fields below, then reference the result from later steps as {{getRulePromotions.response.data}}.

Request

Query parameters

page[limit]integer (int64)

The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

page[offset]integer (int64)

The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

filterstring

This parameter accepts a filtering expression that uses specific operators and attributes. The following operators and attributes are available when filtering on this endpoint. See [Supported Filtering Characters](/guides/Getting-Started/filtering#supported-characters). | Attribute | Type | Operator | Example | |:--------------------------|:-------------------|:-----------------------------|:----------------------------------------------------------------------| | `code` | `string`, `number` | `eq` | `eq(code,summer2024)` | | `name` | `string` | `like`,`ilike` | `ilike(name,'Summer *')` | | `enabled` | `boolean` | `eq` | `eq(enabled, true)` | | `stackable` | `boolean` | `eq` | `eq(stackable, true)` | | `override_stacking` | `boolean` | `eq` | `eq(override_stacking, true)` | | `start` | `date` | `lt`, `le`, `eq`, `gt`, `ge` | `gt(start, 2025-01-01T00:00:00.000Z)` | | `end` | `date` | `lt`, `le`, `eq`, `gt`, `ge` | `lt(end, 2025-01-01T00:00:00.000Z)` | | `rule_set.rules.strategy` | `string` | `eq`, `in` | `eq(rule_set.rules.strategy,account_tags)` | | `rule_set.rules.args` | `string` | `contains` | `contains(rule_set.rules.args, 11111111-1111-4111-1111-111111111111)` | | `account_tags` | `string` | `contains` | `contains(account_tags, 11111111-1111-4111-1111-111111111111)` | Some notes about filters: 1. The `code` filter is case-insensitive. You can search for codes using only `numbers` or codes containing both `string` and `numbers`. 2. The `rule_set.rules.*` filters do not search child conditions at present 3. The `account_tags` filter will essentially search for any rule or child rule that has an `account_tags` strategy and the associated accounts.

Headers

Authorizationstring (Bearer)required

The Bearer token required to get access to the API.

Response

Returns 200 with an object. Read it in later steps with {{getRulePromotions.response.data.<field>}}.

dataarray<any>
linksobject
currentstring (uri)

URL for the current page of results

firststring (uri)

URL for the first page of results

laststring (uri)

URL for the last page of results

nextstring (uri)

URL for the next page of results

prevstring (uri)

URL for the previous page of results

metaobject
pageobject4 fields
resultsobject2 fields
json
{
  "data": [
    null
  ],
  "links": {
    "current": "string",
    "first": "string",
    "last": "string",
    "next": "string",
    "prev": "string"
  },
  "meta": {
    "page": {
      "current": 0,
      "limit": 0,
      "offset": 0,
      "total": 0
    },
    "results": {
      "total": 0,
      "total_method": "string"
    }
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.