Canada Post - Label Third Party Billing

Carrier
Canada Post
Action
Label Third Party Billing
{
    "carrier": "canada",
    "action": "submitshipment",
    "params": {
      "contract_id": "42708517",
      "username": "6e93d53968881714",
      "password": "0bfa9fcb9853d1f51ee57a",
      "account_number": "2004381",
      "billing": [
        {
          "type": "transportation",
          "payment_type": "third_party",
          "account": "1234567"
        }
      ],
      "packages": [
        {
          "weight": 4,
          "length": 7,
          "width": 5,
          "height": 5
        }
      ],
      "service": "DOM.EP",
      "shipper": "RocketShipIt",
      "ship_addr1": "123 Main St",
      "ship_city": "Ottawa",
      "ship_state": "ON",
      "ship_code": "K1A0B1",
      "ship_phone": "1231231234",
      "ship_country": "CA",
      "to_name": "John Doe",
      "to_addr1": "361A Old Finch Avenue",
      "to_addr2": "#103",
      "to_state": "ON",
      "to_city": "Toronto",
      "to_code": "M1B5K7",
      "to_country": "CA",
      "test": true
    }
  }

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'canada',
  'action' => 'submitshipment',
  'params' => 
  array (
    'contract_id' => '42708517',
    'username' => '6e93d53968881714',
    'password' => '0bfa9fcb9853d1f51ee57a',
    'account_number' => '2004381',
    'billing' => 
    array (
      0 => 
      array (
        'type' => 'transportation',
        'payment_type' => 'third_party',
        'account' => '1234567',
      ),
    ),
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 4,
        'length' => 7,
        'width' => 5,
        'height' => 5,
      ),
    ),
    'service' => 'DOM.EP',
    'shipper' => 'RocketShipIt',
    'ship_addr1' => '123 Main St',
    'ship_city' => 'Ottawa',
    'ship_state' => 'ON',
    'ship_code' => 'K1A0B1',
    'ship_phone' => '1231231234',
    'ship_country' => 'CA',
    'to_name' => 'John Doe',
    'to_addr1' => '361A Old Finch Avenue',
    'to_addr2' => '#103',
    'to_state' => 'ON',
    'to_city' => 'Toronto',
    'to_code' => 'M1B5K7',
    'to_country' => 'CA',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'submitshipment',
 'carrier': 'canada',
 'params': {'account_number': '2004381',
            'billing': [{'account': '1234567',
                         'payment_type': 'third_party',
                         'type': 'transportation'}],
            'contract_id': '42708517',
            'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
            'password': '0bfa9fcb9853d1f51ee57a',
            'service': 'DOM.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': '361A Old Finch Avenue',
            'to_addr2': '#103',
            'to_city': 'Toronto',
            'to_code': 'M1B5K7',
            'to_country': 'CA',
            'to_name': 'John Doe',
            'to_state': 'ON',
            'username': '6e93d53968881714'}}

)

rs.request(
  {"carrier"=>"canada",
 "action"=>"submitshipment",
 "params"=>
  {"contract_id"=>"42708517",
   "username"=>"6e93d53968881714",
   "password"=>"0bfa9fcb9853d1f51ee57a",
   "account_number"=>"2004381",
   "billing"=>
    [{"type"=>"transportation",
      "payment_type"=>"third_party",
      "account"=>"1234567"}],
   "packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
   "service"=>"DOM.EP",
   "shipper"=>"RocketShipIt",
   "ship_addr1"=>"123 Main St",
   "ship_city"=>"Ottawa",
   "ship_state"=>"ON",
   "ship_code"=>"K1A0B1",
   "ship_phone"=>"1231231234",
   "ship_country"=>"CA",
   "to_name"=>"John Doe",
   "to_addr1"=>"361A Old Finch Avenue",
   "to_addr2"=>"#103",
   "to_state"=>"ON",
   "to_city"=>"Toronto",
   "to_code"=>"M1B5K7",
   "to_country"=>"CA",
   "test"=>true}}

)

rocketshipit.request(
  {
    "carrier": "canada",
    "action": "submitshipment",
    "params": {
      "contract_id": "42708517",
      "username": "6e93d53968881714",
      "password": "0bfa9fcb9853d1f51ee57a",
      "account_number": "2004381",
      "billing": [
        {
          "type": "transportation",
          "payment_type": "third_party",
          "account": "1234567"
        }
      ],
      "packages": [
        {
          "weight": 4,
          "length": 7,
          "width": 5,
          "height": 5
        }
      ],
      "service": "DOM.EP",
      "shipper": "RocketShipIt",
      "ship_addr1": "123 Main St",
      "ship_city": "Ottawa",
      "ship_state": "ON",
      "ship_code": "K1A0B1",
      "ship_phone": "1231231234",
      "ship_country": "CA",
      "to_name": "John Doe",
      "to_addr1": "361A Old Finch Avenue",
      "to_addr2": "#103",
      "to_state": "ON",
      "to_city": "Toronto",
      "to_code": "M1B5K7",
      "to_country": "CA",
      "test": true
    }
  }
)

← All Canada Post examples