DHL-REST - Label

Carrier: DHL-REST
Action: Label
Description: Example implementation for DHL-REST Label
{
  "carrier": "DHL-REST",
  "action": "SubmitShipment",
  "params": {
    "client_id": "demo-key",
    "client_secret": "demo-secret",
    "account_number": "803921577",
    "packages": [
      {
        "weight": 4,
        "length": 7,
        "width": 4,
        "height": 4
      }
    ],
    "service": "N",
    "shipper": "RocketShipIt",
    "ship_addr1": "1401 Park Ave",
    "ship_city": "Emeryville",
    "ship_state": "CA",
    "ship_code": "94608",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "John Doe",
    "to_addr1": "940 Presidio Ave",
    "to_addr2": "#103",
    "to_state": "CA",
    "to_city": "San Francisco",
    "to_code": "94115",
    "to_country": "US",
    "image_type": "PDF",
    "test": true
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'DHL-REST',
  'action' => 'SubmitShipment',
  'params' => 
  array (
    'client_id' => 'demo-key',
    'client_secret' => 'demo-secret',
    'account_number' => '803921577',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 4,
        'length' => 7,
        'width' => 4,
        'height' => 4,
      ),
    ),
    'service' => 'N',
    'shipper' => 'RocketShipIt',
    'ship_addr1' => '1401 Park Ave',
    'ship_city' => 'Emeryville',
    'ship_state' => 'CA',
    'ship_code' => '94608',
    'ship_phone' => '1231231234',
    'ship_country' => 'US',
    'to_name' => 'John Doe',
    'to_addr1' => '940 Presidio Ave',
    'to_addr2' => '#103',
    'to_state' => 'CA',
    'to_city' => 'San Francisco',
    'to_code' => '94115',
    'to_country' => 'US',
    'image_type' => 'PDF',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'SubmitShipment',
 'carrier': 'DHL-REST',
 'params': {'account_number': '803921577',
            'client_id': 'demo-key',
            'client_secret': 'demo-secret',
            'image_type': 'PDF',
            'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
            'service': 'N',
            'ship_addr1': '1401 Park Ave',
            'ship_city': 'Emeryville',
            'ship_code': '94608',
            'ship_country': 'US',
            'ship_phone': '1231231234',
            'ship_state': 'CA',
            'shipper': 'RocketShipIt',
            'test': True,
            'to_addr1': '940 Presidio Ave',
            'to_addr2': '#103',
            'to_city': 'San Francisco',
            'to_code': '94115',
            'to_country': 'US',
            'to_name': 'John Doe',
            'to_state': 'CA'}}

)

rs.request(
  {"carrier"=>"DHL-REST",
 "action"=>"SubmitShipment",
 "params"=>
  {"client_id"=>"demo-key",
   "client_secret"=>"demo-secret",
   "account_number"=>"803921577",
   "packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
   "service"=>"N",
   "shipper"=>"RocketShipIt",
   "ship_addr1"=>"1401 Park Ave",
   "ship_city"=>"Emeryville",
   "ship_state"=>"CA",
   "ship_code"=>"94608",
   "ship_phone"=>"1231231234",
   "ship_country"=>"US",
   "to_name"=>"John Doe",
   "to_addr1"=>"940 Presidio Ave",
   "to_addr2"=>"#103",
   "to_state"=>"CA",
   "to_city"=>"San Francisco",
   "to_code"=>"94115",
   "to_country"=>"US",
   "image_type"=>"PDF",
   "test"=>true}}

)

rocketshipit.request(
  {
  "carrier": "DHL-REST",
  "action": "SubmitShipment",
  "params": {
    "client_id": "demo-key",
    "client_secret": "demo-secret",
    "account_number": "803921577",
    "packages": [
      {
        "weight": 4,
        "length": 7,
        "width": 4,
        "height": 4
      }
    ],
    "service": "N",
    "shipper": "RocketShipIt",
    "ship_addr1": "1401 Park Ave",
    "ship_city": "Emeryville",
    "ship_state": "CA",
    "ship_code": "94608",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "John Doe",
    "to_addr1": "940 Presidio Ave",
    "to_addr2": "#103",
    "to_state": "CA",
    "to_city": "San Francisco",
    "to_code": "94115",
    "to_country": "US",
    "image_type": "PDF",
    "test": true
  }
}
)
← Back to All Examples

Other DHL-REST Examples

Rates
Example implementation for DHL-REST Rates
Tracking
Example implementation for DHL-REST Tracking