Skip to main content

Price approval

Enterprise feature

Segregation of duties on price changes: the person who sets a price is never the person who makes it live. Many enterprise compliance policies require it, and auditors ask for it. Available when your plan includes price approval; you switch it on with the setting release.required.

With price approval on, a price change does not take effect when it is written. It goes into a price release, a named set of price changes such as the January price release. Nothing reads those prices until the release is published: not price queries, not price reads, not the change feed, not webhooks. Publishing makes every price in the release take effect at the same moment.

A release is published by someone who made none of its changes. The engine enforces it: whoever created the release, wrote a price into it or submitted it cannot publish or reject it. Only a person can publish; an API key cannot. Nothing is exempt, integrations included, so there is no way around the control.


The life of a release​

text
open → submitted → published
↑ │ ↘
└─ withdraw rejected
StepWhoWhat happens
CreateAnyone who writes pricesPOST /release opens a release.
WriteAnyone who writes pricesEvery price write names the release: POST /price?release=2027-01-prices.
SubmitAnyone who writes pricesPOST /release/{code}/submit closes it to further writes.
WithdrawAnyone who writes pricesPOST /release/{code}/withdraw opens a submitted release again.
PublishA person who made none of its changesPOST /release/{code}/publish: its prices take effect together.
RejectA person who made none of its changesPOST /release/{code}/reject with a reason, for good. Its price changes are kept, never applied.
DiscardAnyone who writes pricesDELETE /release/{code} drops an open release's price changes.

While approval is on, a price write without ?release= is refused with 400, and so is a write into a release that is not open. While it is off, ?release= is refused and prices take effect as they always have.


Integrations: load at full speed, approve once​

An ERP or PIM integration creates a release, loads into it with the ordinary price endpoints at full speed, and submits it. Each price is checked as it arrives, so the integration learns at once about an unknown pricelist or article (under strict validation) or a bundle SKU. The prices then wait for a person to publish them.

text
POST /release {"code": "2027-01-prices", "name": "January price release"}
POST /price/batch?release=2027-01-prices [ …thousands of prices… ]
POST /release/2027-01-prices/submit

POST /price, POST /price/batch, DELETE /price and DELETE /price/batch all take ?release=. A price written twice into the same release, for the same SKU, pricelist and start, replaces the first.

Limits on what waits for approval​

A release counts the prices publishing it would write: each price change's own price, the inherited prices on the pricelists below it and the bundle prices built from it (changes on the release). Your plan sets two limits: how many one release may hold (release.max.changes, 1,000,000 by default) and how many all releases not yet published may hold together (release.max.pending.changes, 5,000,000 by default). A price write that would pass either is refused whole with 400 and a message naming the limit, and nothing of it is written; Quantaprice is alerted. Submit the release and write the rest into another, or publish, reject or discard waiting releases first.

Prices waiting in releases count against your plan's price quota as soon as they are written, the same way stored prices do: a price write into a release is refused with 422 once the quota is full. Publishing never is, and a rejected or discarded release no longer counts.


Approving​

GET /release/{code}/preview shows the approver what publishing would change, per price: the price in force now, the new price after the pricelist's rules, the change in percent, and two warnings. The first page also counts them over the whole release.

  • Changed since added: the SKU's price on that pricelist was changed after the change was written, for instance by another release published since. The later publish wins.
  • Would be refused: the price write would refuse it, because its article or pricelist was deleted (under strict validation) or its SKU has become a bundle. When the release is published, such a price is left out and recorded as refused; the rest is published.

In the console, Price releases lists the releases waiting for approval. A release shows this preview with filters for both warnings, and the Publish and Reject buttons, disabled with the reason for someone who made changes in it.


When the prices take effect​

Publishing fixes one moment, effective_at, a few seconds after the publish (a little longer for a large release, and after any release published earlier that has not taken effect yet, so the later publish always wins), and every price in the release that has no later start of its own starts then: its own prices, the copies inherited by child pricelists and the bundles built from them. Before that moment queries see none of the release; from it, all of it. A price change dated later than that keeps its date, so a release can be approved in December for prices that start on 1 January.

A price that equals the one already in force stores nothing new and is recorded in the release as unchanged, so the release still shows it was approved. A price the price write refuses is recorded as refused, and the release counts both. The price's history records who wrote it; the release records who approved it and when.

Publishing runs the ordinary price write: rules, inheritance, bundles, the change feed and webhooks follow exactly as for a price written directly.


The audit trail​

A release keeps, for as long as your tenant exists: who created it, everyone who wrote a price into it, who submitted it, who published or rejected it and why, when its prices took effect (effective_at) and when the last of them was written (live_at), and each price change with its writer and what became of it. The change feed (entity_type=release) also records each step with who took it. A price's history (GET /changes/{pricelist}/{sku}, and History on the price in the console) names, for each version a release wrote, the release and who approved it.


What approval covers​

Approval covers price writes. Changes that reprice without a price write, such as a pricelist's rules or parent, article metadata used by rules, or bundle rules, are not held for approval; who may make them is a matter of permissions.

Approval is switched on and off with the setting release.required, when your plan includes it (Settings in the console, or PUT /settings/release.required). Who may change settings may switch approval off, so keep that permission to the people your policy names. Before switching it on, make sure every integration that writes prices writes into releases.