Check Address for Residential

Check Address for Residential

Status
Request Type
POST


This endpoint allows you to check if an address is determined to be residential by FedEx.

NOTE: It may possible for FedEx to recognize an address as residential and UPS to determine that same address to be commercial, and vice-versa.

On this page:

Related:

Endpoint

 https://tms.targetfmi.com/index.php?p=api&r=text&c=parcelShipService&m=fedexAddressValidation

Request Parameters

ParameterRequired

Available Options/Data Type

Max LengthDescription
streetYesString~65kConsignee address line one.
cityOptional  (Required if zip is not provided)String255Consignee city
stateOptional  (Required if zip is not provided)String2Consignee state
zipOptional  (Required if city and state are not provided)String10Consignee zip
countryOptional
  • US
  • CA
  • MX
2Consignee country
codeYesString20A 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

/bodyContainer for the classification details
/body/classification

Classification of the address

  • RESIDENTIAL
  • BUSINESS
  • MIXED (If it is a multi-tenant based address and
    contains both business and residential units.)
  • UNKNOWN 

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);

?>

A Note on Address Validation

We currently only support Address Validation with FedEx. As such, you must be approved to ship FedEx parcel through TMS to be able to gain access to this endpoint. Additionally, permission for access to this endpoint must be requested.