USPS-REST - Address Validation

Carrier: USPS-REST
Action: Address Validation
Description: Example implementation for USPS-REST Address Validation
{
  "carrier": "USPS-REST",
  "action": "AddressValidate",
  "params": {
    "key": "your-key-from-authenticate-request",
    "to_name": "John Doe",
    "to_addr1": "2920 Zoo ",
    "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-REST',
  'action' => 'AddressValidate',
  'params' => 
  array (
    'key' => 'your-key-from-authenticate-request',
    'to_name' => 'John Doe',
    'to_addr1' => '2920 Zoo ',
    'to_state' => 'CA',
    'to_city' => 'San Diego',
    'to_code' => '92101',
    'to_country' => 'US',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'AddressValidate',
 'carrier': 'USPS-REST',
 'params': {'key': 'your-key-from-authenticate-request',
            'test': True,
            'to_addr1': '2920 Zoo ',
            'to_city': 'San Diego',
            'to_code': '92101',
            'to_country': 'US',
            'to_name': 'John Doe',
            'to_state': 'CA'}}

)

rs.request(
  {"carrier"=>"USPS-REST",
 "action"=>"AddressValidate",
 "params"=>
  {"key"=>"your-key-from-authenticate-request",
   "to_name"=>"John Doe",
   "to_addr1"=>"2920 Zoo ",
   "to_state"=>"CA",
   "to_city"=>"San Diego",
   "to_code"=>"92101",
   "to_country"=>"US",
   "test"=>true}}

)

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

Other USPS-REST Examples

Address Validation City/State from Zip
Example implementation for USPS-REST Address Validation City/State from Zip
Authenticate
Example implementation for USPS-REST Authenticate
Authenticate using apis endpoint
Example implementation for USPS-REST Authenticate using apis endpoint
Create Manifest
Example implementation for USPS-REST Create Manifest
Get Purchase Token
Example implementation for USPS-REST Get Purchase Token
Label
Example implementation for USPS-REST Label
Label Return
Example implementation for USPS-REST Label Return
Rate Single with rate indicator
Example implementation for USPS-REST Rate Single with rate indicator
Rates
Example implementation for USPS-REST Rates
Tracking
Example implementation for USPS-REST Tracking
Void Shipment
Example implementation for USPS-REST Void Shipment