improved

Improved handling of decimals for prices

In order to lessen the complexity when building integrations, we have decided that all price-related API endpoints for products and BOMs will not take account settings for decimals into account.

Context for this change

We have noticed that strictly following account specific settings for decimals can cause unforeseen difficulties for integrations. To illustrate, take the following case:

  • the Rackbeat account has chosen to allow the following settings for prices:
    • Number of decimals for prices: 2
    • Separator for decimals: comma
    • Separator for thousands: period
  • now there is a discount applied in the webshop and the price ends up having 3 decimals, which is then send to the Rackbeat API
  • if the integration does not take the Rackbeat account settings into account and rounds from 3 decimals to 2 decimals before submitting the price, then the price will end up being wrongly created / updated