Why Use a Backend Proxy?
- Hide your Partoo API key from the browser.
- Cache responses to improve performance and lower latency.
- Respect Partoo rate limits by eliminating redundant calls.
- Centralize logging and error handling in a single layer.
Recommended Architecture
For public-facing features—such as Store Locator, Click & Collect. Route all Partoo traffic through a caching proxy: See our Rate Limiting guide for details.Implementation Steps
1
Create a backend proxy
Expose an endpoint—e.g.,
/api/partoo/data in your server or serverless function.2
Add a caching layer
Select a cache store (Redis, Memcached, in-process LRU, or CDN-edge KV).
Set a TTL that matches how often your Partoo data changes—5 minutes is a safe default.
Set a TTL that matches how often your Partoo data changes—5 minutes is a safe default.
After deployment, confirm a second request is served from the cache by inspecting logs or cache metrics.
3
Fetch data from the frontend
Call the proxy instead of Partoo directly.Render the data using your preferred framework (React, Vue, Svelte, etc…).