Fits a street address into a country-specific maximum length.
Fits a single street address line into the requested maximum length for the given country. The street is progressively abbreviated using country-specific abbreviation rules (e.g. "Street" -> "St", "Apartment" -> "Apt") until it fits, or until no further abbreviation is possible.
The result.status field indicates the outcome:
- OK — the processed street fits within maxLength. warnings is omitted.
- WARN — the street could not be shortened enough to fit within maxLength, so the best-effort abbreviated street is returned along with a non-empty warnings list.
If the request itself is invalid (missing/blank street, unsupported or unrecognised countryCode, out-of-range maxLength, malformed JSON, etc.) no result is returned; instead a 4xx/5xx response with a non-empty errors list is returned. See the Error Codes table above for the full list.
Request
- Base URL: https://api.cloud.precisely.com
- URL: https://api.cloud.precisely.com/v1/address-fit
- Auth: one of:
- HTTP bearer
- API key in header Authorization
Headers
Optional client-supplied correlation id, echoed back in logs to help trace a single request end-to-end. If omitted, the request is still processed normally.
Request body
Example request
{
"street": "123 Main Street Apartment",
"countryCode": "USA",
"maxLength": 15
}Response
Street address fitted successfully (see result.status for OK/WARN)
Example response
{
"response": {
"status": "OK",
"result": {
"countryCode": "GBR",
"maxLength": 16,
"originalStreet": "123 Some Long Street Name",
"processedStreet": "123 Some Long St",
"originalLength": 25,
"finalLength": 16,
"warnings": [
"Not able to achieve desired max length"
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.