Skip to content
Netslim
Log in Create account

Purge the cache via the Edge API (stock and prices)

Let your shop, checkout or ERP purge the cache of a product page right away, so your stock is always correct.

1 min read · updated 11 Oct 2026

With the HTML cache of Netslim Edge, pages reach your visitors in milliseconds. If the stock or price of a product changes, you want that page to be fetched again right away. You do that with one request to the Edge API.

Create a key

In your account, go to Edge › Improvements › Purge cache instantly to create an API key. It is shown for 10 minutes, so store it in your own system right away. After that, you only see the last 4 characters.

Request

curl -X POST https://netslim.nl/wp-json/netslim-edge/v1/purge 
  -H "Authorization: Bearer nsle_..." 
  -H "Content-Type: application/json" 
  -d '{"paths": ["/product-a", "/categorie/schoenen/*"]}'
  • paths: up to 5,000 paths per request. A * at the end purges everything below it.
  • urls: full URLs are also allowed.
  • {"all": true}: the entire cache of your site.

What happens

We send the signed request to all our edge servers at the same time. Usually the page is purged everywhere within a second. If that fails on a server for a moment, it happens through the regular configuration within 30 seconds. The response shows how many servers did it right away.

Tips

  • Bundle changes: one request with 500 paths is better than 500 separate requests. Maximum 120 requests per minute.
  • When a product changes, also purge the category pages that list the product.
  • Pages with a cart or login cookie are never served from the cache, so they are always up to date.
Was this helpful?