Elastic Path Rules API
If your store requires multiple catalogs, add catalog rules to control when a catalog is displayed. A catalog rule contains a catalog plus the criteria under which to display the catalog.:::cautionYou cannot create catalog rules for organization catalogs.:::You can use catalog rules to schedule a catalog to appear during a particular period, such as on a specific date or during summer. The catalog might offer different pricing during this period. The pricing depends on the associated price book.The following scenarios provides a few examples for using catalog rules.- **Multiple geographical regions**. Display different catalogs in different regions with suitable pricing or combine product hierarchies from two different regions to display in a third region.- **Multiple channels**. Display different catalogs based on how a shopper accesses your store, such as through a mobile app or a web storefront.- **Direct to business versus direct to customers**. Offer different products and prices for business customers versus retail customers.- **Preferred accounts**. Offer special pricing to a group of users while displaying a standard price catalog to other users.- **Preferred customers**. Offer special pricing to preferred customers while displaying a standard price catalog to all other shoppers.- **Reward programs**. Enable reward programs where catalog prices drop after a certain spending level is reached.- **Product sales**. Offer sale items for a limited time.- **Standard pricing**. Display a default catalog to the shoppers who do not meet the criteria of the other catalog rules.You can define a catalog rule with any of the following criteria.- **Accounts**. List the accounts that should see a catalog. When a user has logged in with the account, they see the configured catalog.- **Customers**. List the customers that should see a catalog. When the customer is logged in, they see the configured catalog.- **Channel**. Specify a shopper experience, such as web storefront or mobile app. Set up the channel to retrieve the catalog from the catalog rule that matches that channel.- **Other tags**. Create your own user-defined tags. For example, you might want to tag by regions or you might want to distinguish between business and consumer customers.If a catalog rule has no criteria defined, it is the default catalog rule.### Resolving catalog rulesWhen there is a request for a catalog, the store displays the catalog with the rule that matches the most attributes of the shoppers context.The request triggers the following steps:1. Compares the shoppers context against the defined catalog rules.1. Determines the best match.1. Retrieves the catalog associated with the matching catalog rule.The follow examples show how the best match might be resolved:- A shopper matches one of the `customer_ids` in one catalog rule only. The catalog for that catalog rule is displayed.- A shopper matches one of the `customer_ids` in one catalog rule only, but doesnʼt match any of the `tags` specified in that catalog rule. Because there are no other catalog rules for this `customer_id`, the catalog for the catalog rule is displayed because it is the best match.- A shopper is browsing a store using the stores mobile app, which matches `channel=mobile` in two catalog rules. The catalog displayed depends on matches with the `tags` or `customer_ids` attributes. If there is no other matching attribute, the first catalog rule found by the store is used. The best practice is to create catalog rules that cover all cases so that you avoid this situation.- An unknown shopper is browsing the only channel offered by the seller. The store displays the base catalog.
Elastic Path Rules API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Rules. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.
This API exposes 6 operations across 3 paths, and defines 13 schemas. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.
Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 1
Elastic Path Rules API declares
1 security scheme
for authenticating requests.
It accepts HTTP bearer tokens (BearerToken).
By default, every request must be authenticated.
Paths & Operations 6
Across 3 paths, the API surfaces 6 operations — 1 DELETE, 2 GET, 2 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.
If your store requires multiple catalogs, add catalog rules to control when a catalog is displayed. A catalog rule contains a catalog plus the criteria under which to display the…
Schemas 13
The contract defines 13 schemas that model the data the API accepts and returns. The most detailed are links (5 properties), rule-meta (4 properties), rule (4 properties), error (3 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Elastic Path 12
Other APIs Elastic Path publishes across the network.