{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"test": true,
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_weight": 4,
"customs_quantity": 2,
"customs_line_amount": 10.00,
"customs_quantity_units": "EA"
}
],
"packages": [
{
"weight": 30,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "USA.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_phone": "123-123-1234",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'test' => true,
'reason_for_export' => 'SOG',
'customs' =>
array (
0 =>
array (
'customs_description' => 'books',
'customs_weight' => 4,
'customs_quantity' => 2,
'customs_line_amount' => 10.0,
'customs_quantity_units' => 'EA',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 30,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'USA.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_phone' => '123-123-1234',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [{'customs_description': 'books',
'customs_line_amount': 10.0,
'customs_quantity': 2,
'customs_quantity_units': 'EA',
'customs_weight': 4}],
'packages': [{'height': 5, 'length': 7, 'weight': 30, 'width': 5}],
'password': 'YOUR_PASSWORD',
'reason_for_export': 'SOG',
'service': 'USA.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_phone': '123-123-1234',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"test"=>true,
"reason_for_export"=>"SOG",
"customs"=>
[{"customs_description"=>"books",
"customs_weight"=>4,
"customs_quantity"=>2,
"customs_line_amount"=>10.0,
"customs_quantity_units"=>"EA"}],
"packages"=>[{"weight"=>30, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"USA.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_phone"=>"123-123-1234",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"test": true,
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_weight": 4,
"customs_quantity": 2,
"customs_line_amount": 10.00,
"customs_quantity_units": "EA"
}
],
"packages": [
{
"weight": 30,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "USA.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_phone": "123-123-1234",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US"
}
}
)