Skip to main content

Get a catalog rule by ID

GET 

/catalogs/rules/:catalog_rule_id

Get a catalog rule by ID

Request

Path Parameters

    catalog_rule_id stringrequired

    The catalog rule ID.

Responses

The catalog rile.

Schema
    data objectrequired

    A catalog rule specifies which catalog to use for a given shopper context.

    id stringrequired

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

    attributes objectrequired
    name stringrequired

    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.

    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 object[]

    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".

  • Array [
  • valid_from date-timenullable

    Matches the date and time that the catalog is displayed from.

    valid_to date-timenullable

    Matches the date and time the catalog is displayed to.

  • ]
  • catalog_id stringrequired

    The unique identifier of a catalog.

    created_at date-timerequired

    The date and time a catalog rule was created.

    updated_at date-timerequired

    The date and time a catalog release is updated.

    type stringrequired

    Possible values: [catalog_rule]

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

    links object

    Links allow you to move between requests.

    self urinullable

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

    first urinullable

    Always the first page.

    last urinullable

    This is null if there is only one page.

    prev urinullable

    This is null if there is only one page.

    next urinullable

    This is null if there is only one page.

Loading...