Search Documentation

Search for a documentation page...

Price Lists API

REST API endpoints for creating and managing price lists that give a group of shoppers, or a wholesale client, their own prices.

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:

KindUsed forNeeds module
storefrontAttached to a cart by your storefront with priceListId on POST /api/v1/carts: a price test, member prices, a price per traffic channelGroup Pricing
wholesaleAssigned to a wholesale client, who buys at its prices in the buyer panelWholesale

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 and Set custom prices with 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

FieldTypeDescription
idstringUUID
namestringMerchant-facing name, e.g. "Price B"
kindstringstorefront or wholesale
discountPercentnumberWhole-number percent off the catalog net price (0-100). Fixed prices win over it
clientCountnumberWholesale clients assigned to the list (always 0 for a storefront list)
overrideCountnumberNumber of variants with a fixed price
archivedbooleanWhether the list is archived
archivedAtstring | nullISO 8601 date-time it was archived, or null
pricesobject[]Only on a single list (get, create, update, restore, replace prices): { productVariantId, price }, price in major units, net
createdAtstringISO 8601 date-time
updatedAtstringISO 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

ParameterTypeDefaultDescription
kindstring–storefront or wholesale. Default: every kind whose module is on
includeArchivedbooleanfalseInclude archived lists
limitnumber50Lists per page (1-100)
offsetnumber0Lists to skip
curl \
-H "Authorization: Bearer your_api_key" \
"https://your-store.yns.store/api/v1/price-lists?kind=storefront"

Response

{
"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

FieldTypeRequiredDescription
namestringYes1-120 characters
kindstringNostorefront (default) or wholesale. Fixed once created. Each kind needs its module, or the request answers 403
discountPercentnumberNoWhole number 0-100, default 0
pricesobject[]NoUp 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.

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)

{
"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.

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

FieldTypeRequiredDescription
namestringNo1-120 characters
discountPercentnumberNoWhole number 0-100
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

{
"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.

FieldTypeRequiredDescription
pricesobject[]YesUp to 2,000 entries: { productVariantId, price }, price net in major units. If a variant appears twice, the last entry wins
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

{
"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.

{
"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.

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

Errors

StatusWhen
400Invalid body or query, a variant id not in this store ("Unknown product variants: …"), or a duplicated variant
403The 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
404No 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.