Core concepts
Units and currency
Quantities are stored in the product's unit and prices in the record's currency; totals are converted to the installation's base currency.
Solk is built for industrial sales: an opportunity's value is often calculated as monthly quantity × unit price, and different products are sold in different units (kg, ton, liter, piece, m²…).
Units
- The installation's base unit is a company-wide setting (e.g.
kg); company potential and dashboards are expressed in this unit.GET /api/v1/me→app.unit_default; enabled units are inapp.units. - Each product can have its own unit. In opportunity responses,
unit(e.g.lt),unit_code, and the price unitpu(e.g.€/lt) reflect the product's unit. - The
_kgsuffix in field names is historical: fields such aspotential_kgandcommit_kghold quantities in the product's or the installation's unit, which isn't always kilograms.
Currencies
- The installation has a base currency (
app.currency_base, e.g.EUR) and a list of enabled currencies (app.currencies). - Each company can have a default transaction currency (
currency_default); opportunities and quotes carry their own currency (currency,cur_sym). - Totals and dashboards are calculated from values converted to the base currency:
value_baseon opportunities, andvalue_openandbase_currencyin lists.
Exchange rates
Exchange rates are fetched from the Central Bank of the Republic of Türkiye every business day (22 currencies). An admin chooses whether to use the buying or the selling rate, and can manually enter and lock a rate for a given day. Conversion uses the current rate, not the rate on the record's date — so historical reports in the base currency can change as exchange rates change.
Numbers in the API
- Quantities and amounts are JSON numbers (
12000,2.35), with no thousands separators or currency symbols. For display, usevalue_short(e.g."338K","2,46M") andcur_sym. - Send numbers in request bodies as JSON numbers. Strings such as
"2,35"and"1.250,50"are also parsed correctly (Turkish notation: period for thousands, comma for decimals).