UPS-REST - Label Hazmat

Carrier: UPS-REST
Action: Label Hazmat
Description: Example implementation for UPS-REST Label Hazmat
{
  "carrier": "UPS-REST",
  "action": "SubmitShipment",
  "params": {
    "account_number": "your-account-number",
    "key": "your-key-from-authenticate-request",
    "service": "03",
    "hazmat_regulation_set": "CFR",
    "packages": [
      {
        "weight": 25,
        "length": 10,
        "width": 10,
        "height": 10,
        "hazmat": {
          "transport_mode": "Ground",
          "emergency_phone": "8005551234",
          "emergency_contact": "Hazmat Response Team",
          "all_packed_in_one": true,
          "overpack": true,
          "q_value": "0.5",
          "outer_packaging_type": "FIBERBOARD BOX",
          "chemical_records": [
            {
              "identifier": "1",
              "regulation_set": "CFR",
              "regulated_level_code": "FR",
              "id_number": "UN3480",
              "proper_shipping_name": "Lithium ion batteries",
              "technical_name": "Lithium Ion",
              "local_proper_shipping_name": "Batteries",
              "local_technical_name": "Li-Ion",
              "class_division_number": "9",
              "sub_risk_class": "4.1",
              "packaging_group": "II",
              "quantity": "6",
              "uom": "kg",
              "packaging_instruction_code": "965",
              "packaging_type": "Fiberboard Box",
              "packaging_type_quantity": "1",
              "hazard_label": "Y",
              "reportable_quantity": "RQ",
              "reference_number": "REF-001",
              "additional_description": "Limited Quantity",
              "transport_category": "0",
              "tunnel_restriction_code": "D/E",
              "adr_item_number": "1234567890",
              "adr_packing_group_letter": "2",
              "record_identifier_1": "R1",
              "record_identifier_2": "R2",
              "record_identifier_3": "R3"
            },
            {
              "identifier": "2",
              "regulated_level_code": "LQ",
              "id_number": "UN1088",
              "proper_shipping_name": "Acetal",
              "class_division_number": "3",
              "packaging_group": "II",
              "quantity": "100",
              "uom": "ml",
              "packaging_instruction_code": "Y341",
              "packaging_type": "Fiberboard Box",
              "packaging_type_quantity": "1"
            }
          ]
        }
      }
    ],
    "shipper": "RocketShipIt",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "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": "PNG",
    "test": true
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'UPS-REST',
  'action' => 'SubmitShipment',
  'params' => 
  array (
    'account_number' => 'your-account-number',
    'key' => 'your-key-from-authenticate-request',
    'service' => '03',
    'hazmat_regulation_set' => 'CFR',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 25,
        'length' => 10,
        'width' => 10,
        'height' => 10,
        'hazmat' => 
        array (
          'transport_mode' => 'Ground',
          'emergency_phone' => '8005551234',
          'emergency_contact' => 'Hazmat Response Team',
          'all_packed_in_one' => true,
          'overpack' => true,
          'q_value' => '0.5',
          'outer_packaging_type' => 'FIBERBOARD BOX',
          'chemical_records' => 
          array (
            0 => 
            array (
              'identifier' => '1',
              'regulation_set' => 'CFR',
              'regulated_level_code' => 'FR',
              'id_number' => 'UN3480',
              'proper_shipping_name' => 'Lithium ion batteries',
              'technical_name' => 'Lithium Ion',
              'local_proper_shipping_name' => 'Batteries',
              'local_technical_name' => 'Li-Ion',
              'class_division_number' => '9',
              'sub_risk_class' => '4.1',
              'packaging_group' => 'II',
              'quantity' => '6',
              'uom' => 'kg',
              'packaging_instruction_code' => '965',
              'packaging_type' => 'Fiberboard Box',
              'packaging_type_quantity' => '1',
              'hazard_label' => 'Y',
              'reportable_quantity' => 'RQ',
              'reference_number' => 'REF-001',
              'additional_description' => 'Limited Quantity',
              'transport_category' => '0',
              'tunnel_restriction_code' => 'D/E',
              'adr_item_number' => '1234567890',
              'adr_packing_group_letter' => '2',
              'record_identifier_1' => 'R1',
              'record_identifier_2' => 'R2',
              'record_identifier_3' => 'R3',
            ),
            1 => 
            array (
              'identifier' => '2',
              'regulated_level_code' => 'LQ',
              'id_number' => 'UN1088',
              'proper_shipping_name' => 'Acetal',
              'class_division_number' => '3',
              'packaging_group' => 'II',
              'quantity' => '100',
              'uom' => 'ml',
              'packaging_instruction_code' => 'Y341',
              'packaging_type' => 'Fiberboard Box',
              'packaging_type_quantity' => '1',
            ),
          ),
        ),
      ),
    ),
    'shipper' => 'RocketShipIt',
    'ship_addr1' => '123 Main St',
    'ship_city' => 'Whitehall',
    'ship_state' => 'MT',
    'ship_code' => '59759',
    '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' => 'PNG',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'SubmitShipment',
 'carrier': 'UPS-REST',
 'params': {'account_number': 'your-account-number',
            'hazmat_regulation_set': 'CFR',
            'image_type': 'PNG',
            'key': 'your-key-from-authenticate-request',
            'packages': [{'hazmat': {'all_packed_in_one': True,
                                     'chemical_records': [{'additional_description': 'Limited '
                                                                                     'Quantity',
                                                           'adr_item_number': '1234567890',
                                                           'adr_packing_group_letter': '2',
                                                           'class_division_number': '9',
                                                           'hazard_label': 'Y',
                                                           'id_number': 'UN3480',
                                                           'identifier': '1',
                                                           'local_proper_shipping_name': 'Batteries',
                                                           'local_technical_name': 'Li-Ion',
                                                           'packaging_group': 'II',
                                                           'packaging_instruction_code': '965',
                                                           'packaging_type': 'Fiberboard '
                                                                             'Box',
                                                           'packaging_type_quantity': '1',
                                                           'proper_shipping_name': 'Lithium '
                                                                                   'ion '
                                                                                   'batteries',
                                                           'quantity': '6',
                                                           'record_identifier_1': 'R1',
                                                           'record_identifier_2': 'R2',
                                                           'record_identifier_3': 'R3',
                                                           'reference_number': 'REF-001',
                                                           'regulated_level_code': 'FR',
                                                           'regulation_set': 'CFR',
                                                           'reportable_quantity': 'RQ',
                                                           'sub_risk_class': '4.1',
                                                           'technical_name': 'Lithium '
                                                                             'Ion',
                                                           'transport_category': '0',
                                                           'tunnel_restriction_code': 'D/E',
                                                           'uom': 'kg'},
                                                          {'class_division_number': '3',
                                                           'id_number': 'UN1088',
                                                           'identifier': '2',
                                                           'packaging_group': 'II',
                                                           'packaging_instruction_code': 'Y341',
                                                           'packaging_type': 'Fiberboard '
                                                                             'Box',
                                                           'packaging_type_quantity': '1',
                                                           'proper_shipping_name': 'Acetal',
                                                           'quantity': '100',
                                                           'regulated_level_code': 'LQ',
                                                           'uom': 'ml'}],
                                     'emergency_contact': 'Hazmat Response '
                                                          'Team',
                                     'emergency_phone': '8005551234',
                                     'outer_packaging_type': 'FIBERBOARD BOX',
                                     'overpack': True,
                                     'q_value': '0.5',
                                     'transport_mode': 'Ground'},
                          'height': 10,
                          'length': 10,
                          'weight': 25,
                          'width': 10}],
            'service': '03',
            'ship_addr1': '123 Main St',
            'ship_city': 'Whitehall',
            'ship_code': '59759',
            'ship_country': 'US',
            'ship_phone': '1231231234',
            'ship_state': 'MT',
            '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"=>"UPS-REST",
 "action"=>"SubmitShipment",
 "params"=>
  {"account_number"=>"your-account-number",
   "key"=>"your-key-from-authenticate-request",
   "service"=>"03",
   "hazmat_regulation_set"=>"CFR",
   "packages"=>
    [{"weight"=>25,
      "length"=>10,
      "width"=>10,
      "height"=>10,
      "hazmat"=>
       {"transport_mode"=>"Ground",
        "emergency_phone"=>"8005551234",
        "emergency_contact"=>"Hazmat Response Team",
        "all_packed_in_one"=>true,
        "overpack"=>true,
        "q_value"=>"0.5",
        "outer_packaging_type"=>"FIBERBOARD BOX",
        "chemical_records"=>
         [{"identifier"=>"1",
           "regulation_set"=>"CFR",
           "regulated_level_code"=>"FR",
           "id_number"=>"UN3480",
           "proper_shipping_name"=>"Lithium ion batteries",
           "technical_name"=>"Lithium Ion",
           "local_proper_shipping_name"=>"Batteries",
           "local_technical_name"=>"Li-Ion",
           "class_division_number"=>"9",
           "sub_risk_class"=>"4.1",
           "packaging_group"=>"II",
           "quantity"=>"6",
           "uom"=>"kg",
           "packaging_instruction_code"=>"965",
           "packaging_type"=>"Fiberboard Box",
           "packaging_type_quantity"=>"1",
           "hazard_label"=>"Y",
           "reportable_quantity"=>"RQ",
           "reference_number"=>"REF-001",
           "additional_description"=>"Limited Quantity",
           "transport_category"=>"0",
           "tunnel_restriction_code"=>"D/E",
           "adr_item_number"=>"1234567890",
           "adr_packing_group_letter"=>"2",
           "record_identifier_1"=>"R1",
           "record_identifier_2"=>"R2",
           "record_identifier_3"=>"R3"},
          {"identifier"=>"2",
           "regulated_level_code"=>"LQ",
           "id_number"=>"UN1088",
           "proper_shipping_name"=>"Acetal",
           "class_division_number"=>"3",
           "packaging_group"=>"II",
           "quantity"=>"100",
           "uom"=>"ml",
           "packaging_instruction_code"=>"Y341",
           "packaging_type"=>"Fiberboard Box",
           "packaging_type_quantity"=>"1"}]}}],
   "shipper"=>"RocketShipIt",
   "ship_addr1"=>"123 Main St",
   "ship_city"=>"Whitehall",
   "ship_state"=>"MT",
   "ship_code"=>"59759",
   "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"=>"PNG",
   "test"=>true}}

)

rocketshipit.request(
  {
  "carrier": "UPS-REST",
  "action": "SubmitShipment",
  "params": {
    "account_number": "your-account-number",
    "key": "your-key-from-authenticate-request",
    "service": "03",
    "hazmat_regulation_set": "CFR",
    "packages": [
      {
        "weight": 25,
        "length": 10,
        "width": 10,
        "height": 10,
        "hazmat": {
          "transport_mode": "Ground",
          "emergency_phone": "8005551234",
          "emergency_contact": "Hazmat Response Team",
          "all_packed_in_one": true,
          "overpack": true,
          "q_value": "0.5",
          "outer_packaging_type": "FIBERBOARD BOX",
          "chemical_records": [
            {
              "identifier": "1",
              "regulation_set": "CFR",
              "regulated_level_code": "FR",
              "id_number": "UN3480",
              "proper_shipping_name": "Lithium ion batteries",
              "technical_name": "Lithium Ion",
              "local_proper_shipping_name": "Batteries",
              "local_technical_name": "Li-Ion",
              "class_division_number": "9",
              "sub_risk_class": "4.1",
              "packaging_group": "II",
              "quantity": "6",
              "uom": "kg",
              "packaging_instruction_code": "965",
              "packaging_type": "Fiberboard Box",
              "packaging_type_quantity": "1",
              "hazard_label": "Y",
              "reportable_quantity": "RQ",
              "reference_number": "REF-001",
              "additional_description": "Limited Quantity",
              "transport_category": "0",
              "tunnel_restriction_code": "D/E",
              "adr_item_number": "1234567890",
              "adr_packing_group_letter": "2",
              "record_identifier_1": "R1",
              "record_identifier_2": "R2",
              "record_identifier_3": "R3"
            },
            {
              "identifier": "2",
              "regulated_level_code": "LQ",
              "id_number": "UN1088",
              "proper_shipping_name": "Acetal",
              "class_division_number": "3",
              "packaging_group": "II",
              "quantity": "100",
              "uom": "ml",
              "packaging_instruction_code": "Y341",
              "packaging_type": "Fiberboard Box",
              "packaging_type_quantity": "1"
            }
          ]
        }
      }
    ],
    "shipper": "RocketShipIt",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "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": "PNG",
    "test": true
  }
}
)
← Back to UPS-REST Examples

Other UPS-REST Examples

Acceptance Audit Precheck
Example implementation for UPS-REST Acceptance Audit Precheck
Address Validation
Example implementation for UPS-REST Address Validation
Address Validation City/State from Zip
Example implementation for UPS-REST Address Validation City/State from Zip
Authenticate
Example implementation for UPS-REST Authenticate
Chemical Reference Lookup
Example implementation for UPS-REST Chemical Reference Lookup
Delivery Intercept Cancel
Example implementation for UPS-REST Delivery Intercept Cancel
Delivery Intercept Charges
Example implementation for UPS-REST Delivery Intercept Charges
Delivery Intercept Eligibility
Example implementation for UPS-REST Delivery Intercept Eligibility
Delivery Intercept Redirect
Example implementation for UPS-REST Delivery Intercept Redirect
Delivery Intercept Reschedule
Example implementation for UPS-REST Delivery Intercept Reschedule
Delivery Intercept Return to Sender
Example implementation for UPS-REST Delivery Intercept Return to Sender
Delivery Intercept Will Call
Example implementation for UPS-REST Delivery Intercept Will Call
Download CSV
Example implementation for UPS-REST Download CSV
International w/ Com. Inv.
Example implementation for UPS-REST International w/ Com. Inv.
International w/ Com. Inv. with EEI
Example implementation for UPS-REST International w/ Com. Inv. with EEI
Label
Example implementation for UPS-REST Label
Label Additional Handling
Example implementation for UPS-REST Label Additional Handling
Label Alt Address
Example implementation for UPS-REST Label Alt Address
Label COD
Example implementation for UPS-REST Label COD
Label Carbon Neutral
Example implementation for UPS-REST Label Carbon Neutral
Label DDP/DDU
Example implementation for UPS-REST Label DDP/DDU
Label Direct Adult Signature
Example implementation for UPS-REST Label Direct Adult Signature
Label Direct Delivery Only
Example implementation for UPS-REST Label Direct Delivery Only
Label Direct Signature
Example implementation for UPS-REST Label Direct Signature
Label Email Notifications
Example implementation for UPS-REST Label Email Notifications
Label Ground Freight Pricing
Example implementation for UPS-REST Label Ground Freight Pricing
Label Insurance
Example implementation for UPS-REST Label Insurance
Label Lithium Battery
Example implementation for UPS-REST Label Lithium Battery
Label Mail Innovations
Example implementation for UPS-REST Label Mail Innovations
Label NAFTA CO
Example implementation for UPS-REST Label NAFTA CO
Label Recovery
Example implementation for UPS-REST Label Recovery
Label Reference Values
Example implementation for UPS-REST Label Reference Values
Label Return
Example implementation for UPS-REST Label Return
Label Return w/ Email Delivery
Example implementation for UPS-REST Label Return w/ Email Delivery
Label SurePost
Example implementation for UPS-REST Label SurePost
Label Third Party Billing
Example implementation for UPS-REST Label Third Party Billing
Label With Promo Discount
Example implementation for UPS-REST Label With Promo Discount
Label w/ Access Point
Example implementation for UPS-REST Label w/ Access Point
Landed Cost
Example implementation for UPS-REST Landed Cost
Landed Cost Multiple Items
Example implementation for UPS-REST Landed Cost Multiple Items
Letter International w/ Com. Inv.
Example implementation for UPS-REST Letter International w/ Com. Inv.
Locator
Example implementation for UPS-REST Locator
Pickup Cancel
Example implementation for UPS-REST Pickup Cancel
Pickup Rate
Example implementation for UPS-REST Pickup Rate
Pickup Schedule
Example implementation for UPS-REST Pickup Schedule
Pickup Status
Example implementation for UPS-REST Pickup Status
Pickup Status Oncall
Example implementation for UPS-REST Pickup Status Oncall
Rates
Example implementation for UPS-REST Rates
Rates Additional Handling
Example implementation for UPS-REST Rates Additional Handling
Rates COD
Example implementation for UPS-REST Rates COD
Rates Daily
Example implementation for UPS-REST Rates Daily
Rates Ground Freight Pricing
Example implementation for UPS-REST Rates Ground Freight Pricing
Rates International
Example implementation for UPS-REST Rates International
Rates Negotiated
Example implementation for UPS-REST Rates Negotiated
Rates Retail
Example implementation for UPS-REST Rates Retail
Rates Simple Rate
Example implementation for UPS-REST Rates Simple Rate
Rates Single
Example implementation for UPS-REST Rates Single
Rates SurePost
Example implementation for UPS-REST Rates SurePost
Rates with Return Service
Example implementation for UPS-REST Rates with Return Service
Rating w/ Access Point
Example implementation for UPS-REST Rating w/ Access Point
Time in Transit
Example implementation for UPS-REST Time in Transit
Time in Transit International
Example implementation for UPS-REST Time in Transit International
Track Alert (webhook)
Example implementation for UPS-REST Track Alert (webhook)
Track Alert Multiple (webhook)
Example implementation for UPS-REST Track Alert Multiple (webhook)
Track by Reference Number
Example implementation for UPS-REST Track by Reference Number
Tracking
Example implementation for UPS-REST Tracking
Tracking Mail Innovations
Example implementation for UPS-REST Tracking Mail Innovations
Upload Customs Document
Example implementation for UPS-REST Upload Customs Document
Upload Link Customs Document
Example implementation for UPS-REST Upload Link Customs Document
Void Shipment
Example implementation for UPS-REST Void Shipment