Based on the symptoms you’re describing, I think you’re hitting a combination of issues. Let me walk through the complete solution that worked for our implementation.
Postal Code Normalization:
First, ensure postal codes are sent as strings with proper formatting. For US addresses, UKG Pro’s validation expects either 5-digit (“02101”) or 9-digit with hyphen (“02101-1234”) format. Never send as numeric type. The validation engine performs pattern matching that fails on non-string types.
Validation Error Handling:
The Core HR API uses multi-layer validation. Layer 1 is schema validation (data types, required fields), Layer 2 is business rule validation (postal code/state combinations, address type rules). Your error is likely hitting Layer 2. To properly handle this:
PATCH /personnel/v1/employees/{id}/contact-information/addresses/{addressId}
{
"addressType": "HOME",
"addressLine1": "123 Main St",
"city": "Boston",
"stateProvince": "MA",
"postalCode": "02101",
"country": "USA"
}
Key differences from your payload: 1) Use full endpoint path with /contact-information/, 2) Include addressId in path if updating existing address, 3) Use “USA” instead of “US” for country code - UKG Pro internally normalizes to ISO 3166-1 alpha-3, 4) Include addressType in payload.
Address Update API Best Practices:
Always retrieve the current address object first via GET, then modify and send back. This ensures you’re including all required fields that might not be obvious from documentation. Some fields like “effectiveDate” or “addressUsage” may be required depending on your tenant configuration. Also implement exponential backoff retry logic - address validation can occasionally timeout on the third-party validation service.
For bulk updates, consider using the batch API endpoint (/personnel/v1/employees/batch) which provides better error granularity and won’t fail the entire batch if one address has issues. The response includes per-record validation details.
One critical point: if your tenant has USPS address validation enabled (check with your UKG admin), you need to pre-standardize addresses. We implemented a pre-validation step using the USPS API directly before sending to UKG Pro, which reduced our validation failures by 95%. The standardization includes proper abbreviations, casing, and even corrects minor typos that would otherwise fail validation.
Finally, check your API user’s permissions. Some address types (like PAYROLL) require elevated permissions beyond standard HR API access. Your 400 error might actually be a permission issue masked as a validation error.