Skip to main content
POST
https://app.leafpress.io
/
unit
Set Default Units
curl --request POST \
  --url https://app.leafpress.io/unit \
  --header 'Authorization: Basic <encoded-value>'
Sets default units for resources (electricity, water, gas, waste, fuel, district heating, or currency) for user.

Request Params

None

Request Body

units
object
An object specifying the default units for various resources / currency. The units must be on this list and in the specified abbreviation.
units.electricity
string
Default unit for electricity (e.g., kwh, mwh).
units.water
string
Default unit for water (e.g., gal, liters).
units.gas
string
Default unit for gas (e.g., cubic meters, therms).
units.waste
string
Default unit for waste (e.g., kilograms, tons).
units.fuel
string
Default unit for fuel (e.g., liters, gallons).
units.district_heating
string
Default unit for district heating (e.g., kWh, MWh).

Approved Unit Abbreviations

af btu ccf cgal cubic yards dekatherms ft3 ft^3 ft³ gal gigaliters gj hcf kbtu kcf kcm kgal kj l liters m3 m^3 mcf megaliters mgal milliliters mj mmbtu tgal therms aed ars aud bdt canadian dollar clp cop dkk dollar egp euro franc hkd idr inr mxn myr nok nzd pen php pkr pound real rub sar sek sgd thb try vnd won yen yuan zar barrel metric ton mg tons ton hours gwh mbtu dth kwh mwh ton

Response

None