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.
|expirationTime||2021-08-24T12:08:56||Null||Optional||For the future dated cache. The format is YYYY-MM-DDThh:mm|
|cachedAPIResponseIds||String||cachedAPIResponse 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.
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:
|500||Internal Server Error|