{
"carrier": "OnTrac-REST",
"action": "getallrates",
"params": {
"username": "your-wsid",
"password": "your-wskey",
"account_number": "FAKECSBR",
"ship_code": "85043",
"to_addr1": "132 N F St",
"to_city": "Lake Worth",
"to_state": "FL",
"to_code": "33460",
"to_country": "US",
"weight_unit": "LBS",
"length_unit": "IN",
"packages": [
{
"weight": 2.5,
"length": 10,
"width": 8,
"height": 4
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OnTrac-REST',
'action' => 'getallrates',
'params' =>
array (
'username' => 'your-wsid',
'password' => 'your-wskey',
'account_number' => 'FAKECSBR',
'ship_code' => '85043',
'to_addr1' => '132 N F St',
'to_city' => 'Lake Worth',
'to_state' => 'FL',
'to_code' => '33460',
'to_country' => 'US',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packages' =>
array (
0 =>
array (
'weight' => 2.5,
'length' => 10,
'width' => 8,
'height' => 4,
),
),
),
)
);
rs.request(
{'action': 'getallrates',
'carrier': 'OnTrac-REST',
'params': {'account_number': 'FAKECSBR',
'length_unit': 'IN',
'packages': [{'height': 4,
'length': 10,
'weight': 2.5,
'width': 8}],
'password': 'your-wskey',
'ship_code': '85043',
'to_addr1': '132 N F St',
'to_city': 'Lake Worth',
'to_code': '33460',
'to_country': 'US',
'to_state': 'FL',
'username': 'your-wsid',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"OnTrac-REST",
"action"=>"getallrates",
"params"=>
{"username"=>"your-wsid",
"password"=>"your-wskey",
"account_number"=>"FAKECSBR",
"ship_code"=>"85043",
"to_addr1"=>"132 N F St",
"to_city"=>"Lake Worth",
"to_state"=>"FL",
"to_code"=>"33460",
"to_country"=>"US",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packages"=>[{"weight"=>2.5, "length"=>10, "width"=>8, "height"=>4}]}}
)
rocketshipit.request(
{
"carrier": "OnTrac-REST",
"action": "getallrates",
"params": {
"username": "your-wsid",
"password": "your-wskey",
"account_number": "FAKECSBR",
"ship_code": "85043",
"to_addr1": "132 N F St",
"to_city": "Lake Worth",
"to_state": "FL",
"to_code": "33460",
"to_country": "US",
"weight_unit": "LBS",
"length_unit": "IN",
"packages": [
{
"weight": 2.5,
"length": 10,
"width": 8,
"height": 4
}
]
}
}
)