Invalidate Affected Response API

The Invalidate Affected Response API invalidates the cache entries that have become inaccurate due to catalog offer changes. You must pass the cachedAPIResponseIds provided in the invalidateAction node received in the response from the Affected Cache API.

You can obtain the List<cachedAPIChangeIds> or cachedAPIChangeIds required in the request body of this API from the cachedAPIChangeIds node (records.invalidateAction.invalidateCachedResponse.rest.requestBody.cachedAPIResponseIds) in the response body of the Get Affected Cache API.

/services/apexrest/vlocity_cmt/v3/admin/catalogs/regenerate/invalidate

POST

For example: POST /services/apexrest/vlocity_cmt/v3/admin/catalogs/regenerate/invalidate?expirationTime=2021-08-24T12:08:56

ParameterExampleDefaultOptional/RequiredDescription
expirationTime2021-08-24T12:08:56NullOptionalFor the future dated cache. The format is YYYY-MM-DDThh:mm
ParameterData TypeDescriptionOptional/Required
cachedAPIResponseIdsStringcachedAPIResponse Ids that are invalid due to catalog offer changes.Required

cachedAPIChangeIds contain the IDs of the cached API response objects, which could consist of a list of changes.

This is sample input for the ID of the cachedAPIResponse object.

HeaderDescription
Content-Typeapplication/json

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

You can run this API in parallel for different cachedAPIResponseIds. For example, if there are 100 invalidate Action nodes from the GetAffected cache API (INVALID_ACTION1, INVALID_ACTION 2.....INVALID_ACTION100) and each action node contains a list of cachedAPIResponseIds, such as INVALID_ACTION1.CAR1, then you can run parallel threads of Invalidate APIs with each individual invalidate Action node.

The return status indicates success or failure with a reason for the error. For example:

CodeDescription
200OK
500Internal Server Error