Populate Cache APIs

A set of 13 REST APIs works together to populate the API response cache.

Execute all populate cache APIs in the order presented below, with a few exceptions described in the next sections. The order listed in the table is the dependency order of the APIs. Unexpected results can occur if you do not run the APIs in the prescribed order. The delay between running two subsequent APIs is insignificant to the operation of these APIs as long as the data shape inside the org remains constant.

API NameDescription
Catalog Profile APIUses the catalogCode to generate and cache the data profile. You define a catalogCode when you create a sales catalog. The offerId and rulesetId values in the output must be passed to subsequent APIs.
Rule Set Combinations APIGenerates a representation of entity filters in the passed ruleset. The rulesetId can be retrieved from the catalogCodeToRuleAssignments node in the Catalog Profile API response. Only required if your catalog uses rulesets.
Context Dimensions APIGenerates a list of cacheable and active context dimension codes and their values for caching. This API doesn’t require anything from the previous API response.
Context Combinations APIGenerates a Cartesian product of all dimension combination value sets passed in the request body. The dimensions parameter is required in the request body. You can generate cached entries for specific context dimensions and values. Or you can leave dimensions blank to specify all context combinations in your catalog or to indicate that no context dimensions exist.
Context Eligibility APIIdentifies eligible products and promotions for each context combination. Its request body requires a cacheKey from the previous API's response.
Offers Item APIGenerates details for the offerIds passed in the request body. These offerIds are passed from the Product and Promotion nodes in the Catalog Profile API's response.
Offers List APIPaginates the list of eligible offers and ensures the proper sequencing. The value of the eligibilityContextKey node in the Context Eligibility API's response must be passed to the ctxEligibilityCacheKey node of this API's request body.
Hierarchy APITakes an individual product's offerId as input and populates its flat hierarchy in the cache. This API must be invoked for each Product offerId in the Catalog Profile API's response.
Prices APITakes an individual product's offerId as input and populates its prices in the cache. This API must be invoked for each Product offerId in the Catalog Profile API's response.
Offer Details APITakes an individual product's offerId as input and populates its details in the cache. This API must be invoked for each Product offerId in the Catalog Profile API's response.
Bundle Wrapper APITakes an individual product's offerId as input and populates its bundle wrapper in the cache. The bundle wrapper consists of the in-memory XLI objects used during basket operations. This API must be invoked for each Product offerId in the Catalog Profile API's response.
Promotion Wrapper APITakes an individual product's offerId as input and populates its promotion wrapper in the cache. This API must be invoked for each Product offerId in the Catalog Profile API's response. Only required if your catalog contains promotions.
Contains Offer APIFinds all the products and promotions that contain the given offer in their hierarchy and qualify under the given context combination. Also handles pagination and related action nodes. The value of the eligibilityContextKey node in the Context Eligibility API's response must be passed to the ctxEligibilityCacheKey node of this API's request body.

The diagram shows the invocation order and the data passed between APIs.

invocation order and the data passed between APIs