{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"price_type": "RETAIL",
"packages": [
{
"length": 5,
"width": 5,
"height": 5,
"weight": 16
}
],
"ship_code": "90210",
"to_country": "CA"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'price_type' => 'RETAIL',
'packages' =>
array (
0 =>
array (
'length' => 5,
'width' => 5,
'height' => 5,
'weight' => 16,
),
),
'ship_code' => '90210',
'to_country' => 'CA',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'height': 5, 'length': 5, 'weight': 16, 'width': 5}],
'price_type': 'RETAIL',
'ship_code': '90210',
'test': True,
'to_country': 'CA'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"price_type"=>"RETAIL",
"packages"=>[{"length"=>5, "width"=>5, "height"=>5, "weight"=>16}],
"ship_code"=>"90210",
"to_country"=>"CA"}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"price_type": "RETAIL",
"packages": [
{
"length": 5,
"width": 5,
"height": 5,
"weight": 16
}
],
"ship_code": "90210",
"to_country": "CA"
}
}
)