> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joinerywp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Headless WordPress

> Use Joinery prices in Next.js, Nuxt, Astro, a mobile app, or anything that talks to WooCommerce over HTTP.

Joinery calculates prices **on the server**, inside WooCommerce. Nothing depends on a theme or on JavaScript in the browser, so a headless frontend gets the same prices as a classic store.

| You need | Use |
| - | - |
| Cart, checkout and order totals | The WooCommerce [Store API](https://docs.joinerywp.com/headless/store-api.md) cart endpoints. Joinery rules are already applied. |
| "Buy more, save more" tables on product pages | `extensions.joinery.quantity_breaks` on Store API products |
| The price for a quantity, before it's in the cart | [`GET /joinery/v1/price-preview`](https://docs.joinerywp.com/headless/price-preview) |
| Managing rules from your own tools | The [rules endpoints](https://docs.joinerywp.com/api-reference) (requires the `manage_woocommerce` capability) |

## Customers and roles

Rules such as "wholesale customers pay 20% less" depend on who is shopping. The Store API and the price-preview endpoint use the WordPress user of the request:

* **Guests** get guest prices.
* **Signed-in customers** get their prices when the request is authenticated with the WordPress cookie and a nonce, an application password, or JWT if you use a JWT plugin.

> [!NOTE]
>
> Cache price responses per customer group, never across them. A CDN that caches `/wp-json/` for everyone would show one customer's wholesale price to the next.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.