Documentation

API URL


GET /convert

Headers
Code
Content-Type: application/json
Query Parameters


Example GET 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": {
    "original": {
      "value": 100,
      "unit": "meters",
      "category": "length"
    },
    "converted": {
      "value": 328.084,
      "unit": "feet",
      "category": "length"
    },
    "conversion_factor": 3.28084,
    "precision": 6
  },
  "meta": {
    "correlation_id": "conv_abc123",
    "processing_time": "5ms",
    "timestamp": "2026-04-06T00:00:00.000Z"
  }
}

Error Response

Example
Code
400 INVALID_UNIT – if unit is unknown or unsupported
400 INCOMPATIBLE_UNITS – if units are from different categories
400 INVALID_INPUT – if value is missing or wrong type

Last Updated:  May 4, 2026