API conventions and errors
These conventions apply to every endpoint. The API reference documents each endpoint individually.
Requests
- Base URL:
https://YOUR_TENANT.quantaprice.com/api. SendAuthorization: Bearer <token>with every request; see Authentication. - JSON field names and parameters are in
snake_case. Two older parameters,asOfandafterSku, remain in camel case. - Identifiers are your own business codes: SKU, pricelist code, currency code and tax area. The only id that Quantaprice issues is a webhook's
id, returned when you register the webhook. - Timestamps are RFC 3339 instants: a date, a time and an offset (
Zor+01:00), as in2026-12-01T00:00:00+01:00. Fractional seconds are optional. A date without a time, such as2026-12-01, is refused with400, because it does not say which midnight is meant. The exception is the date of a set of exchange rates, which is a UTC day. Responses are in UTC, with milliseconds when they are not zero. - Amounts are decimal JSON numbers. A numeric string, such as
"12.50", is also accepted. Amounts you write are kept to four decimals, rounded half up. In a calculated price, the VAT is rounded to the currency'svat_precision(two decimals for most currencies), and a rounding profile rounds the price; see Currencies. A stored price is rounded once, when it is delivered: the stored price, a quantity break'spercent_of_baseand the exchange rate are applied exactly, the rounding profile rounds the result (without a profile it is kept to four decimals), and the VAT is calculated from the rounded price. A price calculated when you write, by a price rule, a bundle rule or inheritance into another currency, is stored with four decimals first, like an amount you write, and then rounded at delivery like any other stored price. To deliver prices with four decimals, set the currency'svat_precisionto 4 and use a rounding profile with four decimals, or none.
Time
Most data has a history:
- Reads take
as_of(in a request body) orasOf(as a query parameter) and return the data as of that moment. The default is now. - Writes take a start date, so you can schedule them in advance. A price written with a start date in the past takes effect now.
- Deletes are soft: a deleted entity has a
deleted_at, and its history can still be read withas_of.
See Historical pricing and Scheduled updates.
Writes
Writes of articles, pricelists, prices, currencies, VAT and settings return 202 Accepted; a single write returns an empty body. A few writes return 200 or 201 with a body, such as registering a webhook, writing a bundle rule, and deleting an article or pricelist. Writing or deleting a rounding profile returns 200 with no body. The API reference gives the response of each.
A batch write returns the number of items accepted and lists the items that failed, each with its key and the reason:
{ "accepted": 1, "failed": [ { "sku": "KIT", "pricelist": "base-sek", "message": "Missing required fields" } ] }
A batch is not atomic: the valid items are written even when others fail. When every item fails, the response is 400 with the same body. Which keys identify a failed item depends on the batch; see Loading data.
Paging
Listings are paged in one of two ways.
Numbered pages, for listings such as GET /article, GET /pricelist and GET /price: pass page (starting at 1) and size. The response has items, page and size, and also total, except for GET /price.
Cursors, for change logs and GET /price/skus-for-pricelist/{code}: pass back the previous response's next_cursor until has_more is false. A cursor is opaque: send it back unchanged. See Change events.
Errors
A failed request returns its HTTP status and this body:
{
"timestamp": "2026-10-13T09:50:39.798Z",
"status": 404,
"error": "Not Found",
"message": "Article 'SKU-NOPE' not found"
}
error is the name of the status, and message describes what went wrong, for a person to read. Base your error handling on the status code, not on the message text. Some errors include more: 429 has retry_after, 413 has max_items_per_request, and 422 has its own body:
{ "error": "quota_exceeded", "entity": "price", "current": 1000000, "max": 1000000, "message": "Tier quota exceeded for price (1000000/1000000). Delete unused entries or upgrade the tier." }
| Status | Meaning | What to do |
|---|---|---|
400 | The request is invalid: a missing or malformed field, an unknown currency, a rule that does not compile | Fix the request. message says what is wrong. |
401 | No token, or a token that is expired, malformed or for another tenant | Fetch a new token and retry. |
403 | The request is not allowed: the token lacks the permission it needs (Missing required scope: price:write), a setting your plan does not include, or an action that only a signed-in person can take in the console | Do not retry. Use a key with the permission. |
404 | The entity does not exist at as_of, or there is no such endpoint | |
405 | The endpoint exists, but not with this method | |
410 | A change log position that the log no longer holds | Resynchronise; see Change events. |
413 | The request exceeds the maximum size of one request | Split it; retrying will not help. See Rate limits. |
422 | Your plan's quota of articles, pricelists or prices is full | See Plan and limits. |
429 | You have used up your rate limit for now | Wait Retry-After seconds, then retry. |
500 | An error on our side | Retry later; contact support if it persists. |
503 | The engine is starting, restoring a backup or switching over, or (for a write) its storage is nearly full | Wait Retry-After seconds, then retry. |
Retry a 429 or 503 with the same request. Article, pricelist and price writes replace the existing data, so sending one twice does no harm.
Caching
Do not cache prices. A price can change at any moment: when a scheduled change takes effect, a parent pricelist changes or an exchange rate is updated. A query is fast enough to make on every page view, and always returns the price in force now.
GET /price/{sku}/{pricelist}/{tax_area} returns an ETag. Send it back in If-None-Match to get 304 Not Modified, with no body, while the price is unchanged.