younifyd
Menu

Cache Purge

Purge the cache for the host specified in the request body.

POST/organizations/{organizationId}/zones/{zoneId}/cachepurge

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Cache Purge action (under Zones (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{cachePurge.response.data}}.

Request

Path parameters

zoneIdstringrequired
organizationIdstringrequired

An identifier for the organization the request is being made by

Request body

Enter the body as JSON in the step's Body field.

pathstring

Path for clearing the cache. Allowed paths follow the format "<hostname>/dw/shop/*/products", "<hostname>/dw/image/v2/{realm}_{instance}/*", "<hostname>/worker.js", "<hostname>/mobify*" or "<hostname>/callback*". Regular expressions and wildcards are not supported in the path.

tagsarray<string>

List of cache tags to purge. When specified, all cached content associated with these tags will be purged.

json
{
  "path": "www.sfcc-ecdn-test5.net/dw/shop/v21_9/products",
  "tags": [
    "product-123",
    "category-456"
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{cachePurge.response.data.<field>}}.

dataobject

Response from a cache purge request

cachePurgedbooleanrequired

The name of the list.

detailsstringrequired

Details of errors if any.

json
{
  "data": {
    "cachePurged": false,
    "details": "1084 : Unable to purge '<url>'."
  }
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Cache Purge — Salesforce Commerce Cloud — Documentation