Using cache endpoints to share data

Cache endpoints allow you to publish the data you store in Mechanic's cache, making it available via a private JSON API. For more on the cache itself, see Using the cache.

Like webhooks, cache endpoints may be called from your online storefront (and from other origins). This makes for a flexible way to generate, collect, or transform data into something you can pull in to your online customer experiences. Paired with webhooks, you may now send data into Mechanic for processing and then poll the appropriate cache endpoint until processing is complete – a closed loop.

Cache endpoints may be configured in your Mechanic settings:

Enter the cache key of your choice, and save to receive a unique cache endpoint URL. The URL, when accessed, will return a JSON response containing the value associated with that cache key.


If your data can't be reasonably represented with JSON, consider storing a base64-encoded version of your data instead, using the "base64" filter in your task script.

If your data must be stored long-term, or is quite large, consider using the "ftp" action in concert with a service like Couchdrop, to send your data to a more appropriate storage location.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.