Contains Offer API
Running the Contains Offer API is optional.
The Contains Offer API finds all the products and promotions that contain a given offer in their hierarchy and also qualifies under the given context combination. This API also paginates and sorts the list of products and promotions and caches the result. This API adds the required action nodes to the responses if there are remaining pages after the current page.
You can obtain the ctxEligibilityCacheKey required in the request body of this API from the apiResponse.eligibilityContextKey node in the response body of the Context Eligibility API.
You can obtain the offerId required in the URI of this API from the apiResponse.data.catalogProductRelationDetails.Product node in the response body of the Catalog Profile API.
You must first run the Context Eligibility API to obtain the offerId required in the request body of this API.
If you specify just one of these two parameters, it follows the behavior described in the table below and accepts your defined time for the parameter you specified. If you are using one or both parameters, you must specify them with the same values for all of the Populate Cache APIs in this sequence.
|effectiveStartTime||2001-07-04T12:08:56||Current date and time||Optional||effectiveStartTime is the time that you want your cached catalog entries to be effective. It should be in the UTC date-time format. Your effectiveStartTime must occur after the current time for which you are executing the Populate Cache APIs or you will receive an error message.|
|expirationTime||2001-07-04T12:08:56||effectiveStartTime + TimeToLive||Optional||expirationTime is the time that you want your cached catalog entries to expire. It should also be in the UTC date-time format. Your expirationTime must occur after your effectiveStartTime or you receive an error message. TimeToLive is a custom setting created in CPQ Configuration Setup. It has a default value of 30 days.|
Here is an example of how to pass the URI parameters:
|ctxEligibilityCacheKey||String||Cache key pointing to the context eligibility record whose context combination calculates the eligibility of offers returned by this API.||Null, which produces a response for the default context combination||Optional|
This is a sample request for the ctxEligibilityCacheKey.
This is an example of how you invoke the API using Apex:
You can run this API in parallel for multiple catalogs, offers, and context combinations. For example, there may be 100 products (Product1, Product2 ... Product100) and 100 context combinations (Combo1, Combo2 ... Combo100) that you can run in parallel.
This example shows products and promotions that contain a given offer in their hierarchy and also qualifies under the given context combination.
|500||Internal Server Error|