Documentation

API URL


POST /api/v1/unit-conversion/convert

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
GET /api/v1/unit-conversion/convert?api_key=YOUR_API_KEY&value=100&from=meters&to=feet

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "data": {
    "from": "kg",
    "to": "lb",
    "value": 10,
    "result": 22.05,
    "epochTime": 1780008339
  },
  "meta": {
    "processingTimeMs": 15,
    "conversionsCount": 1
  },
  "correlationId": "1780090219049-l51qbzecm"
}

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 error

Last Updated:  May 4, 2026