---
title: "Gets all authorized catalog rules"
method: GET
path: "/catalogs/rules"
tags: ["Rules"]
---

# Gets all authorized catalog rules

`GET /catalogs/rules`

## Request

- Base URL: `https://euwest.api.elasticpath.com`
- URL: `https://euwest.api.elasticpath.com/catalogs/rules`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/elasticpath/apis/catalogs-introduction/docs/catalogs/rules/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves all authorized catalog rules.

### Filtering

This endpoint supports filtering. For general filtering syntax, see [Filtering](/guides/Getting-Started/filtering). The following operators and attributes are supported.

| Operator | Description | Supported Attributes | Example |
|:--- |:--- |:--- |:--- |
| `eq` | Equals. Checks if the values of two operands are equal. If they are, the condition is true. | `id`,`catalog_id`,`account_ids`,`customer_ids`,`channels`,`tags`,`pricebook_ids`,`search_profile_slug` | `filter=eq(id,some-id)` | 
| `in` | Checks if the values are included in the specified string. If they are, the condition is true. | `id`,`account_ids`,`customer_ids`,`channels`,`tags`,`pricebook_ids`,`search_profile_slug` | `filter=in(account_ids,some-id,another-id)` |

## Query parameters

- `filter` string
- `page[limit]` integer
- `page[offset]` integer

## Response `200`

The list of catalog rules.

- RuleListData: Container for a list of catalog rules.
  - `meta` PageMeta: Contains the results for the entire collection.
    - `results` object: Total number of results for the entire collection.
      - `total` integer: Total number of results for the entire collection.
    - `page` object
      - `limit` integer: The maximum number of records for all pages.
      - `offset` integer: The current offset by number of pages.
      - `current` integer: The current number of pages.
      - `total` integer: The total number of records for the entire collection.
  - `data` Rule[], required
    - `id` string, required: The catalog rule ID. Use this to get, modify, or delete the catalog rule.
    - `attributes` object, required
      - `name` string, required: The name of a catalog rule. The name must not contain any spaces.
      - `description` string: A brief description of the purpose of a catalog rule.
      - `account_ids` string[]: The list of accounts who are eligible to see this catalog. If this field is empty, the rule matches all accounts.
      - `account_tag_ids` string[]: The list of account tag UUIDs. Accounts must have at least one of these tags to see this catalog. If this field is empty, the rule matches all accounts regardless of tags.
      - `customer_ids` string[]: The list of customers who are eligible to see this catalog. If empty, the rule matches all customers.
      - `channels` string[]: The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the `EP-Channel` header in your requests.
      - `tags` string[]: A list of user-defined tags that can be used to further restrict the eligibility criteria for this rule. Requests populate the catalog rule tag using the `EP-Context-Tag` header.
      - `schedules` RuleSchedule[]: Specifies a time period when a catalog is displayed, such as on a specific date or during summer. Requests populate the rule tag using the `EP-Context-Tag` header. The schedules attribute must include the following. - `valid_from` matches the date and time that the catalog is displayed from. - `valid_to` matches the date and time the catalog is displayed to. Commerce runs on UTC time. You can offset the timezone by adding the offset to the end of the date and time. For example, a catalog which contains a sale hierarchy that should appear for a set timeframe may be scheduled to publish on a given date and time within a given timezone. For instance, a sale that should begin on 1st of June 2022 05:00 ET and end on the 15th of June 2022 at 23:50 PT would have a valid schedule of `"valid_from": "2022-06-01T05:00:00.000-05:00"`, `"valid_to": "2022-06-15T11:59:99.000-08:00"`.
        - `valid_from` string, date-time, nullable: Matches the date and time that the catalog is displayed from.
        - `valid_to` string, date-time, nullable: Matches the date and time the catalog is displayed to.
      - `catalog_id` string, required: The unique identifier of a catalog.
      - `created_at` string, date-time, required: The date and time a catalog rule was created.
      - `updated_at` string, date-time, required: The date and time a catalog release is updated.
      - `pricebook_ids` object[]: If you want multiple price books for different scenarios, such as seasonal sales, business versus retail pricing, and reward programs, when creating a catalog, you can specify up to five price books. You must configure a priority for your price books. Product prices are displayed in the catalog according to the priority of the price books.
        - `id` string, uuid, required: A unique identifier of a price book.
        - `priority` integer, required: Priority is a number and the price book with the highest number has the highest priority.
      - `search_profile_slug` string, nullable: Optional slug of a Catalog Search profile to apply when this rule is selected for a shopper. This is configuration on the rule (same role as `pricebook_ids`), not a shopper-context matching dimension. Omitted from responses when unset.
    - `type` 'catalog_rule', required: This represents the type of object being returned. Always `catalog_rule`.
    - `meta` RuleMeta: A rule's metadata.
      - `similarity_score` integer, nullable: Indicates the similarity score of the rule to the supplied validation request. The score is calculated based on matching criteria: - **Name match**: 100 points (exact match) - **Account IDs**: 5 points per matching account - **Customer IDs**: 5 points per matching customer - **Channels**: 5 points per matching channel - **Tags**: 5 points per matching tag - **Catalog ID**: 3 points (exact match) - **Pricebook IDs**: 2 points per matching pricebook - **Schedules**: 2 points per overlapping schedule Higher scores indicate greater similarity. Rules are sorted by similarity score in descending order.
      - `active` boolean: will the rule be active at the supplied match date/time?
      - `resolved_for_shopper` boolean: Indicates whether this rule will be the one resolved for a shopper viewing the catalog at the supplied match date/time
      - `release_id` string, nullable: The unique identifier of the published release of the catalog for the rule
  - `links` Links: Links allow you to move between requests.
    - `self` string, uri-reference, nullable: Single entities use a `self` parameter with a link the specific resource.
    - `first` string, uri-reference, nullable: Always the first page.
    - `last` string, uri-reference, nullable: This is `null` if there is only one page.
    - `prev` string, uri-reference, nullable: This is `null` if there is only one page.
    - `next` string, uri-reference, nullable: This is `null` if there is only one page.

## Other responses

- `default`: An unexpected error.

---

[API](https://skmtc.dev/elasticpath/apis/catalogs-introduction.md) - [All operations](https://skmtc.dev/elasticpath/apis/catalogs-introduction/llms.txt) - [OpenAPI document](https://skmtc.dev/elasticpath/apis/catalogs-introduction/revisions/eb541d5dea51?raw)
