{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"return_code": "3",
"packages": [
{
"weight": 2
},
{
"weight": 2
}
],
"shipper": "My Company",
"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",
"packaging_type": "02",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'return_code' => '3',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
1 =>
array (
'weight' => 2,
),
),
'shipper' => 'My Company',
'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',
'packaging_type' => '02',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2}, {'weight': 2}],
'packaging_type': '02',
'return_code': '3',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'My Company',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"return_code"=>"3",
"packages"=>[{"weight"=>2}, {"weight"=>2}],
"shipper"=>"My Company",
"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",
"packaging_type"=>"02",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"return_code": "3",
"packages": [
{
"weight": 2
},
{
"weight": 2
}
],
"shipper": "My Company",
"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",
"packaging_type": "02",
"negotiated_rates": true
}
}
)