UPS - Rates International

Carrier
UPS
Action
Rates International
{
  "carrier": "UPS",
  "action": "getallrates",
  "params": {
    "key": "YOUR_KEY",
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "account_number": "YOUR_ACCOUNT_NUMBER",
    "packages": [
      {
        "weight": 5,
        "length": 5,
        "width": 5,
        "height": 5
      }
    ],
    "test": true,
    "residential": true,
    "customs": [],
    "shipper": "RocketShipIt",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_country": "US",
    "to_country": "CA",
    "to_code": "V0K1G0",
    "weight_unit": "LBS",
    "pickup_type": "01",
    "customer_classification": "01",
    "length_unit": "IN",
    "packaging_type": "02"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'UPS',
  'action' => 'getallrates',
  'params' => 
  array (
    'key' => 'YOUR_KEY',
    'username' => 'YOUR_USERNAME',
    'password' => 'YOUR_PASSWORD',
    'account_number' => 'YOUR_ACCOUNT_NUMBER',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 5,
        'length' => 5,
        'width' => 5,
        'height' => 5,
      ),
    ),
    'test' => true,
    'residential' => true,
    'customs' => 
    array (
    ),
    'shipper' => 'RocketShipIt',
    'ship_addr1' => '123 Main St',
    'ship_city' => 'Whitehall',
    'ship_state' => 'MT',
    'ship_code' => '59759',
    'ship_country' => 'US',
    'to_country' => 'CA',
    'to_code' => 'V0K1G0',
    'weight_unit' => 'LBS',
    'pickup_type' => '01',
    'customer_classification' => '01',
    'length_unit' => 'IN',
    'packaging_type' => '02',
  ),
)
);

rs.request(
  {'action': 'getallrates',
 'carrier': 'UPS',
 'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
            'customer_classification': '01',
            'customs': [],
            'key': 'YOUR_KEY',
            'length_unit': 'IN',
            'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
            'packaging_type': '02',
            'password': 'YOUR_PASSWORD',
            'pickup_type': '01',
            'residential': True,
            'ship_addr1': '123 Main St',
            'ship_city': 'Whitehall',
            'ship_code': '59759',
            'ship_country': 'US',
            'ship_state': 'MT',
            'shipper': 'RocketShipIt',
            'test': True,
            'to_code': 'V0K1G0',
            'to_country': 'CA',
            'username': 'YOUR_USERNAME',
            'weight_unit': 'LBS'}}

)

rs.request(
  {"carrier"=>"UPS",
 "action"=>"getallrates",
 "params"=>
  {"key"=>"YOUR_KEY",
   "username"=>"YOUR_USERNAME",
   "password"=>"YOUR_PASSWORD",
   "account_number"=>"YOUR_ACCOUNT_NUMBER",
   "packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
   "test"=>true,
   "residential"=>true,
   "customs"=>[],
   "shipper"=>"RocketShipIt",
   "ship_addr1"=>"123 Main St",
   "ship_city"=>"Whitehall",
   "ship_state"=>"MT",
   "ship_code"=>"59759",
   "ship_country"=>"US",
   "to_country"=>"CA",
   "to_code"=>"V0K1G0",
   "weight_unit"=>"LBS",
   "pickup_type"=>"01",
   "customer_classification"=>"01",
   "length_unit"=>"IN",
   "packaging_type"=>"02"}}

)

rocketshipit.request(
  {
  "carrier": "UPS",
  "action": "getallrates",
  "params": {
    "key": "YOUR_KEY",
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "account_number": "YOUR_ACCOUNT_NUMBER",
    "packages": [
      {
        "weight": 5,
        "length": 5,
        "width": 5,
        "height": 5
      }
    ],
    "test": true,
    "residential": true,
    "customs": [],
    "shipper": "RocketShipIt",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_country": "US",
    "to_country": "CA",
    "to_code": "V0K1G0",
    "weight_unit": "LBS",
    "pickup_type": "01",
    "customer_classification": "01",
    "length_unit": "IN",
    "packaging_type": "02"
  }
}
)

← All UPS examples