11Address Validation Documentation
22================================
3- ShipEngine allows you to validate an address before using it to create a shipment to ensure accurate delivery
3+ [ ShipEngine] ( www.shipengine.com ) allows you to validate an address before using it to create a shipment to ensure accurate delivery
44of your packages.
55
66Address validation can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine
@@ -24,8 +24,9 @@ There are two ways to validate an address using this SDK.
2424 requires a ` countryCode ` which should be the 2 character capitalized abbreviation for a given countryCode.
2525
2626- ** Behavior** : The ` validateAddress ` method will always return
27- an [ AddressValidateResult] ( ../src/Model/Address/AddressValidateResult.php ) object, even in the even that the
28- address passed in was not * valid* .
27+ an [ AddressValidateResult] ( ../src/Model/Address/AddressValidateResult.php ) object, and it allows you to determine
28+ whether an address is valid before using it for your shipments. It accepts an address object containing typical
29+ address properties, described below, and will return a normalized address object if the address is valid.
2930
3031- ** Method level configuration** - You can optionally pass in an array that contains ` configuration ` values to be used
3132 for the current method call. The options are ` apiKey ` , ` baseUrl ` , ` pageSize ` ,
@@ -88,7 +89,7 @@ $validated_address = $shipengine->validateAddress($address, ['retries' => 2]);
8889print_r($validated_address);
8990```
9091
91- ** Successful Address Validation Output:** : As a raw ` AddressValidateResult ` object.
92+ ** Successful Address Validation Output:** As a raw ` AddressValidateResult ` object.
9293
9394``` php
9495ShipEngine\Model\Address\AddressValidateResult Object
@@ -138,7 +139,7 @@ $validated_address = $shipengine->validateAddress($address, ['retries' => 2]);
138139print_r(json_encode($validated_address, JSON_PRETTY_PRINT)); // Return the AddressValidateResult Type as a JSON string.
139140```
140141
141- ** Successful Address Validation Output:** : This is the ` AddressValidateResult ` Type serialized as JSON.
142+ ** Successful Address Validation Output:** This is the ` AddressValidateResult ` Type serialized as JSON.
142143``` json5
143144{
144145 " valid" : true ,
0 commit comments