RocketShipIt

RocketShipIt

  • Docs
  • API Examples

›Guides

Guides

  • Getting Started
  • API Explorer
  • Errors
  • Self-Hosting
  • Cloud API
  • Rating
  • Tracking
  • Shipping Labels
  • Address Validation
  • Batch Requests
  • ETD / Paperless Customs
  • Thermal Printing
  • Add a logo to the shipping label
  • Add Reference Values to Labels
  • Return Labels
  • Scale Integrations
  • Laravel
  • FedEx Ground Collect
  • UPS Mail Innovations
  • Saturday Delivery
  • Find Locations
  • FedEx Test Environment
  • Switching UPS, FedEx, USPS REST
  • Authenticating Multiple UPS Accounts with UPS REST API
  • Authenticating with REST oauth APIs
  • Customizing RocketShipIt Requests
  • Hazardous Materials

References

  • Requirements
  • Supported Shipping Carriers
  • Carrier Authentication
  • API Examples
  • Request/Response Format
  • Parameters
  • Carrier Errors
  • Command Line Options
  • Label Transformations
  • Supported Address Validation Countries
  • DHL Addons (Special Service Codes)
  • Rate Details
  • GetSubscription
  • Accessorial / Surcharge Codes
  • Shipping Carrier APIs
  • FedEx SmartPost
  • Carrier Parameters
  • UPS API Parameters
  • FedEx API Parameters
  • API REST Migration Deadlines

Troubleshooting

  • What if I run into trouble?
  • FAQs
  • Inaccurate Rates?

Hazardous Materials (Dangerous Goods)

RocketShipIt supports shipping hazardous materials (dangerous goods) for carriers that offer it. This includes creating hazmat shipping labels and getting rates that reflect Dangerous Goods surcharges such as lithium battery fees.

Note: Hazardous materials shipping is subject to strict regulations. Ensure you are familiar with the applicable regulations (CFR, IATA, ADR, TDG) for your shipments. RocketShipIt does not validate compliance — it is your responsibility to ensure all hazmat data is accurate.

Supported Carriers

  • UPS (REST API)

Key Parameters

Hazmat data is set at the package level using the hazmat object inside each package. Additionally, the hazmat_regulation_set parameter can be set at the request level as a default for all chemical records.

ParameterDescription
hazmat_regulation_setTop-level default regulation set: CFR, IATA, ADR, or TDG
hazmat.transport_modeTransport method: Ground, CAO (Cargo Aircraft Only), PAX (Passenger Aircraft), Highway
hazmat.emergency_phone24-hour emergency response phone number
hazmat.emergency_contactEmergency contact name
hazmat.all_packed_in_oneSet true if all hazmat items are packed in one package
hazmat.overpackSet true if the package is an overpack
hazmat.q_valueQ-value for IATA AllPackedInOne (0.1–1.0)
hazmat.outer_packaging_typeOuter packaging type description (shipping labels only)
hazmat.chemical_recordsArray of chemical records (max 3 per package for UPS)

Chemical Record Fields

Each entry in chemical_records supports the following fields:

ParameterDescription
identifierUnique identifier for this chemical record within the package
regulation_setPer-chemical regulation set, overrides hazmat_regulation_set
regulated_level_codeFR (fully regulated), LQ (limited quantity), LR (lightly regulated), EQ (excepted quantity)
id_numberUN/NA/ID number (e.g., UN3480)
proper_shipping_nameDOT proper shipping name
technical_nameTechnical/chemical name
class_division_numberHazard class (e.g., 9, 3, 4.1)
sub_risk_classSubsidiary risk class
packaging_groupPacking group (I, II, or III)
quantityQuantity of the hazardous material
uomUnit of measure (e.g., kg, ml)
packaging_instruction_codePackaging instruction code (e.g., 965)
packaging_typeType of inner packaging
packaging_type_quantityNumber of inner packages
hazard_labelHazard label required indicator
reportable_quantityReportable quantity indicator (e.g., RQ)
additional_descriptionAdditional description text
transport_categoryTransport category
tunnel_restriction_codeTunnel restriction code (e.g., D/E)

Hazmat Shipping Labels

To create a hazmat shipping label use the SubmitShipment action with the hazmat object on the package. The outer_packaging_type field is only used for shipping labels, not rating.

{
  "carrier": "UPS-REST",
  "action": "SubmitShipment",
  "params": {
    "account_number": "YOUR_ACCOUNT_NUMBER",
    "key": "YOUR_UPS_API_KEY",
    "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",
              "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",
              "additional_description": "Limited Quantity",
              "transport_category": "0",
              "tunnel_restriction_code": "D/E"
            }
          ]
        }
      }
    ],
    "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",
    "test": true
  }
}

Hazmat Rating

To get rates that include Dangerous Goods surcharges, use the GetAllRates action with the same hazmat object on the package. This is useful for quoting accurate shipping costs for orders containing hazardous materials like lithium batteries.

The request is nearly identical to the label request. The only differences are:

  • action is GetAllRates instead of SubmitShipment
  • outer_packaging_type is not used for rating
{
  "carrier": "UPS-REST",
  "action": "GetAllRates",
  "params": {
    "account_number": "YOUR_ACCOUNT_NUMBER",
    "key": "YOUR_UPS_API_KEY",
    "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",
          "chemical_records": [
            {
              "identifier": "1",
              "regulation_set": "CFR",
              "regulated_level_code": "FR",
              "id_number": "UN3480",
              "proper_shipping_name": "Lithium ion batteries",
              "technical_name": "Lithium 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",
              "additional_description": "Limited Quantity",
              "transport_category": "0",
              "tunnel_restriction_code": "D/E"
            }
          ]
        }
      }
    ],
    "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",
    "test": true
  }
}

The response will include rates with any applicable Dangerous Goods surcharges. You can inspect the rate_detail array on each rate to see itemized charges.

Multiple Chemical Records

You can include up to 3 chemical records per package for UPS. Each record can have its own regulation_set — if omitted, it falls back to the top-level hazmat_regulation_set.

"chemical_records": [
  {
    "identifier": "1",
    "regulation_set": "CFR",
    "regulated_level_code": "FR",
    "id_number": "UN3480",
    "proper_shipping_name": "Lithium ion batteries",
    "class_division_number": "9",
    "quantity": "6",
    "uom": "kg",
    "packaging_instruction_code": "965",
    "packaging_type": "Fiberboard Box",
    "packaging_type_quantity": "1"
  },
  {
    "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"
  }
]

Note that the second record does not set regulation_set — it will use the value from hazmat_regulation_set at the request level.

API Examples

  • UPS-REST Hazmat Label
  • UPS-REST Hazmat Rates
← Customizing RocketShipIt RequestsRequirements →
  • Supported Carriers
  • Key Parameters
    • Chemical Record Fields
  • Hazmat Shipping Labels
  • Hazmat Rating
  • Multiple Chemical Records
  • API Examples
RocketShipIt
Docs
Getting StartedAPI Reference
RocketShipIt
SupportMy Account
Copyright © 2026 RocketShipIt LLC