Promotion Wrapper API

The Promotion Wrapper API takes the promotion Id (offerId) as input in the URI and populates the promotion wrapper in the cache. You must execute this API for each Promotion offerId that you received in the response of the Catalog Profile API. The promotion Wrapper API is required if you have promotions.

If you are not using any promotions in your catalog, you do not need to perform this API call.

You can obtain the offerId required in the URI of this API from the apiResponse.data.catalogProductRelationDetails.Promotion node in the response body of the Catalog Profile API.

You must first run the the Catalog Profile API to obtain the offerId required in the request body of this API.

/services/apexrest/{namespace}/v3/admin/offers/{offerId}/promotionWrapper

GET

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.

ParameterExampleDefaultOptional/RequiredNotes
effectiveStartTime2001-07-04T12:08:56Current date and timeOptionaleffectiveStartTime 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.
expirationTime2001-07-04T12:08:56effectiveStartTime + TimeToLiveOptionalexpirationTime 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:

This is an example of how you invoke the API using Apex:

You can run this API in parallel for multiple offers. For example, if there are 10 catalogs (Catalog1, Catalog2..Catalog 10) and each catalog has 100 offers, you can run this API for all 1,000 offers in parallel threads.

HeaderDescription
Content-Typeapplication/json

This example contains promotion offer IDs.

CodeDescription
200OK
500Internal Server Error