DHL eCommerce - International Label

Carrier
DHL eCommerce
Action
International Label
{
  "carrier": "DHL-ecommerce",
  "action": "submitshipment",
  "params": {
    "username": "YOUR_DHL_CLIENT_ID",
    "password": "YOUR_DHL_CLIENT_SECRET",
    "account_number": "YOUR_DHL_PICKUP_ID",
    "service": "PLT",
    "monetary_value": 10.00,
    "packages": [
      {
        "weight": 0.3
      }
    ],
    "customs": [
      {
        "commodity_code": "000000",
        "invoice_line_description": "Acme product 1",
        "invoice_line_origin_country_code": "US",
        "invoice_line_value": "2.00",
        "invoice_line_part_number": "abc123"
      }
    ],
    "shipper": "Mr. Returns",
    "ship_contact": "John Smith",
    "ship_addr1": "1500 South Point Dr.",
    "ship_city": "Forrest Park",
    "ship_state": "GA",
    "ship_code": "30297",
    "ship_phone": "123-123-1234",
    "to_name": "Joe Bloggs",
    "to_addr1": "5048 - 264th Street",
    "to_state": "BC",
    "to_city": "Aldergrove",
    "to_code": "V4W1N7",
    "to_country": "CA",
    "to_phone": "123-123-1234"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'DHL-ecommerce',
  'action' => 'submitshipment',
  'params' => 
  array (
    'username' => 'YOUR_DHL_CLIENT_ID',
    'password' => 'YOUR_DHL_CLIENT_SECRET',
    'account_number' => 'YOUR_DHL_PICKUP_ID',
    'service' => 'PLT',
    'monetary_value' => 10.0,
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 0.3,
      ),
    ),
    'customs' => 
    array (
      0 => 
      array (
        'commodity_code' => '000000',
        'invoice_line_description' => 'Acme product 1',
        'invoice_line_origin_country_code' => 'US',
        'invoice_line_value' => '2.00',
        'invoice_line_part_number' => 'abc123',
      ),
    ),
    'shipper' => 'Mr. Returns',
    'ship_contact' => 'John Smith',
    'ship_addr1' => '1500 South Point Dr.',
    'ship_city' => 'Forrest Park',
    'ship_state' => 'GA',
    'ship_code' => '30297',
    'ship_phone' => '123-123-1234',
    'to_name' => 'Joe Bloggs',
    'to_addr1' => '5048 - 264th Street',
    'to_state' => 'BC',
    'to_city' => 'Aldergrove',
    'to_code' => 'V4W1N7',
    'to_country' => 'CA',
    'to_phone' => '123-123-1234',
  ),
)
);

rs.request(
  {'action': 'submitshipment',
 'carrier': 'DHL-ecommerce',
 'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
            'customs': [{'commodity_code': '000000',
                         'invoice_line_description': 'Acme product 1',
                         'invoice_line_origin_country_code': 'US',
                         'invoice_line_part_number': 'abc123',
                         'invoice_line_value': '2.00'}],
            'monetary_value': 10.0,
            'packages': [{'weight': 0.3}],
            'password': 'YOUR_DHL_CLIENT_SECRET',
            'service': 'PLT',
            'ship_addr1': '1500 South Point Dr.',
            'ship_city': 'Forrest Park',
            'ship_code': '30297',
            'ship_contact': 'John Smith',
            'ship_phone': '123-123-1234',
            'ship_state': 'GA',
            'shipper': 'Mr. Returns',
            'to_addr1': '5048 - 264th Street',
            'to_city': 'Aldergrove',
            'to_code': 'V4W1N7',
            'to_country': 'CA',
            'to_name': 'Joe Bloggs',
            'to_phone': '123-123-1234',
            'to_state': 'BC',
            'username': 'YOUR_DHL_CLIENT_ID'}}

)

rs.request(
  {"carrier"=>"DHL-ecommerce",
 "action"=>"submitshipment",
 "params"=>
  {"username"=>"YOUR_DHL_CLIENT_ID",
   "password"=>"YOUR_DHL_CLIENT_SECRET",
   "account_number"=>"YOUR_DHL_PICKUP_ID",
   "service"=>"PLT",
   "monetary_value"=>10.0,
   "packages"=>[{"weight"=>0.3}],
   "customs"=>
    [{"commodity_code"=>"000000",
      "invoice_line_description"=>"Acme product 1",
      "invoice_line_origin_country_code"=>"US",
      "invoice_line_value"=>"2.00",
      "invoice_line_part_number"=>"abc123"}],
   "shipper"=>"Mr. Returns",
   "ship_contact"=>"John Smith",
   "ship_addr1"=>"1500 South Point Dr.",
   "ship_city"=>"Forrest Park",
   "ship_state"=>"GA",
   "ship_code"=>"30297",
   "ship_phone"=>"123-123-1234",
   "to_name"=>"Joe Bloggs",
   "to_addr1"=>"5048 - 264th Street",
   "to_state"=>"BC",
   "to_city"=>"Aldergrove",
   "to_code"=>"V4W1N7",
   "to_country"=>"CA",
   "to_phone"=>"123-123-1234"}}

)

rocketshipit.request(
  {
  "carrier": "DHL-ecommerce",
  "action": "submitshipment",
  "params": {
    "username": "YOUR_DHL_CLIENT_ID",
    "password": "YOUR_DHL_CLIENT_SECRET",
    "account_number": "YOUR_DHL_PICKUP_ID",
    "service": "PLT",
    "monetary_value": 10.00,
    "packages": [
      {
        "weight": 0.3
      }
    ],
    "customs": [
      {
        "commodity_code": "000000",
        "invoice_line_description": "Acme product 1",
        "invoice_line_origin_country_code": "US",
        "invoice_line_value": "2.00",
        "invoice_line_part_number": "abc123"
      }
    ],
    "shipper": "Mr. Returns",
    "ship_contact": "John Smith",
    "ship_addr1": "1500 South Point Dr.",
    "ship_city": "Forrest Park",
    "ship_state": "GA",
    "ship_code": "30297",
    "ship_phone": "123-123-1234",
    "to_name": "Joe Bloggs",
    "to_addr1": "5048 - 264th Street",
    "to_state": "BC",
    "to_city": "Aldergrove",
    "to_code": "V4W1N7",
    "to_country": "CA",
    "to_phone": "123-123-1234"
  }
}
)

← All DHL eCommerce examples