Check Address for Residential
Check Address for Residential
Endpoint
https://tms.targetfmi.com/index.php?p=api&r=text&c=parcelShipService&m=fedexAddressValidation
Request Parameters
Parameter | Required | Available Options/Data Type | Max Length | Description |
---|---|---|---|---|
street | Yes | String | ~65k | Consignee address line one. |
city | Optional (Required if zip is not provided) | String | 255 | Consignee city |
state | Optional (Required if zip is not provided) | String | 2 | Consignee state |
zip | Optional (Required if city and state are not provided) | String | 10 | Consignee zip |
country | Optional |
| 2 | Consignee country |
code | Yes | String | 20 | A warehouse code available to the user. |
Examples
Using an Array
<?php /** * Parcel Address Verification Example (Using Array Format) */ $data = array( 'street' => '5905 Brownsville Rd', 'city' => 'Pittsburgh', 'state' => 'PA', 'zip' => '15236', 'country' => 'US', 'code' => 'TFM_PA', ); ?>
Using stdClass()
<?php /** * Parcel Address Verification Example (Using stdClass() Format) */ // Base request node $data = new stdClass(); // Address Details $data = new stdClass(); $data->street = '5905 Brownsville Rd'; $data->city = 'Pittsburgh'; $data->state = 'PA'; $data->zip = '15236'; $data->country = 'US'; $data->code = 'TFM_PA'; ?>
Response Parameters
Parameter Name | Description |
---|---|
/body | Container for the classification details |
/body/classification | Classification of the address
|
Example
Example Response
Array ( [body] => Array ( [classification] => BUSINESS ) [message] => Array() )
Full Example
Example
<?php /** * Address Verification Full Example (Using Array Format) */ require_once "../../restClient.class.php"; $resource = "https://tms.targetfmi.com/index.php"; $user = "API_KEY"; $pass = ""; $seperator = "?"; $rest = new restClient($resource, $user, $pass, $seperator); $data = array( 'street' => '5905 Brownsville Rd', 'city' => 'Pittsburgh', 'state' => 'PA', 'zip' => '15236', 'country' => 'US', 'code' => 'DYN_PA', ); $res = $rest->post("p=api&r=text&c=parcelShipService&m=fedexAddressValidation", $data); ?>
, multiple selections available, Use left or right arrow keys to navigate selected items