OnTrac - Rates

Carrier: OnTrac
Action: Rates
Description: Example implementation for OnTrac Rates
{
  "carrier": "OnTrac",
  "action": "GetAllRates",
  "params": {
    "test": true,
    "account_number": "37",
    "password": "testpass",
    "packages": [
      {
        "weight": 20.2,
        "length": 5,
        "width": 7,
        "height": 7
      }
    ],
    "customs": [],
    "ship_code": "90210",
    "to_code": "94115",
    "weight_unit": "LB",
    "service": ""
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'OnTrac',
  'action' => 'GetAllRates',
  'params' => 
  array (
    'test' => true,
    'account_number' => '37',
    'password' => 'testpass',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 20.2,
        'length' => 5,
        'width' => 7,
        'height' => 7,
      ),
    ),
    'customs' => 
    array (
    ),
    'ship_code' => '90210',
    'to_code' => '94115',
    'weight_unit' => 'LB',
    'service' => '',
  ),
)
);

rs.request(
  {'action': 'GetAllRates',
 'carrier': 'OnTrac',
 'params': {'account_number': '37',
            'customs': [],
            'packages': [{'height': 7,
                          'length': 5,
                          'weight': 20.2,
                          'width': 7}],
            'password': 'testpass',
            'service': '',
            'ship_code': '90210',
            'test': True,
            'to_code': '94115',
            'weight_unit': 'LB'}}

)

rs.request(
  {"carrier"=>"OnTrac",
 "action"=>"GetAllRates",
 "params"=>
  {"test"=>true,
   "account_number"=>"37",
   "password"=>"testpass",
   "packages"=>[{"weight"=>20.2, "length"=>5, "width"=>7, "height"=>7}],
   "customs"=>[],
   "ship_code"=>"90210",
   "to_code"=>"94115",
   "weight_unit"=>"LB",
   "service"=>""}}

)

rocketshipit.request(
  {
  "carrier": "OnTrac",
  "action": "GetAllRates",
  "params": {
    "test": true,
    "account_number": "37",
    "password": "testpass",
    "packages": [
      {
        "weight": 20.2,
        "length": 5,
        "width": 7,
        "height": 7
      }
    ],
    "customs": [],
    "ship_code": "90210",
    "to_code": "94115",
    "weight_unit": "LB",
    "service": ""
  }
}
)
← Back to All Examples

Other OnTrac Examples

Label
Example implementation for OnTrac Label
Label with References
Example implementation for OnTrac Label with References
Pickup
Example implementation for OnTrac Pickup
Tracking
Example implementation for OnTrac Tracking