Dev Mode
Dev mode is a per-shop toggle that must be enabled before the headless API will respond. It is the on/off switch for API access.
Enabling dev mode
In the shop admin, go to Settings and scroll down to Developer Tools. Toggle Developer Mode on.
Enabling it does three things at once:
- Developer Tools tabs become available, including Content Definitions, API Keys, and Custom URLs
- A Content menu is added to the admin menu under Storefront for populating content entries
- All API routes start responding to authenticated requests
The merchant enables dev mode once during initial setup. It stays on for the life of the theme deployment.
Custom URLs
The Custom URLs tab contains two optional URLs for headless themes:
| Setting | Purpose |
|---|---|
| Payment Return URL | Where a customer is sent after a DukaNext Wallet payment is confirmed successfully. |
| Customer Access Link URL | The page linked from the digital-product email after a digital order is fully paid. |
These settings are used only while Developer Mode is active. If either URL is empty, the normal DukaNext storefront URL is used instead.
Customer access link parameters
When a custom Customer Access Link URL is configured, DukaNext appends these query parameters automatically:
id=<customer-access-link-id>&order=<order-id>&email=<customer-email>
For example, if the configured URL is:
https://theme.example.com/account/access
The email link will look like:
https://theme.example.com/account/access?id=...&order=...&email=...
Your theme should read these values and submit them to POST /access/api/v1/auth/access:
{
"id": "customer-access-link-id",
"email": "customer@example.com",
"order": "order-id"
}
Include the theme API key in the x-api-key header. The response contains a customer JWT, which the theme can use to load the customer's orders and digital downloads through the Orders API.
The three values are appended by the backend and are URL-encoded. Do not remove or rename them when building the custom access page.
What gets unlocked
| Feature | Without dev mode | With dev mode |
|---|---|---|
| All API routes | 403 on every request | Respond normally |
| Content Definitions tab | Hidden | Visible in Settings |
| API Keys tab | Hidden | Visible in Settings |
| Custom URLs tab | Hidden | Visible in Settings |
| Content sidebar menu | Hidden | Visible in admin |
What happens without it
Without dev mode enabled, every request to the API returns HTTP 403:
{
"status": "failed",
"message": "Developer mode is disabled. Enable it in Settings → Developer Tools.",
"code": "DEV_MODE_DISABLED"
}
This applies to all endpoints — products, categories, orders, content, everything.
Toggling dev mode off
If dev mode is toggled off after setup, all API routes stop responding immediately. All data is preserved: API keys, content definitions, and content entries all come back when dev mode is turned back on. Nothing is deleted.
Dev mode vs shop status
Dev mode is separate from the shop's public-facing status. These are two independent settings:
| Setting | What it controls |
|---|---|
| Dev mode | API access — all endpoints are off until this is on |
| Shop status | Whether the shop is open or in maintenance mode |
A shop can have dev mode on while in maintenance mode. In that case the API responds but returns SHOP_UNDER_DEVELOPMENT on most endpoints, which your theme should treat as a coming-soon state.
See Shop States for how to handle each state.