Returning multiple labels via webhook response

Hi,

We are using webhook to create specific shipments that ShipHero does not support. When sending the response, how should we structure the response for multi-package shipments that contain more than 1 label? We are sending the following for single package shipments.

{
  "code":201,
  "tracking_number": "123456789",
  "cost": "0.00",
  "label": "cloud-storage.com/label.pdf"
}

Hey @sdwelrn,

Thanks for reaching out!

An example of a multi-package response to the GLW could be:

{
    "code": "200",
    "packages":[
    {
        "name": "Package 2",
        "shipping_method": "Ground",
        "tracking_number": "987654321",
        "cost": "20.20",
        "label": "https://url-to-label.com/package2.pdf",
        "customs_info": "",
        "shipping_carrier": "ups",
        "tracking_url": "https://mycarrier.com/987654321"
    },
   {
       "name": "Package 1",
       "shipping_method": "Ground",
       "tracking_number": "123456789",
       "cost": "10.10",
       "label": "https://url-to-label.com/package1.pdf",
       "customs_info": "https://url-to-label.com/customs1.pdf",
       "shipping_carrier": "ups",
       "tracking_url": "https://mycarrier.com/123456789"
    }
  ]
}

Please let me know if you have any questions or concerns.

Best,
RayanP

Thank you for the reply.

1 Like