USPS-REST - Authenticate using apis endpoint

Carrier: USPS-REST
Action: Authenticate using apis endpoint
Description: Example implementation for USPS-REST Authenticate using apis endpoint
{
  "carrier": "USPS-REST",
  "action": "Authenticate",
  "params": {
    "endpoint": "https://apis.usps.com",
    "client_id": "abc123",
    "client_secret": "def987"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'USPS-REST',
  'action' => 'Authenticate',
  'params' => 
  array (
    'endpoint' => 'https://apis.usps.com',
    'client_id' => 'abc123',
    'client_secret' => 'def987',
  ),
)
);

rs.request(
  {'action': 'Authenticate',
 'carrier': 'USPS-REST',
 'params': {'client_id': 'abc123',
            'client_secret': 'def987',
            'endpoint': 'https://apis.usps.com'}}

)

rs.request(
  {"carrier"=>"USPS-REST",
 "action"=>"Authenticate",
 "params"=>
  {"endpoint"=>"https://apis.usps.com",
   "client_id"=>"abc123",
   "client_secret"=>"def987"}}

)

rocketshipit.request(
  {
  "carrier": "USPS-REST",
  "action": "Authenticate",
  "params": {
    "endpoint": "https://apis.usps.com",
    "client_id": "abc123",
    "client_secret": "def987"
  }
}
)
← Back to All Examples

Other USPS-REST Examples

Address Validation
Example implementation for USPS-REST Address Validation
Address Validation City/State from Zip
Example implementation for USPS-REST Address Validation City/State from Zip
Authenticate
Example implementation for USPS-REST Authenticate
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