UnifyUnitsDevelopers
POST/v1/batchRequires API key

Convert up to 100 measurements in one request

Converts multiple independent measurements in a single request. A structurally valid batch returns HTTP 200 even when individual items fail; inspect each item's status field. Item order in the response matches the request.

Parameters

NameTypeRequiredDescription
conversionsarrayYesArray of { value, from, to } objects (max 100)

Possible errors

BATCH_LIMIT_EXCEEDED · INVALID_REQUEST · PAYLOAD_TOO_LARGE · UNSUPPORTED_MEDIA_TYPE · UNAUTHORIZED · INVALID_API_KEY · RATE_LIMIT_EXCEEDED

All endpoints · Error reference

cURL
curl "https://api.unifyunits.com/v1/batch" \
  -X POST \
  -H "Authorization: Bearer $UNIFYUNITS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "conversions": [
      { "value": "1", "from": "ft", "to": "m" },
      { "value": "32", "from": "F", "to": "C" }
    ]
  }'

Response 200

json
{
  "data": [
    {
      "index": 0,
      "status": "success",
      "input": { "value": "1", "unit": "ft" },
      "result": { "value": "0.3048", "unit": "m" },
      "category": "length"
    },
    {
      "index": 1,
      "status": "success",
      "input": { "value": "32", "unit": "F" },
      "result": { "value": "0", "unit": "C" },
      "category": "temperature"
    }
  ],
  "meta": { "total": 2, "succeeded": 2, "failed": 0 }
}