Store Rating in JSON format

We are now providing Store Rating info in JSON format. It can be used to get that data and instead of scraping them from DOM, you can access them directly.
We kept the same URL, but from now you can request JSON format when you send header content-type: application/json which make it pretty easy if you are using this URL now.

Example
JavaScript – try e. g. on Classic: https://classic.shoptet.cz/

const request = await fetch('/cache/hodnoceni-obchodu/', {headers: {'Content-Type': 'application/json'}}); request.json().then(response => console.log(response));

Curl

curl -H "content-type: application/json" https://classic.shoptet.cz/hodnoceni-obchodu/strana-2/

NOTES
Do not forget the trailing slash, you wouldn’t get JSON otherwise.
You get an empty array [] when you request an empty page (e. g. /hodnoceni-obchodu/strana-1000).

Post navigation