OnTrac-REST - Label with Attributes

Carrier
OnTrac-REST
Action
Label with Attributes
{
  "carrier": "OnTrac-REST",
  "action": "submitshipment",
  "params": {
    "username": "your-wsid",
    "password": "your-wskey",
    "account_number": "FAKECSBR",
    "test": true,
    "service": "GRND",
    "image_type": "pdf",
    "attributes": ["Perishable", "NoRTS"],
    "signature_type": "REQUIRED",
    "shipper": "RocketShipIt",
    "ship_contact": "Warehouse Manager",
    "ship_addr1": "7400 W Buckeye Rd",
    "ship_city": "Phoenix",
    "ship_state": "AZ",
    "ship_code": "85043",
    "ship_phone": "6025551234",
    "to_name": "Jane Doe",
    "to_company": "Acme Inc",
    "to_addr1": "132 N F St",
    "to_addr2": "Suite 200",
    "to_city": "Lake Worth",
    "to_state": "FL",
    "to_code": "33460",
    "to_phone": "7037619031",
    "from_company": "RMA Department",
    "from_name": "Returns Desk",
    "from_addr1": "123 Main St",
    "from_city": "National City",
    "from_state": "CA",
    "from_code": "91950",
    "from_phone": "7037619032",
    "packages": [
      {
        "weight": 2.5,
        "length": 10,
        "width": 8,
        "height": 4,
        "description": "Groceries"
      },
      {
        "weight": 200,
        "length": 5,
        "width": 5,
        "height": 3,
        "description": "Bluray"
      }
    ],
    "weight_unit": "G",
    "length_unit": "CM"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'OnTrac-REST',
  'action' => 'submitshipment',
  'params' => 
  array (
    'username' => 'your-wsid',
    'password' => 'your-wskey',
    'account_number' => 'FAKECSBR',
    'test' => true,
    'service' => 'GRND',
    'image_type' => 'pdf',
    'attributes' => 
    array (
      0 => 'Perishable',
      1 => 'NoRTS',
    ),
    'signature_type' => 'REQUIRED',
    'shipper' => 'RocketShipIt',
    'ship_contact' => 'Warehouse Manager',
    'ship_addr1' => '7400 W Buckeye Rd',
    'ship_city' => 'Phoenix',
    'ship_state' => 'AZ',
    'ship_code' => '85043',
    'ship_phone' => '6025551234',
    'to_name' => 'Jane Doe',
    'to_company' => 'Acme Inc',
    'to_addr1' => '132 N F St',
    'to_addr2' => 'Suite 200',
    'to_city' => 'Lake Worth',
    'to_state' => 'FL',
    'to_code' => '33460',
    'to_phone' => '7037619031',
    'from_company' => 'RMA Department',
    'from_name' => 'Returns Desk',
    'from_addr1' => '123 Main St',
    'from_city' => 'National City',
    'from_state' => 'CA',
    'from_code' => '91950',
    'from_phone' => '7037619032',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 2.5,
        'length' => 10,
        'width' => 8,
        'height' => 4,
        'description' => 'Groceries',
      ),
      1 => 
      array (
        'weight' => 200,
        'length' => 5,
        'width' => 5,
        'height' => 3,
        'description' => 'Bluray',
      ),
    ),
    'weight_unit' => 'G',
    'length_unit' => 'CM',
  ),
)
);

rs.request(
  {'action': 'submitshipment',
 'carrier': 'OnTrac-REST',
 'params': {'account_number': 'FAKECSBR',
            'attributes': ['Perishable', 'NoRTS'],
            'from_addr1': '123 Main St',
            'from_city': 'National City',
            'from_code': '91950',
            'from_company': 'RMA Department',
            'from_name': 'Returns Desk',
            'from_phone': '7037619032',
            'from_state': 'CA',
            'image_type': 'pdf',
            'length_unit': 'CM',
            'packages': [{'description': 'Groceries',
                          'height': 4,
                          'length': 10,
                          'weight': 2.5,
                          'width': 8},
                         {'description': 'Bluray',
                          'height': 3,
                          'length': 5,
                          'weight': 200,
                          'width': 5}],
            'password': 'your-wskey',
            'service': 'GRND',
            'ship_addr1': '7400 W Buckeye Rd',
            'ship_city': 'Phoenix',
            'ship_code': '85043',
            'ship_contact': 'Warehouse Manager',
            'ship_phone': '6025551234',
            'ship_state': 'AZ',
            'shipper': 'RocketShipIt',
            'signature_type': 'REQUIRED',
            'test': True,
            'to_addr1': '132 N F St',
            'to_addr2': 'Suite 200',
            'to_city': 'Lake Worth',
            'to_code': '33460',
            'to_company': 'Acme Inc',
            'to_name': 'Jane Doe',
            'to_phone': '7037619031',
            'to_state': 'FL',
            'username': 'your-wsid',
            'weight_unit': 'G'}}

)

rs.request(
  {"carrier"=>"OnTrac-REST",
 "action"=>"submitshipment",
 "params"=>
  {"username"=>"your-wsid",
   "password"=>"your-wskey",
   "account_number"=>"FAKECSBR",
   "test"=>true,
   "service"=>"GRND",
   "image_type"=>"pdf",
   "attributes"=>["Perishable", "NoRTS"],
   "signature_type"=>"REQUIRED",
   "shipper"=>"RocketShipIt",
   "ship_contact"=>"Warehouse Manager",
   "ship_addr1"=>"7400 W Buckeye Rd",
   "ship_city"=>"Phoenix",
   "ship_state"=>"AZ",
   "ship_code"=>"85043",
   "ship_phone"=>"6025551234",
   "to_name"=>"Jane Doe",
   "to_company"=>"Acme Inc",
   "to_addr1"=>"132 N F St",
   "to_addr2"=>"Suite 200",
   "to_city"=>"Lake Worth",
   "to_state"=>"FL",
   "to_code"=>"33460",
   "to_phone"=>"7037619031",
   "from_company"=>"RMA Department",
   "from_name"=>"Returns Desk",
   "from_addr1"=>"123 Main St",
   "from_city"=>"National City",
   "from_state"=>"CA",
   "from_code"=>"91950",
   "from_phone"=>"7037619032",
   "packages"=>
    [{"weight"=>2.5,
      "length"=>10,
      "width"=>8,
      "height"=>4,
      "description"=>"Groceries"},
     {"weight"=>200,
      "length"=>5,
      "width"=>5,
      "height"=>3,
      "description"=>"Bluray"}],
   "weight_unit"=>"G",
   "length_unit"=>"CM"}}

)

rocketshipit.request(
  {
  "carrier": "OnTrac-REST",
  "action": "submitshipment",
  "params": {
    "username": "your-wsid",
    "password": "your-wskey",
    "account_number": "FAKECSBR",
    "test": true,
    "service": "GRND",
    "image_type": "pdf",
    "attributes": ["Perishable", "NoRTS"],
    "signature_type": "REQUIRED",
    "shipper": "RocketShipIt",
    "ship_contact": "Warehouse Manager",
    "ship_addr1": "7400 W Buckeye Rd",
    "ship_city": "Phoenix",
    "ship_state": "AZ",
    "ship_code": "85043",
    "ship_phone": "6025551234",
    "to_name": "Jane Doe",
    "to_company": "Acme Inc",
    "to_addr1": "132 N F St",
    "to_addr2": "Suite 200",
    "to_city": "Lake Worth",
    "to_state": "FL",
    "to_code": "33460",
    "to_phone": "7037619031",
    "from_company": "RMA Department",
    "from_name": "Returns Desk",
    "from_addr1": "123 Main St",
    "from_city": "National City",
    "from_state": "CA",
    "from_code": "91950",
    "from_phone": "7037619032",
    "packages": [
      {
        "weight": 2.5,
        "length": 10,
        "width": 8,
        "height": 4,
        "description": "Groceries"
      },
      {
        "weight": 200,
        "length": 5,
        "width": 5,
        "height": 3,
        "description": "Bluray"
      }
    ],
    "weight_unit": "G",
    "length_unit": "CM"
  }
}
)

← All OnTrac-REST examples