API overview

Authentication, base URL, and getting started.

Overview

Katura provides a comprehensive REST API for managing your store programmatically. The API powers both the admin panel and the customer-facing storefront.

API architecture

Katura's API is built with Next.js Route Handlers:

  • Admin API β€” routes under /api/admin/* (requires authentication + role check)
  • Storefront API β€” routes under /api/* (public or customer-auth required)
  • Webhook API β€” routes for receiving webhooks from Stripe, Shopify, etc.

Admin API endpoints

The admin API has 60+ route groups covering:

GroupEndpoints
ProductsCRUD operations, variants, images, bulk operations
OrdersList, create, update status, assign sales rep
CustomersList, create, update, import/export
CollectionsCRUD, product management, sort order
CRMDeals, pipeline stages, contacts, notes
MarketingEmail campaigns, promotions, segments
PayrollRuns, periods, employees, reports
WholesaleAccounts, leads, settings
AnalyticsRevenue, products, customers, team performance
SettingsStore config, payment, shipping, notifications

Authentication

Admin API routes require a valid session token from Supabase Auth. The middleware checks authentication on every request and verifies the user's role meets the minimum requirement for the endpoint.

Note

The API uses the same Prisma models as the admin UI, so data is always consistent. There's no separate API database or sync process.

Was this article helpful?

API Overview β€” Authentication & Getting Started | KATURA