Asendia - Label

Carrier: Asendia
Action: Label
Description: Example implementation for Asendia Label
{
  "carrier": "Asendia",
  "action": "SubmitShipment",
  "params": {
    "key": "YOUR_ASENDIA_API_KEY",
    "account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
    "username": "YOUR_ASENDIA_USERNAME",
    "password": "YOUR_ASENDIA_PASSWORD",
    "meter_number": "YOUR_ASENDIA_DATA_SOURCE",
    "service": "A105",
    "monetary_value": 20.00,
    "packages": [
      {
        "weight": 2,
        "length": 5,
        "width": 5,
        "height": 5
      }
    ],
    "customs": [
      {
        "invoice_line_part_number": "abc123",
        "customs_description": "foo",
        "invoice_line_value": "10.00",
        "customs_quantity": 2
      }
    ],
    "shipper": "TEST LABEL",
    "ship_addr1": "5333 Zoo Dr",
    "ship_city": "Los Angeles",
    "ship_state": "CA",
    "ship_code": "90027",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "John Doe",
    "to_addr1": "73 Harbord Street",
    "to_state": "ON",
    "to_city": "Toronto",
    "to_code": "M5S1G4",
    "to_phone": "1231231234",
    "to_country": "CA",
    "test": true
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'Asendia',
  'action' => 'SubmitShipment',
  'params' => 
  array (
    'key' => 'YOUR_ASENDIA_API_KEY',
    'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
    'username' => 'YOUR_ASENDIA_USERNAME',
    'password' => 'YOUR_ASENDIA_PASSWORD',
    'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
    'service' => 'A105',
    'monetary_value' => 20.0,
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 2,
        'length' => 5,
        'width' => 5,
        'height' => 5,
      ),
    ),
    'customs' => 
    array (
      0 => 
      array (
        'invoice_line_part_number' => 'abc123',
        'customs_description' => 'foo',
        'invoice_line_value' => '10.00',
        'customs_quantity' => 2,
      ),
    ),
    'shipper' => 'TEST LABEL',
    'ship_addr1' => '5333 Zoo Dr',
    'ship_city' => 'Los Angeles',
    'ship_state' => 'CA',
    'ship_code' => '90027',
    'ship_phone' => '1231231234',
    'ship_country' => 'US',
    'to_name' => 'John Doe',
    'to_addr1' => '73 Harbord Street',
    'to_state' => 'ON',
    'to_city' => 'Toronto',
    'to_code' => 'M5S1G4',
    'to_phone' => '1231231234',
    'to_country' => 'CA',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'SubmitShipment',
 'carrier': 'Asendia',
 'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
            'customs': [{'customs_description': 'foo',
                         'customs_quantity': 2,
                         'invoice_line_part_number': 'abc123',
                         'invoice_line_value': '10.00'}],
            'key': 'YOUR_ASENDIA_API_KEY',
            'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
            'monetary_value': 20.0,
            'packages': [{'height': 5, 'length': 5, 'weight': 2, 'width': 5}],
            'password': 'YOUR_ASENDIA_PASSWORD',
            'service': 'A105',
            'ship_addr1': '5333 Zoo Dr',
            'ship_city': 'Los Angeles',
            'ship_code': '90027',
            'ship_country': 'US',
            'ship_phone': '1231231234',
            'ship_state': 'CA',
            'shipper': 'TEST LABEL',
            'test': True,
            'to_addr1': '73 Harbord Street',
            'to_city': 'Toronto',
            'to_code': 'M5S1G4',
            'to_country': 'CA',
            'to_name': 'John Doe',
            'to_phone': '1231231234',
            'to_state': 'ON',
            'username': 'YOUR_ASENDIA_USERNAME'}}

)

rs.request(
  {"carrier"=>"Asendia",
 "action"=>"SubmitShipment",
 "params"=>
  {"key"=>"YOUR_ASENDIA_API_KEY",
   "account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
   "username"=>"YOUR_ASENDIA_USERNAME",
   "password"=>"YOUR_ASENDIA_PASSWORD",
   "meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
   "service"=>"A105",
   "monetary_value"=>20.0,
   "packages"=>[{"weight"=>2, "length"=>5, "width"=>5, "height"=>5}],
   "customs"=>
    [{"invoice_line_part_number"=>"abc123",
      "customs_description"=>"foo",
      "invoice_line_value"=>"10.00",
      "customs_quantity"=>2}],
   "shipper"=>"TEST LABEL",
   "ship_addr1"=>"5333 Zoo Dr",
   "ship_city"=>"Los Angeles",
   "ship_state"=>"CA",
   "ship_code"=>"90027",
   "ship_phone"=>"1231231234",
   "ship_country"=>"US",
   "to_name"=>"John Doe",
   "to_addr1"=>"73 Harbord Street",
   "to_state"=>"ON",
   "to_city"=>"Toronto",
   "to_code"=>"M5S1G4",
   "to_phone"=>"1231231234",
   "to_country"=>"CA",
   "test"=>true}}

)

rocketshipit.request(
  {
  "carrier": "Asendia",
  "action": "SubmitShipment",
  "params": {
    "key": "YOUR_ASENDIA_API_KEY",
    "account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
    "username": "YOUR_ASENDIA_USERNAME",
    "password": "YOUR_ASENDIA_PASSWORD",
    "meter_number": "YOUR_ASENDIA_DATA_SOURCE",
    "service": "A105",
    "monetary_value": 20.00,
    "packages": [
      {
        "weight": 2,
        "length": 5,
        "width": 5,
        "height": 5
      }
    ],
    "customs": [
      {
        "invoice_line_part_number": "abc123",
        "customs_description": "foo",
        "invoice_line_value": "10.00",
        "customs_quantity": 2
      }
    ],
    "shipper": "TEST LABEL",
    "ship_addr1": "5333 Zoo Dr",
    "ship_city": "Los Angeles",
    "ship_state": "CA",
    "ship_code": "90027",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "John Doe",
    "to_addr1": "73 Harbord Street",
    "to_state": "ON",
    "to_city": "Toronto",
    "to_code": "M5S1G4",
    "to_phone": "1231231234",
    "to_country": "CA",
    "test": true
  }
}
)
← Back to All Examples

Other Asendia Examples

Rates
Example implementation for Asendia Rates
VoidShipment
Example implementation for Asendia VoidShipment