{
"carrier": "purolator",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"packaging_type": "CustomerPackaging"
}
],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "CA",
"to_code": "V5K0A1"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'purolator',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'packaging_type' => 'CustomerPackaging',
),
),
'ship_city' => 'BELLEVILLE',
'ship_code' => 'K8N5W6',
'to_country' => 'CA',
'to_code' => 'V5K0A1',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'purolator',
'params': {'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5,
'length': 5,
'packaging_type': 'CustomerPackaging',
'weight': 5,
'width': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'BELLEVILLE',
'ship_code': 'K8N5W6',
'test': True,
'to_code': 'V5K0A1',
'to_country': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"purolator",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"test"=>true,
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"packaging_type"=>"CustomerPackaging"}],
"ship_city"=>"BELLEVILLE",
"ship_code"=>"K8N5W6",
"to_country"=>"CA",
"to_code"=>"V5K0A1"}}
)
rocketshipit.request(
{
"carrier": "purolator",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"packaging_type": "CustomerPackaging"
}
],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "CA",
"to_code": "V5K0A1"
}
}
)