{
"carrier": "Stamps-REST",
"action": "getallrates",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"carriers": ["usps", "ups"],
"packages": [
{
"weight": 2.5,
"length": 6,
"width": 5,
"height": 4
}
],
"ship_code": "94105",
"to_code": "78701",
"weight_unit": "LBS"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Stamps-REST',
'action' => 'getallrates',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'carriers' =>
array (
0 => 'usps',
1 => 'ups',
),
'packages' =>
array (
0 =>
array (
'weight' => 2.5,
'length' => 6,
'width' => 5,
'height' => 4,
),
),
'ship_code' => '94105',
'to_code' => '78701',
'weight_unit' => 'LBS',
),
)
);
rs.request(
{'action': 'getallrates',
'carrier': 'Stamps-REST',
'params': {'carriers': ['usps', 'ups'],
'key': 'your-key-from-authenticate-request',
'packages': [{'height': 4, 'length': 6, 'weight': 2.5, 'width': 5}],
'ship_code': '94105',
'test': True,
'to_code': '78701',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"Stamps-REST",
"action"=>"getallrates",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"carriers"=>["usps", "ups"],
"packages"=>[{"weight"=>2.5, "length"=>6, "width"=>5, "height"=>4}],
"ship_code"=>"94105",
"to_code"=>"78701",
"weight_unit"=>"LBS"}}
)
rocketshipit.request(
{
"carrier": "Stamps-REST",
"action": "getallrates",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"carriers": ["usps", "ups"],
"packages": [
{
"weight": 2.5,
"length": 6,
"width": 5,
"height": 4
}
],
"ship_code": "94105",
"to_code": "78701",
"weight_unit": "LBS"
}
}
)