Skip to main content
Sandbox caches API responses for frequently requested data. Cached responses are stored for 24 hours and served without additional charges to your wallet.
Cached responses do not incur wallet charges.

Controlling cache behavior

Use the X-Accept-Cache header to control whether you want cached or fresh data:
X-Accept-Cache
boolean
Controls cache behavior for the request:
  • true — Return cached response if available
  • false — Bypass cache and fetch fresh data from origin
Default: If omitted, returns fresh data from origin
curl -X POST 'https://api.sandbox.co.in/endpoint' \
     -H 'x-api-key: YOUR_API_KEY' \
     -H 'authorization: YOUR_ACCESS_TOKEN' \
     -H 'X-Accept-Cache: true'

Cache status header

The X-Cache response header indicates the caching status:
X-Cache valueDescription
Hit from CloudfrontResponse served from cache
Miss from CloudfrontFresh response, now cached for future requests
Error from CloudfrontNon-2XX response, not cached
Cache propagation across servers may take a moment. The response might not be cached immediately after the first successful request.