{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "03",
"customer_classification": "00",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'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_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '03',
'customer_classification' => '00',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '00',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'pickup_type': '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',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"03",
"customer_classification"=>"00",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "03",
"customer_classification": "00",
"length_unit": "IN",
"packaging_type": "02"
}
}
)