Skip to content

Powered by Grav CMS + Helios Theme

Store

The store-level reads every other call is interpreted against, and the admin scripts the shell fetches.

The reads the admin does before anything else. Bodies are documented in depth on Orders and the admin.

Store configuration

GET /api/v1/kahunacart/config Permission kahunacart.orders.view

Read the store-level facts every other call is interpreted against: the currency and how many decimal places it has, the storefront route, the site languages, the running plugin version, the registered payment providers and what each declares it can do, background job health, and whether the enabled payment methods can actually sell the published catalog. Call this first when you do not know the store's currency or which providers exist.

Response

Carries currency, currency_exponent, the storefront route, the site's languages and default_language, the plugin version, providers keyed by slug with a label and a capabilities list, jobs (pending, failed, oldest_pending_age, stale, stale_after) and provider_coverage (sells_physical, has_physical_provider, digital_only_providers).

Is the store open

GET /api/v1/kahunacart/store/status Permission kahunacart.orders.view

Read whether the store is open, coming soon or paused, and the message shoppers see while it is not open. While it is coming soon or paused, nobody but signed-in staff can buy: the cart, checkout, express pay, the storefront API, MCP and UCP all refuse. Also says whether you may change it. Read-only.

Open, pause or announce the store

POST /api/v1/kahunacart/store/status Permission kahunacart.settings

Set the store to open, coming_soon or paused. Coming soon and paused put a banner on every page and stop every new purchase except by signed-in staff; existing orders, pay links, downloads, webhooks and the worker keep working. Coming soon also keeps the storefront out of search engines. Send a message to change what shoppers are told, an empty message to go back to the standard sentence, or leave it out to keep the current one.

Parameters

Name Type Description
status required string The new status.
One of: open, coming_soon, paused
message optional string What the banner and every refusal say while the store is not open. Empty uses the standard sentence for the status.

List admin sections

GET /api/v1/kahunacart/admin/sections Permission kahunacart.orders.view

List the extra KahunaCart admin screens contributed by other plugins, each with its id, label, icon and sort position. Useful for finding out which add-ons have registered themselves against this store.

Read the sidebar badge

GET /api/v1/kahunacart/badge Permission kahunacart.orders.view

The count of completed orders still awaiting payment, with the health of the job queue alongside it. The admin polls this on sidebar load. No tool: it answers a badge, not a question a client asks.

Get the dashboard widget script

GET /api/v1/kahunacart/admin/widget.js Permission kahunacart.reports

The dashboard widget's own script, served from this plugin's admin directory. It answers 404 while the file does not exist, because the widget is registered whether or not the admin bundle has been built.

Get an admin section script

GET /api/v1/kahunacart/admin/sections/{id}.js Permission kahunacart.orders.view

Serve the web-component source for one contributed admin section, as the bytes are on disk. See Admin sections.

script_path is a server-side detail and never appears in a response; a script is fetched by id instead. Both script routes answer application/javascript with an ETag built from mtime and size, and a conditional GET with 304. A path that resolves outside the plugins directory is refused with 404, and the widget route answers 404 while the file does not exist.