/v1/convert
Requires API key
Single conversion via JSON body
Identical conversion behaviour to GET /v1/convert, using a JSON request body instead of query parameters. Both methods share the same conversion engine.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value
|
string | Yes | Measurement value as a decimal string |
from
|
string | Yes | Source unit identifier |
to
|
string | Yes | Target unit identifier |
decimals
|
integer | No | Round the result to this many fractional decimal places (0-40, half-even). Omit for the full engine precision string. |
format_locale
|
string | No | Language tag such as de-DE. Adds a formatted display string (for example 1,5 km) to the result next to the exact value. Requires the Developer plan or higher. |
Possible errors
PLAN_REQUIRED
·
INVALID_VALUE
·
UNKNOWN_UNIT
·
AMBIGUOUS_UNIT
·
INCOMPATIBLE_UNITS
·
OUT_OF_RANGE
·
INVALID_REQUEST
·
UNSUPPORTED_MEDIA_TYPE
·
PAYLOAD_TOO_LARGE
·
UNAUTHORIZED
·
INVALID_API_KEY
·
RATE_LIMIT_EXCEEDED
·
QUOTA_EXCEEDED
·
SERVICE_UNAVAILABLE