{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'return_code' => 'PRINT_RETURN_LABEL',
'service' => 'DOM.EP',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'ship_name' => 'Jane Doe Returner',
'shipper' => 'Capsule Corp.',
'ship_addr1' => '2701 Return Avenue',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_company' => 'Receiver of Return',
'to_addr1' => '2701 Riverside Drive',
'to_state' => 'ON',
'to_city' => 'Ottawa',
'to_code' => 'K1A0B1',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'packages': [{'weight': 2}],
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'service': 'DOM.EP',
'ship_addr1': '2701 Return Avenue',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_name': 'Jane Doe Returner',
'ship_state': 'ON',
'shipper': 'Capsule Corp.',
'test': True,
'to_addr1': '2701 Riverside Drive',
'to_city': 'Ottawa',
'to_code': 'K1A0B1',
'to_company': 'Receiver of Return',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"return_code"=>"PRINT_RETURN_LABEL",
"service"=>"DOM.EP",
"packages"=>[{"weight"=>2}],
"ship_name"=>"Jane Doe Returner",
"shipper"=>"Capsule Corp.",
"ship_addr1"=>"2701 Return Avenue",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_company"=>"Receiver of Return",
"to_addr1"=>"2701 Riverside Drive",
"to_state"=>"ON",
"to_city"=>"Ottawa",
"to_code"=>"K1A0B1",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
)