Get the last 4 digits of 9-digit ZIP codes
If you build checkout, shipping, or CRM forms for US customers, you've probably run into the ZIP+4 code, the extended, nine-digit US postal format that looks like 90210-1234. The last four digits pinpoint a delivery route down to a specific building, floor, or even a mail slot. Useful for USPS routing, less useful when your order management system, courier API, or CRM only expects a standard five-digit ZIP code.
Fetchify's Address Autocomplete API now supports automatic ZIP+4 exclusion, so every US address lookup can return a clean five-digit ZIP code by default, no regex, no post-processing, no extra code on your end.
ZIP+4 codes help to prevent misdelivered, lost, delayed, and returned mail. Including those last 4 digits of the ZIP Code can reduce delivery time by as much as 2 days.
Why the ZIP+4 format causes problems downstream
US ZIP+4 codes are great for postal routing, but they create friction almost everywhere else in a typical order or address validation flow:
- Courier compatibility: many shipping platforms and courier APIs are built around the standard five-digit ZIP and will reject, truncate, or mangle the +4 suffix, causing failed label creation or delayed fulfilment.
- Address-validation errors at checkout: mismatched or unexpected ZIP formats are a common cause of failed address validation during checkout, especially when the field is validated against a five-digit pattern.
- Messy order and customer data: a consistent five-digit ZIP is far easier to store, deduplicate, and match against records in your CRM, ERP, or accounting software.
- Manual clean-up: without this option, teams end up writing their own string-splitting logic to strip the +4 suffix after every lookup, one more thing to maintain.
How ZIP+4 exclusion works in Fetchify
You can enable ZIP+4 exclusion in either of the two ways you already integrate with Fetchify's USA address lookup API:
1. Calling the Address Autocomplete API directly
Add the usa_exclude_zip_plus4 flag to the extra object on your Find or Retrieve request. Setting it to true strips the plus-four suffix from any US ZIP code in the response:
{
"key": "xxxxx-xxxxx-xxxxx-xxxxx",
"query": "1 Infinite Loop",
"country": "usa",
"extra": {
"usa_exclude_zip_plus4": true
}
}
2. Using the clicktoaddress-js JavaScript library
If you're using Fetchify's clicktoaddress-js library to power an address search box on your site, set the excludeZipPlusFour configuration option to true when you initialize the widget:
new clickToAddress({
accessToken: 'xxxxx-xxxxx-xxxxx-xxxxx',
dom: {
search: 'search_field',
line_1: 'addr_line1',
line_2: 'addr_line2',
town: 'addr_town',
postcode: 'addr_postcode',
country: 'addr_country'
},
excludeZipPlusFour: true // Excludes the +4 suffix from US ZIP codes
});
Why it matters for your integration
- Better courier compatibility: keep orders flowing smoothly to fulfilment and delivery partners built around the standard five-digit ZIP.
- Cleaner order data: a consistent, five-digit US ZIP code format is easier to validate, store, and match against your database.
- Fewer failed shipments: reduce address-validation errors at checkout and during label creation caused by unexpected ZIP formats.
- Zero extra engineering: it's a single configuration flag — no need to post-process or reformat address data yourself.
Getting started
Both the API flag and the JavaScript option default to false, so existing integrations are completely unaffected until you turn ZIP+4 exclusion on. Update your integration whenever you're ready; there's no breaking change to plan around.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article