{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "92",
"request_option": "Rate",
"weight_unit": "OZS",
"packaging_type": "02",
"packages": [
{
"weight": 0.6,
"length": 9,
"width": 6,
"height": 1
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "King of Prussia",
"ship_state": "PA",
"ship_code": "19406",
"ship_country": "US",
"to_code": "06333",
"to_state": "CT",
"to_country": "US",
"residential": true,
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'service' => '92',
'request_option' => 'Rate',
'weight_unit' => 'OZS',
'packaging_type' => '02',
'packages' =>
array (
0 =>
array (
'weight' => 0.6,
'length' => 9,
'width' => 6,
'height' => 1,
),
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main St.',
'ship_city' => 'King of Prussia',
'ship_state' => 'PA',
'ship_code' => '19406',
'ship_country' => 'US',
'to_code' => '06333',
'to_state' => 'CT',
'to_country' => 'US',
'residential' => true,
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_UPS_API_KEY',
'negotiated_rates': True,
'packages': [{'height': 1, 'length': 9, 'weight': 0.6, 'width': 6}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'request_option': 'Rate',
'residential': True,
'service': '92',
'ship_addr1': '123 Main St.',
'ship_city': 'King of Prussia',
'ship_code': '19406',
'ship_country': 'US',
'ship_state': 'PA',
'shipper': 'Acme Inc',
'to_code': '06333',
'to_country': 'US',
'to_state': 'CT',
'username': 'YOUR_USERNAME',
'weight_unit': 'OZS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"service"=>"92",
"request_option"=>"Rate",
"weight_unit"=>"OZS",
"packaging_type"=>"02",
"packages"=>[{"weight"=>0.6, "length"=>9, "width"=>6, "height"=>1}],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main St.",
"ship_city"=>"King of Prussia",
"ship_state"=>"PA",
"ship_code"=>"19406",
"ship_country"=>"US",
"to_code"=>"06333",
"to_state"=>"CT",
"to_country"=>"US",
"residential"=>true,
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "92",
"request_option": "Rate",
"weight_unit": "OZS",
"packaging_type": "02",
"packages": [
{
"weight": 0.6,
"length": 9,
"width": 6,
"height": 1
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "King of Prussia",
"ship_state": "PA",
"ship_code": "19406",
"ship_country": "US",
"to_code": "06333",
"to_state": "CT",
"to_country": "US",
"residential": true,
"negotiated_rates": true
}
}
)