Preview vs Live tier, resource caps, and Stripe-triggered promotion
/admin/api/tier
Return the shop's current tier, resolved resource caps, live usage counters, and Stripe connection status. Usage counters fall back to 0 (with a warning log) if a query fails so the response always returns 200.
{
"tier": "preview",
"limits": {
"max_products": 100,
"max_media_bytes": 262144000,
"max_single_file_bytes": 10485760,
"max_digital_bytes": 10485760,
"custom_domain": false
},
"usage": {
"products": 17,
"media_bytes": 48237101,
"digital_bytes": 0
},
"stripe": {
"connected": false,
"charges_enabled": false
}
}
curl "https://yourshop.zeroshop.io/admin/api/tier" \
-H "Authorization: Bearer zspat_..."
import requests
resp = requests.get(
"https://yourshop.zeroshop.io/admin/api/tier",
headers={"Authorization": "Bearer zspat_..."}
)
state = resp.json()
if state["tier"] == "preview":
remaining = state["limits"]["max_products"] - state["usage"]["products"]
print(f"{remaining} more products before the Preview cap")
const resp = await fetch(
"https://yourshop.zeroshop.io/admin/api/tier",
{ headers: { "Authorization": "Bearer zspat_..." } }
);
const state = await resp.json();
// state.tier === "preview" | "live"
require "net/http"
require "json"
uri = URI("https://yourshop.zeroshop.io/admin/api/tier")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer zspat_..."
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
state = JSON.parse(resp.body)
We value your privacy
We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.