{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"request_option": "Shop",
"service": "03",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"sub_packaging_type": "M"
}
],
"test": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'request_option' => 'Shop',
'service' => '03',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'sub_packaging_type' => 'M',
),
),
'test' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 5,
'length': 5,
'sub_packaging_type': 'M',
'weight': 5,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'request_option': 'Shop',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"request_option"=>"Shop",
"service"=>"03",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"sub_packaging_type"=>"M"}],
"test"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"request_option": "Shop",
"service": "03",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"sub_packaging_type": "M"
}
],
"test": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02"
}
}
)