> ## 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.

# Store API

> Cart totals and product quantity breaks from the WooCommerce Store API.

## Cart and checkout

The Store API cart (`/wp-json/wc/store/v1/cart`) and checkout total through WooCommerce's own cart, where Joinery applies its rules, so you don't need anything extra:

* Each item's `prices.price` is the unit price after Joinery rules. `prices.regular_price` is the product's regular price, so you can show a strikethrough.
* Cart-wide discounts appear in the cart's `fees` list as a negative fee named **Discount**, and are included in `totals`.

```json Cart item (excerpt) theme={null}
{
  "name": "Oak shelf bracket",
  "quantity": 12,
  "prices": {
    "price": "1080",
    "regular_price": "1200",
    "currency_code": "USD",
    "currency_minor_unit": 2
  }
}
```

## Quantity breaks on products

Products get a `joinery` extension with the unit price from each quantity where it changes, for the current customer. It always starts at quantity 1.

```bash theme={null}
curl https://example.com/wp-json/wc/store/v1/products/10
```

```json Response (excerpt) theme={null}
{
  "id": 10,
  "prices": { "price": "1200", "currency_minor_unit": 2 },
  "extensions": {
    "joinery": {
      "quantity_breaks": [
        { "quantity": 1, "price": "1200" },
        { "quantity": 10, "price": "1080" },
        { "quantity": 50, "price": "960" }
      ]
    }
  }
}
```

Prices are integers in minor units, as strings, like the rest of the Store API: `"1080"` with `currency_minor_unit: 2` is 10.80.

Quantity breaks come from actions that declare them, such as Dynamic Pricing's **Tiered price by quantity**. Every rule condition still applies, so a break only appears when this product's price really changes at that quantity for this customer.


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