{
"carrier": "canada-rest",
"action": "submitshipment",
"params": {
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"account_number": "YOUR_CUSTOMER_NUMBER",
"service": "USA.EP",
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_quantity": 2,
"customs_weight": 0.5,
"customs_line_amount": 10.00,
"country_of_manufacture": "CA"
}
],
"shipper": "RocketShipIt",
"ship_phone": "613-555-0123",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"to_name": "John Doe",
"to_phone": "123-123-1234",
"to_addr1": "940 Presidio Ave",
"to_city": "San Francisco",
"to_state": "CA",
"to_code": "94115",
"to_country": "US",
"packages": [
{
"weight": 2,
"length": 30,
"width": 20,
"height": 10
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada-rest',
'action' => 'submitshipment',
'params' =>
array (
'client_id' => 'YOUR_CLIENT_ID',
'client_secret' => 'YOUR_CLIENT_SECRET',
'account_number' => 'YOUR_CUSTOMER_NUMBER',
'service' => 'USA.EP',
'reason_for_export' => 'SOG',
'customs' =>
array (
0 =>
array (
'customs_description' => 'books',
'customs_quantity' => 2,
'customs_weight' => 0.5,
'customs_line_amount' => 10.0,
'country_of_manufacture' => 'CA',
),
),
'shipper' => 'RocketShipIt',
'ship_phone' => '613-555-0123',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'to_name' => 'John Doe',
'to_phone' => '123-123-1234',
'to_addr1' => '940 Presidio Ave',
'to_city' => 'San Francisco',
'to_state' => 'CA',
'to_code' => '94115',
'to_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'length' => 30,
'width' => 20,
'height' => 10,
),
),
),
)
);
rs.request(
{'action': 'submitshipment',
'carrier': 'canada-rest',
'params': {'account_number': 'YOUR_CUSTOMER_NUMBER',
'client_id': 'YOUR_CLIENT_ID',
'client_secret': 'YOUR_CLIENT_SECRET',
'customs': [{'country_of_manufacture': 'CA',
'customs_description': 'books',
'customs_line_amount': 10.0,
'customs_quantity': 2,
'customs_weight': 0.5}],
'packages': [{'height': 10,
'length': 30,
'weight': 2,
'width': 20}],
'reason_for_export': 'SOG',
'service': 'USA.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_phone': '613-555-0123',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'to_addr1': '940 Presidio Ave',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_phone': '123-123-1234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"canada-rest",
"action"=>"submitshipment",
"params"=>
{"client_id"=>"YOUR_CLIENT_ID",
"client_secret"=>"YOUR_CLIENT_SECRET",
"account_number"=>"YOUR_CUSTOMER_NUMBER",
"service"=>"USA.EP",
"reason_for_export"=>"SOG",
"customs"=>
[{"customs_description"=>"books",
"customs_quantity"=>2,
"customs_weight"=>0.5,
"customs_line_amount"=>10.0,
"country_of_manufacture"=>"CA"}],
"shipper"=>"RocketShipIt",
"ship_phone"=>"613-555-0123",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"to_name"=>"John Doe",
"to_phone"=>"123-123-1234",
"to_addr1"=>"940 Presidio Ave",
"to_city"=>"San Francisco",
"to_state"=>"CA",
"to_code"=>"94115",
"to_country"=>"US",
"packages"=>[{"weight"=>2, "length"=>30, "width"=>20, "height"=>10}]}}
)
rocketshipit.request(
{
"carrier": "canada-rest",
"action": "submitshipment",
"params": {
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"account_number": "YOUR_CUSTOMER_NUMBER",
"service": "USA.EP",
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_quantity": 2,
"customs_weight": 0.5,
"customs_line_amount": 10.00,
"country_of_manufacture": "CA"
}
],
"shipper": "RocketShipIt",
"ship_phone": "613-555-0123",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"to_name": "John Doe",
"to_phone": "123-123-1234",
"to_addr1": "940 Presidio Ave",
"to_city": "San Francisco",
"to_state": "CA",
"to_code": "94115",
"to_country": "US",
"packages": [
{
"weight": 2,
"length": 30,
"width": 20,
"height": 10
}
]
}
}
)