Skip to content
HALOWERK

Text Tools

locale length use case switch

Measurement usage comparison identifies unit and rounding changes when a length is displayed for two purposes. Use it when an agent needs moving a measure between route and general-purpose text.

POST https://text.halowerk.com/v1/locale-length-use-case-switch

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
regionstringYes
usagestringYes
other_usagestringYes
metresnumberYes
Show full input schema
{
  "type": "object",
  "properties": {
    "region": {
      "type": "string",
      "maxLength": 12,
      "minLength": 1
    },
    "usage": {
      "type": "string",
      "maxLength": 40,
      "minLength": 1
    },
    "other_usage": {
      "type": "string",
      "maxLength": 40,
      "minLength": 1
    },
    "metres": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000000
    }
  },
  "required": [
    "region",
    "usage",
    "other_usage",
    "metres"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "region": "US",
  "usage": "road",
  "metres": 51,
  "other_usage": "default"
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "first": {
          "type": "string"
        },
        "second": {
          "type": "string"
        },
        "unit_changes": {
          "type": "boolean"
        },
        "rounding_changes": {
          "type": "boolean"
        }
      },
      "required": [
        "first",
        "second",
        "unit_changes",
        "rounding_changes"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub →