younifyd
Menu

Get Rules

Gets all authorized catalog rules

GET/catalogs/rules

Use it in a workflow

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

Request

Query parameters

filterstring

This endpoint supports filtering. See [Filtering](#filtering).

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/api/settings/settings-introduction#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. You would normally increment the page offset by multiples of the page limit to paginate through the results.

Response

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

metaobject

Contains the results for the entire collection.

resultsobject1 fields

Total number of results for the entire collection.

pageobject4 fields
dataarray<object>
idstringrequired

The catalog rule ID. Use this to get, modify, or delete the catalog rule.

attributesobjectrequired13 fields
typestringrequired

This represents the type of object being returned. Always `catalog_rule`.

One ofcatalog_rule

metaobject4 fields

A rule's metadata.

linksobject

Links allow you to move between requests.

selfstring (uri)

Single entities use a `self` parameter with a link the specific resource.

firststring (uri)

Always the first page.

laststring (uri)

This is `null` if there is only one page.

prevstring (uri)

This is `null` if there is only one page.

nextstring (uri)

This is `null` if there is only one page.

json
{
  "data": [
    {
      "id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
      "attributes": {
        "name": "rule-123",
        "catalog_id": "d09b4e16-08a5-4f42-817c-6e0d98acbb63",
        "created_at": "2020-09-22T09:00:00",
        "updated_at": "2020-09-22T09:00:00",
        "description": "Catalog Rule for most favored customers",
        "account_ids": [
          "string"
        ],
        "account_tag_ids": [
          "string"
        ],
        "customer_ids": [
          "string"
        ],
        "channels": [
          "string"
        ],
        "tags": [
          "string"
        ],
        "schedules": [
          {
            "valid_from": "2020-09-22T09:00:00",
            "valid_to": "2020-09-22T09:00:00"
          }
        ],
        "pricebook_ids": [
          {
            "id": "00000000-0000-0000-0000-000000000000",
            "priority": 0
          }
        ]
      },
      "type": "catalog_rule",
      "meta": {
        "similarity_score": 100,
        "active": false,
        "resolved_for_shopper": true,
        "release_id": "string"
      }
    }
  ],
  "meta": {
    "results": {
      "total": 0
    },
    "page": {
      "limit": 0,
      "offset": 0,
      "current": 0,
      "total": 0
    }
  },
  "links": {
    "self": "string",
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}

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

Was this page helpful?