UnifyUnits Developers
POST /v1/batch Requires 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.

Prefer a language client when available: JavaScript / TypeScript, Python, or PHP (Laravel). Samples on this page stay raw HTTP so they match the OpenAPI contract.

Parameters

Name Type Required Description
conversions array Yes Array of { value, from, to, decimals? } objects (max 100)
format_locale string No Language tag such as de-DE. Adds a formatted display string to the result of every successful item. Requires the Developer plan or higher.

Possible errors

PLAN_REQUIRED · BATCH_LIMIT_EXCEEDED · INVALID_REQUEST · PAYLOAD_TOO_LARGE · UNSUPPORTED_MEDIA_TYPE · UNAUTHORIZED · INVALID_API_KEY · RATE_LIMIT_EXCEEDED · QUOTA_EXCEEDED · SERVICE_UNAVAILABLE

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 }
}