Skip to main content

The price record

A price record holds the price of one SKU on one pricelist from a given start date. Inheritance, bundles, scheduling and history all build on it.

You write the amounts. Quantaprice calculates the sales price from them and returns it with the record.


Writing a price​

Send a price with POST /price, or a list of prices with POST /price/batch:

json
POST /price
{
"sku": "SKU-CHAIR-001",
"pricelist": "retail-sek",
"start_date": "2026-11-01T00:00:00Z",
"price": {
"fields": { "fixed": 2390.00, "cost": 1400.00 }
},
"quantity_breaks": [
{ "quantity_break": 10, "fixed_price": 2190.00 },
{ "quantity_break": 50, "percent_of_base": 0.85 }
]
}
FieldRequiredDescription
skuYesThe article's SKU
pricelistYesThe pricelist code
priceYesThe named amounts, in fields; see Price fields
quantity_breaksNoVolume prices; see Quantity breaks
start_dateNoWhen the price takes effect. Defaults to now; see Start date
remove_future_changesNoIf true, also removes the versions already scheduled after this one

Price fields​

price.fields holds the named amounts you need, in the pricelist's currency. The amounts include VAT on a GROSS pricelist and exclude it on a NET pricelist. There is no fixed schema: you can store fixed, cost, catalog, recommended or any other name that fits your business.

  • Without price rules, the fixed field is the sales price.
  • With price rules, the rules calculate the sales price from the fields; see Price rules.

The sales price is always calculated, so you cannot write it: a price sent with price.sales is rejected with 400.

Quantity breaks​

A quantity break sets a different unit price from a minimum quantity. The price is either fixed_price, an amount, or percent_of_base, a multiplier applied to the sales price (0.85 is 85 %). If a break has both, fixed_price applies. A break without quantity_break, or without either price, is discarded. The multiplier is applied exactly, and the result is rounded once, by the rounding profile: 10.99 × 0.4545 is 4.99 to two decimals, not 5.00.

A price query does not take a quantity. It returns every quantity break, calculated in the same way as the sales price, and you choose the one that applies. For an order quantity, the break with the highest quantity_break that does not exceed that quantity applies. Below the lowest break, the sales price applies. For an example that combines quantity breaks, currency and a customer pricelist in one query, see Multi-currency pricing and price breaks.

Start date​

start_date is when the price takes effect. It defaults to now, and a date in the past also means now. A future start date schedules the change. Writing a new price keeps the previous version, so a query with an earlier as_of still returns it.

Loading data describes the checks applied when a price is written, and the response to a batch.


Reading a price​

GET /price/{sku}/{pricelist} returns the version in force now, or at asOf:

json
GET /price/SKU-CHAIR-001/retail-sek
{
"sku": "SKU-CHAIR-001",
"pricelist": "retail-sek",
"price": {
"fields": { "cost": 1400.0, "fixed": 2390.0 },
"sales": 2390.0
},
"quantity_breaks": [
{ "quantity_break": 10.0, "fixed_price": 2190.0, "percent_of_base": null },
{ "quantity_break": 50.0, "fixed_price": null, "percent_of_base": 0.85 }
],
"meta": {
"inherited": false,
"start_at": "2026-11-01T00:00:00Z",
"updated_at": "2026-10-28T14:02:11.204Z",
"updated_by": "erp-sync"
}
}
FieldDescription
price.salesThe sales price: the pricelist's price for the SKU, in the pricelist's currency, before VAT is calculated for a tax area. It includes VAT on a GROSS pricelist and excludes it on a NET pricelist.
price.fieldsThe amounts as you wrote them.
quantity_breaksThe quantity breaks as you wrote them.
meta.start_atWhen this version took effect, or will take effect.
meta.inheritedtrue if the pricelist inherits the price from its parent; see Inheritance.
meta.updated_at, meta.updated_byWhen the version was written, and by whom.

If the SKU has no price on the pricelist at that moment, the response is 404.

For the price a customer pays, with VAT and in a given currency, use a price query instead: GET /price/{sku}/{pricelist}/{tax_area} for one pricelist, or POST /price/query across several. Both return the sales price excluding and including VAT, rounded, and the quantity breaks calculated in the same way.

How the sales price is calculated​

The same price written on two pricelists:

PricelistPrice ruleprice.fieldsprice.sales
retail-sekNonefixed 2390, cost 14002390.00: the fixed field
margin-sekprices.cost * 1.35fixed 2390, cost 14001890.00: the rule applied to cost

Rules apply only to SKUs that exist as articles. For a SKU without an article, the sales price is the fixed field. When a pricelist's rules change, its sales prices are recalculated from the moment the change takes effect; see Price rules.


VAT, currency and rounding​

A price record holds only amounts. The other inputs to the final price are set elsewhere:

  • Currency and VAT mode are set on the pricelist; see Currencies and Exchange rates.
  • VAT class is set per article and tax area, and is STANDARD unless you set another; see VAT.
  • Rounding is set by a rounding profile; see Rounding.

Inheritance​

A pricelist without its own price for a SKU inherits its parent's price and applies its own rules to it. A price written on the pricelist itself overrides the inherited price for that SKU. See Inheritance.


Summary​

You write a price as named amounts for one SKU on one pricelist, with a start date and optional quantity breaks. Quantaprice calculates the sales price from them, either the fixed field or the result of the pricelist's rules, and returns it as price.sales. The pricelist provides the currency, VAT mode and rules; the article provides the VAT class.