Themes API
Total endpoints: 109
Source: routes/store-templates.js
/api/store-templates/public/list═══════════════════════════════════════════════════════════════════
/api/store-templates/admin/listAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/admin/:idAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/admin/:idAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/admin/:id/toggleAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/admin/reorderAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/admin/purchasesAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/create-orderAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/verify-paymentAuth Required═══════════════════════════════════════════════════════════════════
/api/store-templates/selectAuth Required═══════════════════════════════════════════════════════════════════
Source: routes/theme-editor.js
/api/storefront/resolve-domainGET store slug by custom domain (for custom domain resolution)
/api/storefront/:store_slug/themeGET published theme config
/api/storefront/:store_slug/menusGET all menus for a store
/api/storefront/:store_slug/menus/:handleGET single menu by handle (checks theme_menus first, then falls back to store_menus)
/api/storefront/:store_slug/pagesGET all published pages for a store (title, slug only)
/api/storefront/:store_slug/pages/:slugGET single published page by slug
/api/storefront/:store_slug/products/:slugGET single product by slug (public — storefront)
/api/storefront/:store_slug/collections/:slugGET collection by slug (public — storefront) with filter, sort, pagination
/api/storefront/:store_slug/searchGET search products (public — storefront search)
/api/storefront/:store_slug/collection-productsGET collection products for editor preview (public — storefront, lightweight)
/api/storefront/:store_slug/widget-productsGET widget products — dynamic product source for page builder Products widget
/api/storefront/:store_slug/widget-products/searchGET search products for widget picker (editor — product search for manual selection)
/api/storefront/:store_slug/widget-collectionsGET collections list for widget picker (editor — collection dropdown)
/api/storefront/:store_slug/media-itemsGET media items for mega menu (public — storefront)
/api/storefront/:store_slug/policiesGET policies for storefront (public — no auth)
/api/storefront/:store_slug/notify-restockPOST notify-restock (public — storefront, optional customer auth)
/api/theme-editor/extend-tokenThe editor calls this with its current valid JWT to get a fresh one.
/api/theme-editor/configAuth RequiredGET draft config
/api/theme-editor/configAuth RequiredPUT full config (save entire draft)
/api/theme-editor/config/sectionAuth RequiredPATCH update single section
/api/theme-editor/config/sectionAuth RequiredPOST add section
/api/theme-editor/config/sectionAuth RequiredDELETE remove section
/api/theme-editor/publishAuth RequiredPOST publish (copy draft → published)
/api/theme-editor/historyAuth RequiredGET history list (paginated)
/api/theme-editor/history/:idAuth RequiredGET single history entry (full config snapshot)
/api/theme-editor/global-settingsAuth RequiredPUT global settings
/api/theme-editor/renameAuth RequiredPUT rename theme
/api/theme-editor/menusAuth RequiredGET all menus (authenticated - for editor)
/api/theme-editor/menus/:idAuth RequiredGET single menu (authenticated)
/api/theme-editor/menusAuth RequiredPOST create menu
/api/theme-editor/menus/:idAuth RequiredPUT update menu
/api/theme-editor/menus/:idAuth RequiredDELETE menu
/api/theme-editor/delete-imageAuth RequiredDELETE image from R2
/api/storefront/:store_slug/payment-methodsGet active payment methods for a store (public — keys only, no secrets).
/api/storefront/:store_slug/checkout/validate-cartValidate cart items (stock check + product status).
/api/storefront/:store_slug/checkout/shipping-ratesShipping rates — returns store's shipping config.
/api/storefront/:store_slug/checkout/apply-discountApply discount code (public — uses store_slug to scope).
/api/storefront/:store_slug/checkout/create-razorpay-orderCreate Razorpay order — credentials stay server-side.
/api/storefront/:store_slug/checkout/place-orderPlace order — verify payment + create order + update inventory + notify.
/api/storefront/:store_slug/customer/login═══════ STOREFRONT CUSTOMER ENDPOINTS ═══════
/api/storefront/:store_slug/customer/registerCreate or update storefront customer register
/api/storefront/:store_slug/customer/register/verifyCreate or update storefront customer register verify
/api/storefront/:store_slug/customer/profileGet storefront customer profile
/api/storefront/:store_slug/customer/ordersGet storefront customer orders
/api/storefront/:store_slug/customer/orders/:order_idGet storefront customer orders
/api/storefront/:store_slug/customer/profile── Update customer profile ──
/api/storefront/:store_slug/customer/addressesGET addresses
/api/storefront/:store_slug/customer/addressesPOST create address
/api/storefront/:store_slug/customer/addresses/:address_idPUT update address
/api/storefront/:store_slug/customer/addresses/:address_idDELETE address
Source: routes/theme-marketplace.js
/api/marketplace/themesList published themes with pagination, filtering, sorting
/api/marketplace/themes/:theme_slugSingle theme detail
/api/marketplace/themes/:theme_slug/reviewsPaginated reviews for a theme
/api/marketplace/featuredFeatured themes
/api/marketplace/categoriesCategories with counts
/api/marketplace/store-theme-info/:store_slugAuth RequiredGet developer info for installed theme on a store
/api/marketplace/themes/:theme_slug/installAuth RequiredCreate or update marketplace themes install
/api/marketplace/themes/:theme_slug/activateAuth RequiredActivate an installed theme on a store
/api/marketplace/themes/:theme_slug/uninstallAuth RequiredUninstall a theme (cannot uninstall active theme)
/api/marketplace/my-themesAuth RequiredList installed themes for a store
/api/marketplace/developer/themesCreate a new marketplace theme listing
/api/marketplace/developer/themes/:theme_slugUpdate theme metadata
/api/marketplace/developer/themes/:theme_slug/versionsSubmit a new version
/api/marketplace/developer/my-themesList developer's themes
/api/marketplace/developer/themes/:theme_slugDelete developer theme (only if 0 installs)
/api/marketplace/developer/themes/:theme_slugDeveloper theme detail with all versions
/api/marketplace/developer/themes/:theme_slug/save-draftSave draft (persist workspace: config JSONB + code files)
/api/marketplace/admin/pending-reviewsAuth RequiredList pending reviews
/api/marketplace/admin/terminated-themesAuth RequiredList terminated/suspended themes for admin
/api/marketplace/admin/themes/:theme_slug/restoreAuth RequiredLift termination early (admin can restore before expiry)
/api/marketplace/admin/themes/:theme_slug/versions/:version_idAuth RequiredView full config for review
/api/marketplace/admin/themes/:theme_slug/versions/:version_id/approveAuth RequiredApprove a version
/api/marketplace/admin/themes/:theme_slug/versions/:version_id/rejectAuth RequiredReject a version
/api/marketplace/admin/themes/:theme_slug/terminateAuth RequiredTerminate a theme permanently (admin only)
/api/marketplace/themes/:theme_slug/create-orderAuth RequiredCreate Razorpay order for a paid theme
/api/marketplace/themes/:theme_slug/verify-paymentAuth RequiredVerify payment and auto-install theme
/api/marketplace/themes/:theme_slug/purchase-statusAuth RequiredCheck purchase status
/api/marketplace/themes/:theme_slug/reviewsAuth RequiredSubmit or update a review
/api/marketplace/themes/:theme_slug/reviewsAuth RequiredDelete own review
/api/marketplace/my-themes/updatesAuth RequiredCheck for available updates across installed themes
/api/marketplace/themes/:theme_slug/updateAuth RequiredApply theme update
/api/marketplace/developer/themes/:theme_slug/export/:version_idExport a theme version as .ggp
/api/marketplace/developer/themes/:theme_slug/importImport a .ggp file as a new version
/api/marketplace/developer/export-store-configExport a store's current config for packaging
/api/marketplace/developer/preview-configAuth RequiredSave preview config (authenticated developer)
/api/marketplace/developer/preview-config/:idUpdate existing preview session (avoids creating new rows on each file change)
/api/marketplace/preview/:preview_idFetch preview config (public — used by theme renderer iframe)
/api/marketplace/developer/bank-detailsGet bank details
/api/marketplace/developer/bank-detailsSave/update bank details
/api/marketplace/admin/verify-bank/:developer_idAuth RequiredAdmin: verify bank details
/api/marketplace/admin/bank-verificationsAuth RequiredAdmin: list all bank verification requests
/api/marketplace/developer/earningsGet developer earnings summary + recent transactions
/api/marketplace/developer/request-payoutRequest payout
/api/marketplace/admin/payoutsAuth RequiredList payout requests (filterable by status)
/api/marketplace/admin/payouts/:payout_id/processAuth RequiredMark payout as processing
/api/marketplace/admin/payouts/:payout_id/completeAuth RequiredComplete a payout
/api/marketplace/admin/payouts/:payout_id/failAuth RequiredFail a payout (revert earnings to pending)
Source: routes/theme.js
/api/theme/selectAuth RequiredBody: { vendor_id?: number, store?: string, theme: string }
/api/theme/upgrade-requestBody: { vendor_id?: number, store?: string, theme?: string }