B2C shipment with dangerous goods

Complete flow for a battery shipment (UN 3480) to a private consignee: quotation, booking and shipping label.

A complete flow for a typical B2C shipment: a lithium-ion battery (UN 3480) on a pallet, delivered to a private person in Germany with a delivery notification and transport insurance — from the price request to the shipping label.

🧪

Try it in the sandbox

All requests use the sandbox (https://api-sandbox.cargoboard.com), so no real transport is triggered. Use an upcoming pickup date.

1. Request a quotation

curl --request POST \
     --url https://api-sandbox.cargoboard.com/v1/quotations \
     --header 'Content-Type: application/json' \
     --header 'X-API-KEY: YourKeyHere' \
     --data '
{
    "product": "STANDARD",
    "wantsInsurance": true,
    "valueOfGoodsAmount": 1800,
    "valueOfGoodsCurrency": "EUR",
    "shipper": {
        "address": {
            "postCode": "01067",
            "countryCode": "DE",
            "city": "Dresden"
        },
        "pickupOn": "2026-12-01"
    },
    "consignee": {
        "address": {
            "postCode": "80331",
            "countryCode": "DE",
            "city": "Munich"
        },
        "isPrivateCustomer": true,
        "wantsContactBeforeDelivery": true
    },
    "lines": [
        {
            "unitQuantity": 1,
            "unitPackageType": "EP",
            "unitLength": 80,
            "unitWidth": 60,
            "unitHeight": 120,
            "unitWeight": 65,
            "content": "Lithium-ion battery (portable power station)",
            "isStackable": false,
            "dangerousGoods": [
                {
                    "unNo": "3480",
                    "substanceName": "LITHIUM-IONEN-BATTERIEN",
                    "packageType": "KISTE",
                    "quantity": 1,
                    "weightGross": 45,
                    "weightNetOrVolume": 40,
                    "weightNetOrVolumeUnit": "NGW",
                    "riskMain": "9A",
                    "classificationCode": "M4",
                    "packagingGroup": null,
                    "transportCategory": "2",
                    "tunnelRestriction": "(E)",
                    "pointsMultiplier": 3,
                    "pointsTotal": 120,
                    "adrVersion": "ADR2025",
                    "isLimitedQuantity": false,
                    "isExemptedQuantity": false,
                    "isHighConsequencesDangerousGood": false,
                    "isSpecialProvision188": false
                }
            ]
        }
    ]
}
'

The response contains the price, the transit time and the quotation ID in data.id — see Quotation with minimum details for the full response structure.

2. Book the quotation

Book the order with the quotation ID. The body is the complete order: the same data as above, plus the names, streets and contact details that a booking requires.

curl --request POST \
     --url https://api-sandbox.cargoboard.com/v1/quotations/{quotationId}/book \
     --header 'Content-Type: application/json' \
     --header 'X-API-KEY: YourKeyHere' \
     --data '
{
    "product": "STANDARD",
    "customerOrderCode": "SO-100245",
    "wantsInsurance": true,
    "valueOfGoodsAmount": 1800,
    "valueOfGoodsCurrency": "EUR",
    "shipper": {
        "name": "Producer ABC GmbH",
        "address": {
            "street": "Examplestreet 12a",
            "postCode": "01067",
            "countryCode": "DE",
            "city": "Dresden"
        },
        "contactPerson": {
            "name": "Jane Doe",
            "phone": "+49 351 1234567",
            "email": "[email protected]"
        },
        "pickupOn": "2026-12-01"
    },
    "consignee": {
        "name": "John Doe",
        "address": {
            "street": "Examplestreet 5",
            "postCode": "80331",
            "countryCode": "DE",
            "city": "Munich"
        },
        "contactPerson": {
            "name": "John Doe",
            "phone": "+49 89 7654321",
            "email": "[email protected]"
        },
        "isPrivateCustomer": true,
        "wantsContactBeforeDelivery": true
    },
    "lines": [
        {
            "unitQuantity": 1,
            "unitPackageType": "EP",
            "unitLength": 80,
            "unitWidth": 60,
            "unitHeight": 120,
            "unitWeight": 65,
            "content": "Lithium-ion battery (portable power station)",
            "isStackable": false,
            "dangerousGoods": [
                {
                    "unNo": "3480",
                    "substanceName": "LITHIUM-IONEN-BATTERIEN",
                    "packageType": "KISTE",
                    "quantity": 1,
                    "weightGross": 45,
                    "weightNetOrVolume": 40,
                    "weightNetOrVolumeUnit": "NGW",
                    "riskMain": "9A",
                    "classificationCode": "M4",
                    "packagingGroup": null,
                    "transportCategory": "2",
                    "tunnelRestriction": "(E)",
                    "pointsMultiplier": 3,
                    "pointsTotal": 120,
                    "adrVersion": "ADR2025",
                    "isLimitedQuantity": false,
                    "isExemptedQuantity": false,
                    "isHighConsequencesDangerousGood": false,
                    "isSpecialProvision188": false
                }
            ]
        }
    ]
}
'

The response contains the order ID (data.id), the shipment reference (data.reference) and the links for labels and tracking — see Booking with minimum details.

3. Print the shipping label

curl --request GET \
     --url 'https://api-sandbox.cargoboard.com/v1/orders/{orderId}/print-shipment-labels?format=A4' \
     --header 'X-API-KEY: YourKeyHere' \
     --output shipping-labels.pdf

{orderId} can be the order ID or the shipment reference.

What's specific to this shipment

TopicFieldsSee
Dangerous goodslines[].dangerousGoods[] — quantity is the authoritative quantityDangerous Goods
ADR dataFill the ADR fields from the UN number lookupUN number lookup
Private consigneeisPrivateCustomer: true plus wantsContactBeforeDelivery: truePrivate consignees
InsurancewantsInsurance, valueOfGoodsAmount, valueOfGoodsCurrencyPlace an Order
Your referencecustomerOrderCode — appears on documents and in tracking webhooksTrack & Trace