{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"service": "17",
"request_option": "Shop",
"customs": [],
"shipper": "Acme Inc",
"ship_addr1": "123 Main Ave",
"ship_addr2": "",
"ship_city": "Portland",
"ship_state": "OR",
"ship_code": "97227",
"ship_country": "US",
"from_addr1": "123 Main Ave",
"from_addr2": "",
"from_city": "Portland",
"from_state": "OR",
"from_code": "97227",
"from_country": "US",
"to_name": "John Doe",
"to_company": "Test",
"to_addr1": "1 Main Road",
"to_addr2": "",
"to_city": "Montreal",
"to_state": "QC",
"to_code": "H2T 3E2",
"to_country": "CA",
"to_phone": "1231231234",
"ship_phone": "1231231234",
"packages": [
{
"weight": 3,
"height": 6,
"width": 11,
"length": 8,
"packaging_type": "Package",
"insured_currency": "USD"
}
],
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'service' => '17',
'request_option' => 'Shop',
'customs' =>
array (
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main Ave',
'ship_addr2' => '',
'ship_city' => 'Portland',
'ship_state' => 'OR',
'ship_code' => '97227',
'ship_country' => 'US',
'from_addr1' => '123 Main Ave',
'from_addr2' => '',
'from_city' => 'Portland',
'from_state' => 'OR',
'from_code' => '97227',
'from_country' => 'US',
'to_name' => 'John Doe',
'to_company' => 'Test',
'to_addr1' => '1 Main Road',
'to_addr2' => '',
'to_city' => 'Montreal',
'to_state' => 'QC',
'to_code' => 'H2T 3E2',
'to_country' => 'CA',
'to_phone' => '1231231234',
'ship_phone' => '1231231234',
'packages' =>
array (
0 =>
array (
'weight' => 3,
'height' => 6,
'width' => 11,
'length' => 8,
'packaging_type' => 'Package',
'insured_currency' => 'USD',
),
),
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'customs': [],
'from_addr1': '123 Main Ave',
'from_addr2': '',
'from_city': 'Portland',
'from_code': '97227',
'from_country': 'US',
'from_state': 'OR',
'negotiated_rates': True,
'packages': [{'height': 6,
'insured_currency': 'USD',
'length': 8,
'packaging_type': 'Package',
'weight': 3,
'width': 11}],
'request_option': 'Shop',
'service': '17',
'ship_addr1': '123 Main Ave',
'ship_addr2': '',
'ship_city': 'Portland',
'ship_code': '97227',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'OR',
'shipper': 'Acme Inc',
'to_addr1': '1 Main Road',
'to_addr2': '',
'to_city': 'Montreal',
'to_code': 'H2T 3E2',
'to_company': 'Test',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'QC'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"service"=>"17",
"request_option"=>"Shop",
"customs"=>[],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main Ave",
"ship_addr2"=>"",
"ship_city"=>"Portland",
"ship_state"=>"OR",
"ship_code"=>"97227",
"ship_country"=>"US",
"from_addr1"=>"123 Main Ave",
"from_addr2"=>"",
"from_city"=>"Portland",
"from_state"=>"OR",
"from_code"=>"97227",
"from_country"=>"US",
"to_name"=>"John Doe",
"to_company"=>"Test",
"to_addr1"=>"1 Main Road",
"to_addr2"=>"",
"to_city"=>"Montreal",
"to_state"=>"QC",
"to_code"=>"H2T 3E2",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"ship_phone"=>"1231231234",
"packages"=>
[{"weight"=>3,
"height"=>6,
"width"=>11,
"length"=>8,
"packaging_type"=>"Package",
"insured_currency"=>"USD"}],
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"service": "17",
"request_option": "Shop",
"customs": [],
"shipper": "Acme Inc",
"ship_addr1": "123 Main Ave",
"ship_addr2": "",
"ship_city": "Portland",
"ship_state": "OR",
"ship_code": "97227",
"ship_country": "US",
"from_addr1": "123 Main Ave",
"from_addr2": "",
"from_city": "Portland",
"from_state": "OR",
"from_code": "97227",
"from_country": "US",
"to_name": "John Doe",
"to_company": "Test",
"to_addr1": "1 Main Road",
"to_addr2": "",
"to_city": "Montreal",
"to_state": "QC",
"to_code": "H2T 3E2",
"to_country": "CA",
"to_phone": "1231231234",
"ship_phone": "1231231234",
"packages": [
{
"weight": 3,
"height": 6,
"width": 11,
"length": 8,
"packaging_type": "Package",
"insured_currency": "USD"
}
],
"negotiated_rates": true
}
}
)