USPS - Address Validation

Carrier: USPS
Action: Address Validation
Description: Example implementation for USPS Address Validation
{
  "carrier": "USPS",
  "action": "AddressValidate",
  "params": {
    "username": "YOURUSERNAME",
    "to_name": "John Doe",
    "to_addr1": "2920 Zoo Drive",
    "to_state": "CA",
    "to_city": "San Diego",
    "to_code": "92101",
    "to_country": "US",
    "test": true
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'USPS',
  'action' => 'AddressValidate',
  'params' => 
  array (
    'username' => 'YOURUSERNAME',
    'to_name' => 'John Doe',
    'to_addr1' => '2920 Zoo Drive',
    'to_state' => 'CA',
    'to_city' => 'San Diego',
    'to_code' => '92101',
    'to_country' => 'US',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'AddressValidate',
 'carrier': 'USPS',
 'params': {'test': True,
            'to_addr1': '2920 Zoo Drive',
            'to_city': 'San Diego',
            'to_code': '92101',
            'to_country': 'US',
            'to_name': 'John Doe',
            'to_state': 'CA',
            'username': 'YOURUSERNAME'}}

)

rs.request(
  {"carrier"=>"USPS",
 "action"=>"AddressValidate",
 "params"=>
  {"username"=>"YOURUSERNAME",
   "to_name"=>"John Doe",
   "to_addr1"=>"2920 Zoo Drive",
   "to_state"=>"CA",
   "to_city"=>"San Diego",
   "to_code"=>"92101",
   "to_country"=>"US",
   "test"=>true}}

)

rocketshipit.request(
  {
  "carrier": "USPS",
  "action": "AddressValidate",
  "params": {
    "username": "YOURUSERNAME",
    "to_name": "John Doe",
    "to_addr1": "2920 Zoo Drive",
    "to_state": "CA",
    "to_city": "San Diego",
    "to_code": "92101",
    "to_country": "US",
    "test": true
  }
}
)
← Back to All Examples

Other USPS Examples

Address Validation City/State from Zip
Example implementation for USPS Address Validation City/State from Zip
Create Manifest
Example implementation for USPS Create Manifest
EMRS Return Label
Example implementation for USPS EMRS Return Label
Label
Example implementation for USPS Label
Label First Class Mail International
Example implementation for USPS Label First Class Mail International
Label International Express Mail
Example implementation for USPS Label International Express Mail
Label International Priority Mail
Example implementation for USPS Label International Priority Mail
Rate International
Example implementation for USPS Rate International
Rate Regional
Example implementation for USPS Rate Regional
Rates
Example implementation for USPS Rates
Rates First Class
Example implementation for USPS Rates First Class
Time in Transit
Example implementation for USPS Time in Transit
Tracking
Example implementation for USPS Tracking