thewonderjoy public API
These are the two small public, unauthenticated JSON endpoints used by the marketing pages on this
site. They take no parameters and no key. Everything else under /api is private.
GET /api/public/region
Tells the page which currency to show. The country is read from Cloudflare's
CF-IPCountry request header; the region is india when that country is
IN and international otherwise. The response is sent with
Cache-Control: no-store.
{ "country": "IN", "region": "india" }
| Field | Type | Notes |
|---|---|---|
| country | string or null | Upper-case country code, null when the header is absent |
| region | string | Either "india" or "international" |
GET /api/public/wondersnap-version
The latest WonderSnap marketing version, read from the Sparkle appcast at
https://updates.thewonderjoy.com/wondersnap/appcast.xml so the site can never disagree
with what the updater serves. The value is cached for an hour on the server; on any failure the
cached value, or null, is returned. The response is sent with
Cache-Control: public, max-age=300.
{ "version": "1.0.3" }
| Field | Type | Notes |
|---|---|---|
| version | string or null | Marketing version, null when the appcast has never been read successfully |