About this endpoint
What it does
Converts a numeric value from one measurement unit to another compatible unit. It takes the input value, source unit, and target unit as query parameters, and returns a JSON object describing the conversion input and computed result.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| value | Number | Yes | Numeric value to convert. |
| from_unit | String | Yes | Source measurement unit. |
| to_unit | String | Yes | Target measurement unit. |
Response
Returns a JSON object with to, from, value, and result fields. to and from are strings, value is the input number, and result is the converted number.
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| to | String | No | Target unit. |
| from | String | No | Source unit. |
| value | Number | No | Input numeric value. |
| result | Number | No | Converted numeric result. |