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.
Preconditions
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.
Parameter
Example
Default
Optional/Required
Notes
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:
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.
1THREAD1 - POST /services/apexrest/{namespace}/v3/admin/catalogs/catalog1/offers/Product1/containsoffer2THREAD2 - POST /services/apexrest/{namespace}/v3/admin/catalogs/catalog1/offers/Product1/containsoffer3......4THREAD100 - POST /services/apexrest/{namespace}/v3/admin/catalogs/catalog1/offers/Product1/containsoffer5THREAD101 - POST /services/apexrest/{namespace}/v3/admin/catalogs/catalog1/offers/Product2/containsoffer6......7THREAD10000 - POST /services/apexrest/{namespace}/v3/admin/catalogs/catalog1/offers/Product100/containsoffer
HTTP Headers
Header
Description
Content-Type
application/json
Response Body
This example shows products and promotions that contain a given offer in their hierarchy and also qualifies under the given context combination.