Skip to main content

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. Send Authorization: Bearer <token> with every request; see Authentication.
  • JSON field names and parameters are in snake_case. Two older parameters, asOf and afterSku, 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 (Z or +01:00), as in 2026-12-01T00:00:00+01:00. Fractional seconds are optional. A date without a time, such as 2026-12-01, is refused with 400, 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's vat_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's percent_of_base and 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's vat_precision to 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) or asOf (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 with as_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:

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

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

json
{ "error": "quota_exceeded", "entity": "price", "current": 1000000, "max": 1000000, "message": "Tier quota exceeded for price (1000000/1000000). Delete unused entries or upgrade the tier." }
StatusMeaningWhat to do
400The request is invalid: a missing or malformed field, an unknown currency, a rule that does not compileFix the request. message says what is wrong.
401No token, or a token that is expired, malformed or for another tenantFetch a new token and retry.
403The 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 consoleDo not retry. Use a key with the permission.
404The entity does not exist at as_of, or there is no such endpoint
405The endpoint exists, but not with this method
410A change log position that the log no longer holdsResynchronise; see Change events.
413The request exceeds the maximum size of one requestSplit it; retrying will not help. See Rate limits.
422Your plan's quota of articles, pricelists or prices is fullSee Plan and limits.
429You have used up your rate limit for nowWait Retry-After seconds, then retry.
500An error on our sideRetry later; contact support if it persists.
503The engine is starting, restoring a backup or switching over, or (for a write) its storage is nearly fullWait 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.