Offers List API

The Offers List API paginates the list of eligible offers for a context combination and ensures the sequence of those offers on each page and the order of pages remain the same for every run of the getOffers API.

The ctxEligibilityCacheKey must be passed in the request body of this API. You can obtain the ctxEligibilityCacheKey required in the request body from the apiResponse.eligibilityContextKey node in the response body of the Context Eligibility API.

You must first the Context Eligibility API to obtain the ctxEligibilityCacheKey required in the request body of this API.

/services/apexrest/{namespace}/v3/admin/catalogs/{catalogCode}/offers

POST

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:

ParameterData TypeDescriptionDefaultOptional/Required
ctxEligibilityCacheKeyStringCache key pointing to the context eligibility record to sort and paginate.N/ARequired

This is a sample request for a context eligibility cache key (ctxEligibilityCacheKey).

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

Each context eligibility result can be processed in parallel. For example, if there are 10 catalogs and each catalog links to 12 context eligibility results, then all 120 results can run in parallel.

HeaderDescription
Content-Typeapplication/json

This example shows a list of eligible offers for a context combination in the correct sequence and order of pages.

CodeDescription
200OK
500Internal Server Error