A price list gives a group of buyers different prices for the same products. It has two parts: a **percentage off** the catalog net price that covers the whole catalog, and optional **fixed prices** per variant that win over the percentage. A fixed price may be above the catalog price, and `0` makes a line free.

Every list has a **kind**, set when it is created and never changed:

| Kind | Used for | Needs module |
|------|----------|--------------|
| `storefront` | Attached to a cart by your storefront with `priceListId` on [`POST /api/v1/carts`](/docs/api-reference/carts#price-lists): a price test, member prices, a price per traffic channel | Group Pricing |
| `wholesale` | Assigned to a wholesale client, who buys at its prices in the buyer panel | Wholesale |

Only a `storefront` list can price a cart, and only a `wholesale` list can be assigned to a wholesale client, so a negotiated wholesale deal never reaches your public checkout. For the merchant's side, see [Charge groups of shoppers different prices](/help/products/group-pricing) and [Set custom prices with price lists](/help/wholesale/price-lists).

**Scopes:** reads need `pricing:read`, every write needs `pricing:write`. These are separate from `wholesale:*` and from `cart:write`, so a storefront key that creates carts cannot read or edit your lists.

**Modules:** each kind answers only while its module is on. With neither Group Pricing nor Wholesale on, every endpoint answers `403`. With only one on, a list of the other kind answers `404`, and creating one answers `403`. Turn Group Pricing on with `PATCH /api/v1/modules` and `{ "groupPricing": true }`; it is included in the Pro plan.

**Money is net, in major units** (`12.5` = 12.50 in the store's currency). A store that shows prices with tax converts the shelf price to net before saving a fixed price.

**Product endpoints keep returning catalog prices.** Read the list and show the group's price on your product pages yourself. The cart is the source of truth for what the shopper pays.

## The Price List object

| Field | Type | Description |
|-------|------|-------------|
| `id` | `string` | UUID |
| `name` | `string` | Merchant-facing name, e.g. `"Price B"` |
| `kind` | `string` | `storefront` or `wholesale` |
| `discountPercent` | `number` | Whole-number percent off the catalog net price (0-100). Fixed prices win over it |
| `clientCount` | `number` | Wholesale clients assigned to the list (always `0` for a `storefront` list) |
| `overrideCount` | `number` | Number of variants with a fixed price |
| `archived` | `boolean` | Whether the list is archived |
| `archivedAt` | `string \| null` | ISO 8601 date-time it was archived, or `null` |
| `prices` | `object[]` | Only on a single list (get, create, update, restore, replace prices): `{ productVariantId, price }`, `price` in major units, net |
| `createdAt` | `string` | ISO 8601 date-time |
| `updatedAt` | `string` | ISO 8601 date-time |

---

## List Price Lists

```
GET /api/v1/price-lists
```

Returns the store's price lists of every kind whose module is on.

### Query Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `kind` | `string` | – | `storefront` or `wholesale`. Default: every kind whose module is on |
| `includeArchived` | `boolean` | `false` | Include archived lists |
| `limit` | `number` | 50 | Lists per page (1-100) |
| `offset` | `number` | 0 | Lists to skip |

```bash
curl \
  -H "Authorization: Bearer your_api_key" \
  "https://your-store.yns.store/api/v1/price-lists?kind=storefront"
```

### Response

```json
{
  "data": [
    {
      "id": "0191abc0-1234-7def-8000-0000000000d1",
      "name": "Price B",
      "kind": "storefront",
      "discountPercent": 0,
      "clientCount": 0,
      "overrideCount": 2,
      "archived": false,
      "archivedAt": null,
      "createdAt": "2026-11-23T20:00:00.000Z",
      "updatedAt": "2026-11-23T20:00:00.000Z"
    }
  ],
  "meta": {
    "count": 1,
    "offset": 0,
    "limit": 50
  }
}
```

---

## Create Price List

```
POST /api/v1/price-lists
```

### Request Body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | `string` | Yes | 1-120 characters |
| `kind` | `string` | No | `storefront` (default) or `wholesale`. Fixed once created. Each kind needs its module, or the request answers `403` |
| `discountPercent` | `number` | No | Whole number 0-100, default `0` |
| `prices` | `object[]` | No | Up to 2,000 fixed prices: `{ productVariantId, price }`, `price` net in major units, `0` or more. If a variant appears twice, the last entry wins |

Drafts are allowed: you can price a variant before it is published. A variant id that isn't in this store's catalog answers `400`.

```bash
curl -X POST \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Price B",
    "kind": "storefront",
    "prices": [
      { "productVariantId": "0191abc0-0000-7000-8000-000000000100", "price": 120 }
    ]
  }' \
  "https://your-store.yns.store/api/v1/price-lists"
```

### Response (201)

```json
{
  "message": "Price list created",
  "priceList": {
    "id": "0191abc0-1234-7def-8000-0000000000d1",
    "name": "Price B",
    "kind": "storefront",
    "discountPercent": 0,
    "clientCount": 0,
    "overrideCount": 1,
    "archived": false,
    "archivedAt": null,
    "prices": [
      { "productVariantId": "0191abc0-0000-7000-8000-000000000100", "price": 120 }
    ],
    "createdAt": "2026-11-23T20:00:00.000Z",
    "updatedAt": "2026-11-23T20:00:00.000Z"
  }
}
```

---

## Get Price List

```
GET /api/v1/price-lists/:id
```

Returns one list with its `prices`. A list of another store, or of a kind whose module is off, answers `404`.

```bash
curl \
  -H "Authorization: Bearer your_api_key" \
  "https://your-store.yns.store/api/v1/price-lists/0191abc0-1234-7def-8000-0000000000d1"
```

The response is the [Price List object](#the-price-list-object), with `prices`.

---

## Update Price List

```
PATCH /api/v1/price-lists/:id
```

Changes the name or the percentage. Send at least one field. The kind never changes.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | `string` | No | 1-120 characters |
| `discountPercent` | `number` | No | Whole number 0-100 |

```bash
curl -X PATCH \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "discountPercent": 10 }' \
  "https://your-store.yns.store/api/v1/price-lists/0191abc0-1234-7def-8000-0000000000d1"
```

### Response

```json
{
  "message": "Price list updated",
  "priceList": { "id": "0191abc0-1234-7def-8000-0000000000d1", "discountPercent": 10, "...": "..." }
}
```

---

## Replace Fixed Prices

```
PUT /api/v1/price-lists/:id/prices
```

Replaces the list's whole set of fixed prices. Variants left out lose their fixed price and go back to the percentage; `{ "prices": [] }` removes every fixed price.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `prices` | `object[]` | Yes | Up to 2,000 entries: `{ productVariantId, price }`, `price` net in major units. If a variant appears twice, the last entry wins |

```bash
curl -X PUT \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prices": [
      { "productVariantId": "0191abc0-0000-7000-8000-000000000100", "price": 125 },
      { "productVariantId": "0191abc0-0000-7000-8000-000000000101", "price": 0 }
    ]
  }' \
  "https://your-store.yns.store/api/v1/price-lists/0191abc0-1234-7def-8000-0000000000d1/prices"
```

### Response

```json
{
  "message": "Price list prices replaced",
  "replaced": 2,
  "priceList": { "id": "0191abc0-1234-7def-8000-0000000000d1", "overrideCount": 2, "prices": ["..."] }
}
```

`replaced` counts the entries after duplicates are removed. Prices come back as stored, rounded to the currency's decimals.

---

## Archive Price List

```
DELETE /api/v1/price-lists/:id
```

Archives the list; lists are never deleted. A `storefront` list stops pricing its carts at once, and its open carts go back to catalog prices. Wholesale clients already on a `wholesale` list keep its prices. Archiving an archived list is not an error.

```json
{
  "message": "Price list archived",
  "id": "0191abc0-1234-7def-8000-0000000000d1",
  "archived": true
}
```

On a list that was already archived, `message` is `"Price list was already archived"` and `archived` is `false`.

---

## Restore Price List

```
POST /api/v1/price-lists/:id/restore
```

Brings an archived list back. Restoring a live list answers `200` with `restored: false`.

```json
{
  "message": "Price list restored",
  "restored": true,
  "priceList": { "id": "0191abc0-1234-7def-8000-0000000000d1", "archived": false, "...": "..." }
}
```

---

## Errors

| Status | When |
|--------|------|
| `400` | Invalid body or query, a variant id not in this store (`"Unknown product variants: …"`), or a duplicated variant |
| `403` | The module for this kind is off: `"Group Pricing module is not enabled"`, with a `hint` that tells you to enable it with `PATCH /api/v1/modules` |
| `404` | No such list in this store, or a list of a kind whose module is off |

## Wholesale address

`/api/v1/wholesale/price-lists/**` keeps working exactly as before, for wholesale lists only and with the `wholesale:*` scopes. It takes no `kind`: everything it creates is a `wholesale` list.