CMS for Headless Commerce: Handling the Content Layer

September 5, 2026 · 6 min read
CMS for Headless Commerce: Handling the Content Layer

Headless commerce splits the store into two systems: a commerce engine that handles carts, checkout, and payments, and a content layer that handles everything else — product storytelling, landing pages, guides, campaigns, the blog. Most teams get the commerce engine right and then jam all their content into it too, which is where sites get slow and rigid. The content belongs in a headless CMS.

This guide explains the role a CMS plays in a headless commerce stack and how to pick one that feeds your storefront cleanly.

What "headless commerce" means for your CMS

In a headless setup, your storefront (React, Next.js, Astro) pulls from two APIs:

  • The commerce engine (Shopify, Medusa, Commerce Layer, etc.) — products, pricing, inventory, cart, checkout.
  • The content layer (a headless CMS) — marketing pages, category descriptions, editorial content, campaign landing pages, the blog.

The CMS doesn't process payments or hold inventory. It holds the words and pages around the store. Keeping content out of the commerce engine keeps both systems lean and lets your marketing team publish without touching the store's checkout code.

The short answer

For the content side of a headless commerce stack, you want a headless CMS with a clean content API and rebuild/update webhooks — one that your storefront fetches from and that notifies your build when content changes.

UnfoldCMS is a self-hosted CMS (Laravel 12 + React 19) with a REST API at /api/v1 and HMAC-signed outgoing webhooks. It handles the content layer — pages, posts, landing pages, menus — while your commerce engine handles transactions. One thing to be clear about up front: UnfoldCMS is not a commerce engine. It doesn't do carts, checkout, or inventory. It's the content half of the stack. Pair it with a real commerce backend.

The division of labor

Here's what each system owns in a clean headless commerce stack:

Concern Owned by
Products, pricing, inventory Commerce engine
Cart, checkout, payments Commerce engine
Category/landing page content CMS
Blog, guides, editorial CMS
Navigation menus CMS
Campaign pages CMS

Your storefront stitches both together. A product page might pull price and stock from the commerce API and rich description, buying guide, and SEO copy from the CMS. This separation is the whole point of going headless — see headless CMS architecture explained.

The content API for a storefront

Your storefront fetches content from the CMS. UnfoldCMS ships a versioned REST API at /api/v1 with public read endpoints (no auth for published content):

  • /api/v1/pages/{slug} — a landing or category-content page
  • /api/v1/posts and /api/v1/posts/{slug} — blog and guides
  • /api/v1/categories/{slug}/posts — content grouped by topic
  • /api/v1/menus/{location} — navigation trees
  • /api/v1/search — content search

It's REST, not GraphQL — there's no GraphQL endpoint. For fetching pages, posts, and menus into a storefront, REST is straightforward. Responses come in a consistent envelope, so your front end handles them uniformly. See what is a content API and CMS with a REST API.

Keeping the storefront in sync

When marketing updates a landing page, the storefront needs to reflect it. If your storefront is statically built, that means a rebuild. UnfoldCMS handles the trigger with built-in webhooks:

  • A WebhookSubscription points at your host's build hook.
  • On content publish/update/delete, the CMS fires a signed POST (HMAC-SHA256) to that URL.
  • Your host rebuilds and redeploys.
  • Delivery attempts are logged so you can debug a missed rebuild.

This is the same mechanism used to rebuild any static front end — see headless CMS webhooks explained. If your storefront renders server-side instead, it just fetches fresh content per request and you may not need the rebuild trigger at all — though you'll want caching in front. See headless CMS rate limiting and caching.

Why self-host the content layer

For a commerce brand, self-hosting the content CMS has specific advantages:

  • No per-API-call metering. A busy storefront makes a lot of content requests. A self-hosted CMS on your own server doesn't bill per call the way some SaaS CMS platforms do.
  • Content stays yours. Your product storytelling and campaigns are marketing assets — keep them on infrastructure you control.
  • Flat, predictable cost. One server, regardless of traffic spikes during a sale.

We cover the pattern in headless CMS for ecommerce and the cost side in self-hosted CMS vs SaaS CMS.

When to reconsider

Be honest about fit. A headless CMS as your content layer may be the wrong call if:

  • You want an all-in-one platform where content and commerce live together — Shopify's native pages or a WordPress + WooCommerce setup is simpler for small stores.
  • You have no front-end build capacity — headless requires a storefront someone maintains.
  • Your content is minimal — if you barely have pages beyond products, the extra system isn't worth it.

Headless commerce shines for brands with real content operations around the store. For a tiny shop, it's overkill.

Frequently asked questions

What is the best CMS for headless commerce?

A headless CMS with a clean content API and rebuild webhooks is best for the content side of a headless commerce stack. UnfoldCMS fits because it serves pages, posts, and menus over a REST API at /api/v1 and fires HMAC-signed webhooks to trigger storefront rebuilds. It handles content, not transactions — pair it with a commerce engine.

Does UnfoldCMS handle carts and checkout?

No. UnfoldCMS is a content CMS, not a commerce engine — it doesn't do carts, checkout, inventory, or payments. In a headless commerce stack it owns the content layer (pages, blog, menus) while a commerce backend like Shopify or Medusa handles transactions.

How does the CMS keep the storefront updated?

Through webhooks. On content publish or update, the CMS fires a signed POST to your host's build hook, triggering a rebuild of a static storefront. If your storefront is server-rendered, it just fetches fresh content per request instead.

Does it support GraphQL for a storefront?

No — the API is REST only, at /api/v1. For fetching pages, posts, categories, and menus into a storefront, REST covers the need.

The takeaway

In headless commerce, keep content out of your commerce engine and in a headless CMS. You need a clean content API and rebuild webhooks — UnfoldCMS provides both and self-hosts so your content stays yours and un-metered. Just remember it's the content half of the stack: pair it with a real commerce backend for carts and checkout.

Related: Headless CMS for ecommerce · Headless CMS architecture explained · Headless CMS webhooks explained

Free & Open Source

Own your CMS. No subscriptions.

Unfold CMS is free to download and self-host. Built on Laravel + React, full source code included.

Share this post:

Discussion

Comments (0)

Leave a Comment

Please log in to leave a comment.

Don't have an account? Register here

No comments yet. Be the first to share your thoughts!

Keep Reading

Related Posts

Back to all posts