Addresses
Parse
The PackageX address parser validates, normalizes, and standardizes addresses. It processes various input formats and returns a consistent PackageX address model.
Address Input Methods
Address String Format
Usually this string is from the autocomplete endpoint. The address_line2
value can be passed in as a separate field or can be included in the string.
Address Object Format
For structured address data:
CASS (USPS Coding Accuracy Support System) Validation
For US addresses, you can request USPS CASS (Coding Accuracy Support System) validation by including the cass: true
option in your request. CASS validation standardizes and verifies addresses according to USPS rules, providing additional metadata and delivery point validation (DPV) results. This is especially useful for mail delivery, compliance, and address quality.
When CASS validation is requested and available, the response will include a usps_cass
field with detailed USPS metadata. If CASS is not available or not requested, this field will be null
.
Note: CASS validation is only available for US addresses. The usps_cass
field contains standardized address lines, delivery point codes, DPV results, and other USPS-specific metadata. See the Address Model) for a full field reference.
Parse Location
There could be times when you're using a PackageX Location
object which already includes your address in it. You can pass the id
of the location into the address
field of the parser and it will return the address of your location. This can be done anytime we ask for an address property. A common example is when creating a shipment. You can pass the location ID into the address property to the sender and/or recipient objects.
Parse Address ID
Like the location ID, you can also provide a PackageX address id
to the parser and it will respond with the address.