USPS-REST - Rate Single with rate indicator

Carrier: USPS-REST
Action: Rate Single with rate indicator
Description: Example implementation for USPS-REST Rate Single with rate indicator
{
  "carrier": "USPS-REST",
  "action": "GetAllRates",
  "params": {
    "test": true,
    "price_type": "RETAIL",
    "rate_indicator": "PA",
    "service": "PRIORITY_MAIL_EXPRESS",
    "packages": [
      {
        "weight": 6
      }
    ],
    "ship_code": "59759",
    "to_code": "90210"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'USPS-REST',
  'action' => 'GetAllRates',
  'params' => 
  array (
    'test' => true,
    'price_type' => 'RETAIL',
    'rate_indicator' => 'PA',
    'service' => 'PRIORITY_MAIL_EXPRESS',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 6,
      ),
    ),
    'ship_code' => '59759',
    'to_code' => '90210',
  ),
)
);

rs.request(
  {'action': 'GetAllRates',
 'carrier': 'USPS-REST',
 'params': {'packages': [{'weight': 6}],
            'price_type': 'RETAIL',
            'rate_indicator': 'PA',
            'service': 'PRIORITY_MAIL_EXPRESS',
            'ship_code': '59759',
            'test': True,
            'to_code': '90210'}}

)

rs.request(
  {"carrier"=>"USPS-REST",
 "action"=>"GetAllRates",
 "params"=>
  {"test"=>true,
   "price_type"=>"RETAIL",
   "rate_indicator"=>"PA",
   "service"=>"PRIORITY_MAIL_EXPRESS",
   "packages"=>[{"weight"=>6}],
   "ship_code"=>"59759",
   "to_code"=>"90210"}}

)

rocketshipit.request(
  {
  "carrier": "USPS-REST",
  "action": "GetAllRates",
  "params": {
    "test": true,
    "price_type": "RETAIL",
    "rate_indicator": "PA",
    "service": "PRIORITY_MAIL_EXPRESS",
    "packages": [
      {
        "weight": 6
      }
    ],
    "ship_code": "59759",
    "to_code": "90210"
  }
}
)
← 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
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
Rates
Example implementation for USPS-REST Rates
Tracking
Example implementation for USPS-REST Tracking
Void Shipment
Example implementation for USPS-REST Void Shipment