Shop States
The Dukanext API reflects the shop's current operational state on every request. Your theme must handle all possible states before rendering any shop UI.
States
Active
Normal operation. All endpoints return data as expected.
Under Development (Maintenance Mode)
The merchant has put the shop into maintenance mode. The API returns HTTP 403:
{
"status": "failed",
"message": "Shop under development",
"code": "SHOP_UNDER_DEVELOPMENT"
}
What your theme must show: A branded coming-soon or maintenance page. Do not render any product data, prices, or shop UI, or attempt to call any other endpoint.
Billing Invalid
The merchant's subscription has lapsed. The API returns HTTP 403:
{
"status": "failed",
"code": "SHOP_BILLING_INVALID"
}
What your theme must show: A branded coming-soon or maintenance page. Do not render any product data, prices, or shop UI, or attempt to call any other endpoint.
Handling states on every page load
The first call your theme makes on every page load must be to the health endpoint. Any non-200 response means the shop is not ready — redirect immediately and stop:
async function checkHealth() {
const res = await fetch(`${BASE_URL}/settings/health`, { headers: API_HEADERS });
if (!res.ok) {
return redirect('/coming-soon'); // or whatever your branded page route is
}
return res.json(); // { status: 'ok', name, id }
}
No other endpoint should run until the health check passes. See Shop Health Check for the full gate pattern.
Required page
Your theme needs a branded coming-soon or maintenance page — shown whenever the health check fails. The route is your choice. It must render with no API calls whatsoever.
See Required Pages for the full checklist.