> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goshippo.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.goshippo.com/feedback

```json
{
  "path": "/docs/Shipments/hazmat",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Hazardous or dangerous materials shipping

> Declare hazardous materials like lithium batteries and biological items when creating shipments with the Shippo API.

## What are hazardous materials?

Hazardous materials are things that can cause harm to people. We commonly refer to these as hazmat or dangerous materials. These include things such as radioactive materials, lithium batteries, and biological materials. When shipping hazmat items, you must follow the carrier guidelines.
Follow this guide to learn about shipping hazmat items.

## How do I know if I am shipping hazardous materials?

USPS provides [guidelines for determining if a shipment contains hazardous materials](https://pe.usps.com/text/pub52/pub52c3_010.htm) that may impact how you ship. Review these guidelines to determine if they affect your shipment.

For domestic hazmat shipments, USPS only offer the ground service level USPS Ground Advantage.

## How do I declare that I am shipping hazardous materials?

If you have determined that you are shipping hazardous materials or the items you are shipping contain hazardous materials (for example, a mobile phone containing a lithium battery), you must declare when creating your shipment.
In your [Shipments object](/api-reference/shipments/list-all-shipments), create a `dangerous_goods` object in [shipments extra](/api-reference/shipments/list-all-shipments).

```json theme={null}
{
    "extra": { 
        "dangerous_goods": {
            "contains": true,
            "biological_material": {
                "contains": true
            },
            "lithium_batteries": {
                "contains": true
            }
        }
    }
}
```

For domestic (within the US) shipments, you must declare if your shipment contains any hazardous materials by setting `“contains”:true`

```json theme={null}
"dangerous_goods": {
	"contains": true
}
```

For domestic returns, you must set  `“contains”:true` in the `biological_material` object, if your shipment contains biological materials.

```json theme={null}
"dangerous_goods": {
	"biological_material": {
		"contains": true
	}
}
```

For international shipments, you must set `“contains”:true`, in the `lithium_batteries` object, if your shipment contains lithium batteries.

```json theme={null}
"dangerous_goods": {
	"lithium_batteries": {
		"contains": true
	}
}
```

<Info>
  **Note**

  Carefully review the USPS guidance on shipping lithium batteries internationally. Only “Class 9 - lithium batteries, unmarked package - New electronic devices installed or packaged with lithium batteries (no marking)" can be shipped internationally.
</Info>

The following example shows the creation of a shipment that contains dangerous goods.

```shell cURL theme={null}
curl https://api.goshippo.com/shipments/ \
  -H "Authorization: ShippoToken <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d $'{
      "address_to": {
          "name": "Mr Hippo",
          "street1": "965 Mission St #572",
          "city": "San Francisco",
          "state": "CA",
          "zip": "94103",
          "country": "US",
          "phone": "4151234567",
          "email": "mrhippo@shippo.com"
      },
      "address_from": {
          "name": "Mrs Hippo",
          "street1": "1092 Indian Summer Ct",
          "city": "San Jose",
          "state": "CA",
          "zip": "95122",
          "country": "US",
          "phone": "4159876543",
          "email": "mrshippo@shippo.com"
      },
      "parcels": [{
          "length": "10",
          "width": "15",
          "height": "10",
          "distance_unit": "in",
          "weight": "1",
          "mass_unit": "lb"
      }],
    “extra”:
        {
        "dangerous_goods": {
            "contains": true,
            "lithium_batteries": {
                "contains": false
                },
            "biological_material": {
                "contains": false
                }
                }
            },

      "async": false
  }'

```

The generated shipping label contains a “H” to show the package contains hazardous materials. For example, this label for a domestic shipment containing hazardous materials.

<img src="https://mintcdn.com/shippo-f4b7b609/o3pSHzWv8pMmorWX/images/Shipments/hazmat_label.png?fit=max&auto=format&n=o3pSHzWv8pMmorWX&q=85&s=ddbfa9cfdf3f94373ce7b6b8e6c861d6" alt="sample shipping label including hazmat details" width="296" height="436" data-path="images/Shipments/hazmat_label.png" />

## Hazardous materials returns

To learn about returns labels, follow our [Returns guide](/docs/Shipments/Returns). To generate a pay-on-use return label for shipping hazardous materials, create a new Shipment object with a `dangerous_goods` object and set an `is_return` field as true inside the extra attribute.

<Info>
  The Shippo API swaps the original address\_to of the outbound transaction to the address\_from for the return label.
</Info>

The following example shows the creation of a shipment that contains dangerous goods including a returns label.

```shell cURL theme={null}
curl https://api.goshippo.com/shipments/ \
  -H "Authorization: ShippoToken <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d $'{
      "address_to": {
          "name": "Mr Hippo",
          "street1": "965 Mission St #572",
          "city": "San Francisco",
          "state": "CA",
          "zip": "94103",
          "country": "US",
          "phone": "4151234567",
          "email": "mrhippo@shippo.com"
      },
      "address_from": {
          "name": "Mrs Hippo",
          "street1": "1092 Indian Summer Ct",
          "city": "San Jose",
          "state": "CA",
          "zip": "95122",
          "country": "US",
          "phone": "4159876543",
          "email": "mrshippo@shippo.com"
      },
      "parcels": [{
          "length": "10",
          "width": "15",
          "height": "10",
          "distance_unit": "in",
          "weight": "1",
          "mass_unit": "lb"
      }],
    “extra”:
        {
        "dangerous_goods": {
            "contains": true,
            "lithium_batteries": {
                "contains": false
                },
            "biological_material": {
                "contains": false
                }
                },
        "is_return": true
            },
      "async": false
  }'

```
