/v1/substance/convert
Requires API key
Convert between mass and volume via query parameters
Identical behaviour to POST /v1/substance/convert, using query parameters instead of a JSON body. Requires the Developer plan or higher.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value
|
string | Yes | Decimal amount as a string (e.g. "1") |
from
|
string | Yes | Mass or volume unit identifier |
to
|
string | Yes | Mass or volume unit identifier |
substance
|
string | Yes | Substance id from GET /v1/substances (e.g. "ethanol") |
decimals
|
integer | No | Round the result to this many fractional places (0-40, half-even). |
format_locale
|
string | No | Language tag such as de-DE. Adds a formatted display string to the result. |
Possible errors
INVALID_REQUEST
·
INVALID_VALUE
·
UNKNOWN_UNIT
·
UNKNOWN_SUBSTANCE
·
INCOMPATIBLE_UNITS
·
OUT_OF_RANGE
·
PLAN_REQUIRED
·
UNAUTHORIZED
·
INVALID_API_KEY
·
RATE_LIMIT_EXCEEDED
·
QUOTA_EXCEEDED