{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2.5
}
],
"customs": [
{
"customs_value": 10.00,
"customs_quantity_units": "EA",
"customs_quantity": 1,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "Brass Trumpet in Case"
}
],
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "USE_SCHEDULED_PICKUP",
"negotiated_rates": true,
"ship_addr1": "123 Main St",
"ship_city": "Burnsville",
"ship_code": "55337",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_state": "MN",
"to_city": "New Glasgow",
"to_code": "B2H3Y5",
"to_country": "CA",
"to_state": "NS"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 2.5,
),
),
'customs' =>
array (
0 =>
array (
'customs_value' => 10.0,
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'country_of_manufacture' => 'US',
'customs_weight' => 2.5,
'customs_description' => 'Brass Trumpet in Case',
),
),
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'USE_SCHEDULED_PICKUP',
'negotiated_rates' => true,
'ship_addr1' => '123 Main St',
'ship_city' => 'Burnsville',
'ship_code' => '55337',
'ship_country' => 'US',
'ship_phone' => '123-123-1234',
'ship_state' => 'MN',
'to_city' => 'New Glasgow',
'to_code' => 'B2H3Y5',
'to_country' => 'CA',
'to_state' => 'NS',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx-REST',
'params': {'account_number': 'your-account-number',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Brass Trumpet in Case',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 10.0,
'customs_weight': 2.5}],
'dropoff_type': 'USE_SCHEDULED_PICKUP',
'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2.5}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Burnsville',
'ship_code': '55337',
'ship_country': 'US',
'ship_phone': '123-123-1234',
'ship_state': 'MN',
'to_city': 'New Glasgow',
'to_code': 'B2H3Y5',
'to_country': 'CA',
'to_state': 'NS',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>2.5}],
"customs"=>
[{"customs_value"=>10.0,
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"country_of_manufacture"=>"US",
"customs_weight"=>2.5,
"customs_description"=>"Brass Trumpet in Case"}],
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"USE_SCHEDULED_PICKUP",
"negotiated_rates"=>true,
"ship_addr1"=>"123 Main St",
"ship_city"=>"Burnsville",
"ship_code"=>"55337",
"ship_country"=>"US",
"ship_phone"=>"123-123-1234",
"ship_state"=>"MN",
"to_city"=>"New Glasgow",
"to_code"=>"B2H3Y5",
"to_country"=>"CA",
"to_state"=>"NS"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2.5
}
],
"customs": [
{
"customs_value": 10.00,
"customs_quantity_units": "EA",
"customs_quantity": 1,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "Brass Trumpet in Case"
}
],
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "USE_SCHEDULED_PICKUP",
"negotiated_rates": true,
"ship_addr1": "123 Main St",
"ship_city": "Burnsville",
"ship_code": "55337",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_state": "MN",
"to_city": "New Glasgow",
"to_code": "B2H3Y5",
"to_country": "CA",
"to_state": "NS"
}
}
)