Canada Post - Label Return

Carrier: Canada Post
Action: Label Return
Description: Example implementation for Canada Post Label Return
{
  "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
  }
}
)
← Back to All Examples

Other Canada Post Examples

Create Manifest
Example implementation for Canada Post Create Manifest
Label
Example implementation for Canada Post Label
Label International
Example implementation for Canada Post Label International
Label Return with Reference
Example implementation for Canada Post Label Return with Reference
Label Third Party Billing
Example implementation for Canada Post Label Third Party Billing
Label with Contract 19+ Signature Required
Example implementation for Canada Post Label with Contract 19+ Signature Required
Label with Contract Signature Required
Example implementation for Canada Post Label with Contract Signature Required
Label with contract
Example implementation for Canada Post Label with contract
Label with contract (ZPL)
Example implementation for Canada Post Label with contract (ZPL)
Pickup Cancel
Example implementation for Canada Post Pickup Cancel
Pickup Schedule
Example implementation for Canada Post Pickup Schedule
Pickup Status
Example implementation for Canada Post Pickup Status
Rate Domestic
Example implementation for Canada Post Rate Domestic
Rates
Example implementation for Canada Post Rates
Rates Insurance
Example implementation for Canada Post Rates Insurance
Tracking
Example implementation for Canada Post Tracking
Void
Example implementation for Canada Post Void