API URL
POST /api/v1/unit-conversion/convert
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
from
required
string
Unit to convert from
to
required
string
Unit to convert to
value
required
number
Numeric value to convert
precision
optional
number
Decimal places to round
Example Request
Code
GET /api/v1/unit-conversion/convert?api_key=YOUR_API_KEY&value=100&from=meters&to=feetSuccessful Response
Status
HTML
200 OKBody
Code
{
"success": true,
"data": {
"from": "kg",
"to": "lb",
"value": 10,
"result": 22.05,
"epochTime": 1780008339
},
"meta": {
"processingTimeMs": 15,
"conversionsCount": 1
},
"correlationId": "1780090219049-l51qbzecm"
}Field
Type
success
boolean
data
object
data.from
string
data.to
string
data.value
number
data.result
number
data.epochTime
number
data.categories
array
data.count
number
data.category
string
data.units
array
meta
object
meta.processingTimeMs
number
meta.conversionsCount
number
meta.timestamp
string
meta.epochTime
number
error
string
message
string
retryAfter
number
correlationId
string
Error Response
Example
Code
400 ValidationError - Missing required from/to/value: Required conversion parameters were not provided
400 ValidationError - Invalid numeric value: Value could not be parsed as number
400 ValidationError - Unknown unit: Unit is not recognized by convert-units
400 ValidationError - Incompatible units: Units belong to different measures and cannot be converted
400 ValidationError - Invalid conversions payload: GET batch conversions parameter is missing invalid or empty
400 ValidationError - Batch size limit exceeded: GET batch includes more than 50 conversions
400 ValidationError - Unknown category: Requested category is not available for units listing
404 NotFound - Unknown route path: Service endpoint not found
429 RateLimitExceeded - Rate limit threshold exceeded: Too many requests in current limiter window
500 InternalServerError - Unhandled runtime exception: Internal server errorLast Updated: May 4, 2026