Skip to content

Format Address

Format and standardize address data for use with Last Mile Intelligence.

formatAddress

transformations

ParameterTypeRequiredDefaultDescription
Address DataJSONYes-Raw address data to format
Output FormatstringNostandardOutput format (standard, compact, full)
FieldTypeDescription
streetstringStreet address line
street2stringAdditional address line
citystringCity name
statestringState code or name
zipstringZIP or postal code
countrystringCountry code or name
{
"success": true,
"formatted": {
"line1": "123 Main Street",
"line2": "Suite 100",
"city": "Chicago",
"state": "IL",
"zip": "60601",
"country": "US",
"displayAddress": "123 Main Street, Suite 100, Chicago, IL 60601"
}
}
{
"success": false,
"error": "Invalid address data",
"details": {
"missing": ["city", "state"]
}
}
  • Missing Required Fields: Address missing city, state, or zip
  • Invalid State Code: State code not recognized
  • Invalid ZIP Format: ZIP code format is invalid