Custom Review Display Widget: Quick Overview of API and Guidelines
Custom Widget: Quick Overview of API and Guidelines
Server Side API Calls
All API calls need to be made server side to ensure security. By doing so, it will ensure your private API key is not exposed on your website and can also help improve page load speeds/decrease network costs.
Caching Calls
Caching is the temporary storage of frequently needed data. A cache is an intermediary between a data consumer and the data origin. Each time a data consumer needs data it will check the cache first to see if it can provide the data — if not the data will be fetched from the
origin source and saved in the cache. A cache will store data until a predetermined criteria is met (time limit, memory usage, etc), after which the data will be evicted from the cache to make room for new data.
When displaying custom integrations on site, the recommended approach is to cache the data. Caching increases performance and reliability. Performance is increased because the source of cached data can be closer to the consumer and the cache can process duplicated requests for data, saving unnecessary computations and network traffic. Reliability is increased because the data consumer is isolated from service interruptions from origin.
Webhooks
A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer.
Webhooks are a great way to get data in real time without making direct calls to the Trustpilot API. This will ensure you get your data instantly without draining resources. You can see more details here: Stay up to date with your reviews using Trustpilot's Webhook Notifications.
0 comments
Sort by