Multi-parcel support

This is the method when we create several parcels in shipment. Shippo supports creating multi-parcel shipments for both one step label and 2-steps label creation. The example shown here uses one step label creation.

HTTP Method

POST

URL

Copy
Copied
https://api.goshippo.com/transactions/

Request Payload

Parameter Description
parcels* Array of parcels.
Example with 2 parcels
label_file_type Allowed values:
PDF
PDF_A4
PDF_A6
PDF_4x6
PDF_4x8
PDF_SINGLE_8X11
PDF_2.3x7.5
PNG
PNG_2.3x7.5
ZPLII

Example with 2 parcels

Copy
Copied
"parcels": [

       {
           "length": "10",
           "width": "8",
           "height": "10",
           "distance_unit": "cm",
           "weight": 2,
           "mass_unit": "kg",
           "line_items": [
               {
                   "title": "Hippo Magazines",
                   "variant_title": "June edition",
                   "sku": "HM-123",
                   "hs_code": "2123",
                   "quantity": 1,
                   "amount": "12.10",
                   "currency": "USD",
                   "weight_unit": "kg",
                   "manufacture_country": "US"
               },
               {
                   "title": "Hippo Magazines -2",
                   "variant_title": "June edition",
                   "sku": "HM-1234",
                   "hs_code": "21234",
                   "quantity": 1,
                   "amount": "15.10",
                   "currency": "USD",
                   "weight_unit": "kg",
                   "manufacture_country": "US"
               }
           ]
       },
       {
           "length": "10",
           "width": "5",
           "height": "8",
           "distance_unit": "cm",
           "weight": 3,
           "mass_unit": "kg",
           "line_items": [
               {
                   "title": "Hippo Magazines - 2",
                   "variant_title": "June edition",
                   "sku": "HM-123",
                   "hs_code": "2123",
                   "quantity": 1,
                   "amount": "12.10",
                   "currency": "USD",
                   "weight_unit": "kg",
                   "manufacture_country": "US"
               }
           ]
       }
   ],

Response Code

201 Created

Request Sample

One step label API with 2 parcels

Copy
Copied
curl --location --request POST 'https://api.goshippo.com/transactions' \
--header 'Authorization: ShippoToken shippo_live_***’ \
--header 'Content-Type: application/json' \
--data-raw '{
   {
   "shipment": {
       "object_purpose": "PURCHASE",
       "address_from": {
           "object_purpose": "PURCHASE",
           "name": "Shipping Mgr",
           "company": "Shippo",
           "street1": "4727 W 1st St",
           "street2": "",
           "city": "New York",
           "state": "NY",
           "zip": "10005",
           "country": "US",
           "phone": "12028642186",
           "email": "nataliya_eng@shippo.com",
           "is_residential": false
       },
       "address_to": {
           "object_purpose": "PURCHASE",
           "name": "Nata Lee",
           "street1": "1720 S Grand Ave",
           "city": "Sydney",
           "state": "VIC",
           "zip": "3026",
           "country": "AU",
           "phone": "+1 666 147 2589",
           "email": "nata@gmail.com",
           "metadata": "",
           "is_residential": true
       },
       "parcels": [
       {
           "length": "10",
           "width": "8",
           "height": "10",
           "distance_unit": "cm",
           "weight": 2,
           "mass_unit": "kg",
           "line_items": [
               {
                   "title": "Hippo Magazines",
                   "variant_title": "June edition",
                   "sku": "HM-123",
                   "hs_code": "2123",
                   "quantity": 1,
                   "amount": "12.10",
                   "currency": "USD",
                   "weight_unit": "kg",
                   "manufacture_country": "US"
               },
               {
                   "title": "Hippo Magazines -2",
                   "variant_title": "June edition",
                   "sku": "HM-1234",
                   "hs_code": "21234",
                   "quantity": 1,
                   "amount": "15.10",
                   "currency": "USD",
                   "weight_unit": "kg",
                   "manufacture_country": "US"
               }
           ]
       },
       {
           "length": "10",
           "width": "5",
           "height": "8",
           "distance_unit": "cm",
           "weight": 3,
           "mass_unit": "kg",
           "line_items": [
               {
                   "title": "Hippo Magazines - 2",
                   "variant_title": "June edition",
                   "sku": "HM-123",
                   "hs_code": "2123",
                   "quantity": 1,
                   "amount": "12.10",
                   "currency": "USD",
                   "weight_unit": "kg",
                   "manufacture_country": "US"
               }
           ]
       }
   ],
       "customs_declaration": {
           "contents_type": "MERCHANDISE",
           "certify": true,
           "certify_signer": "Test Certifier",
           "incoterm": "DDP",
           "is_vat_collected": "paid",
           "exporter_identification": {
               "tax_id": {
                   "type": "IOSS",
                   "number": "TAXNUMBER12345"
               }
           },
           "items": [
               {
                   "description": "shirt",
                   "quantity": 1,
                   "net_weight": "1",
                   "mass_unit": "oz",
                   "value_amount": "10",
                   "value_currency": "USD",
                   "origin_country": "US",
                   "tariff_number": "",
                   "metadata": "ts mi"
               }
           ]
       },
       "extra": {
           "reference_1": "123456780",
           "carrier_hub_id": "ORD"
       },
       "metadata": "Customer ID 123456",
       "async": false
   },
   "label_file_type": "PDF",
   "carrier_account": "{{APG_ACC}}",
   "servicelevel_token": "eparcel_premium"
}
}'

Response Sample

Copy
Copied
{
   "object_state": "VALID",
   "status": "SUCCESS",
   "object_created": "2022-12-15T10:17:53.981Z",
   "object_updated": "2022-12-15T10:18:05.066Z",
   "object_id": "8c38d895e31c49c0b01106437f3d6375",
   "object_owner": "nataliya_eng@shippo.com",
   "test": true,
   "rate": {
       "object_id": "d576659148574262b540c1d955def30a",
       "amount": "22.32",
       "currency": "USD",
       "amount_local": "32.95",
       "currency_local": "AUD",
       "provider": "APG",
       "servicelevel_name": "eParcel premium",
       "servicelevel_token": "eparcel_premium",
       "carrier_account": "2edac0dddcfc4416b2708cc10b2d11e0"
   },
   "tracking_number": "2908932",
   "tracking_status": "UNKNOWN",
   "eta": null,
   "tracking_url_provider": "https://apgecommerce.com/?page_id=18102908932",
   "label_url": "https://dev-qa-deliver.shippodev.com/8c38d895e31c49c0b01106437f3d6375.pdf?Expires=1702635483&Signature=cx-F9Zon1PeX8zn2v3kSUhETX1uNmQeLDmL4rR2td42mdnOabmUSj-Hi0AiQ1ea3yjPgmLu6oG-nOb7yOa36jsuKaF9RjB22pzpMUVi7PspI8Av~kYRSCAjd4BFgeOI8qNdmSlp5XSuj0LLs1iMU5DnqoSQQZ-SdnHEYfB1DsBOaJKz32S16Zr-pWTAMHxD2JCCiRjRiudpIdno7W4kFJ8aBBPp60DTOyFjj8RQAbNyDtOe3TKngSx6ZmTmzRLZ2RknyU-bJOdA6hJOISgwoF6vcHMtvffr1wIgtzbkC5m7vn8dAsoyozdbAV1bsU-dal~fWDtjBfrjVgWrPFgf~IA__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ",
   "commercial_invoice_url": "https://dev-qa-deliver.shippodev.com/ci_8c38d895e31c49c0b01106437f3d6375.pdf?Expires=1702635485&Signature=kF3QO30vkFsiEmO0mdOy38atSo~SXugd3GkOns~6LxwrnZB5c3wewkO6gKdfIktQf4EejnYp~4cRpWm0Z5rN8FRwD6f5QSF54R~4ZrURq3c3JQ4YjfO7Jba7H-6HAiAP9XzGsQ8rPREz2ckrSvGSF-0fycmEgh5QngF~H9V9r7wf1SDiBM7AOVfCb0zYJeqHrPEwsPy7YOOnXzn~vl7KCAc48lI08yuxeUNcOo1mr0yCJfNaoqOwYVlyd8dGNXsXu~76lP5TZvoMLHshjQYFPr2HguL6ChgEUnFwrks7wjC2btRVDGcBlcnQWi0ndCX56Aag9zqd3ubOHiPQ1pI7fg__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ",
   "messages": [],
   "order": null,
   "metadata": "",
   "parcel": "ac06b161f77f46fc8f2c0edca47251b3",
   "billing": {
       "payments": []
   },
   "qr_code_url": null
}