Hello! I’ve been trying to gather some data on shipments that go out in multiple packages, and I’ve run into a few situations where the API reports multiple valid labels being in a shipment, but when viewing the same shipment in the UI, it only shows one label.
For example, running this query:
query {
shipment (id: "U2hpcG1lbnQ6MzYzMDI1MTI4") {
request_id
data {
id
total_packages
shipping_labels {
id
legacy_id
package_number
box_name
tracking_number
tracking_status
cost
status
dimensions {
weight
length
width
height
}
}
}
}
}
Gives back this result:
{
"data": {
"shipment": {
"request_id": "64de1c726d6108bc3f8c2cc9",
"data": {
"id": "U2hpcG1lbnQ6MzYzMDI1MTI4",
"total_packages": 2,
"shipping_labels": [
{
"id": "U2hpcHBpbmdMYWJlbDoyNjA1MTAyMzE=",
"legacy_id": 260510231,
"package_number": 1,
"box_name": "8x4x4",
"tracking_number": "redacted_for_privacy20078",
"tracking_status": "DELIVERED",
"cost": "6.22",
"status": "valid",
"dimensions": {
"weight": "1.0275 lb",
"length": "8.00 inch",
"width": "4.00 inch",
"height": "4.0000 inch"
}
},
{
"id": "U2hpcHBpbmdMYWJlbDoyNjA1MTAyMzI=",
"legacy_id": 260510232,
"package_number": 1,
"box_name": "8x4x4",
"tracking_number": "redacted_for_privacy20078",
"tracking_status": "UNKNOWN",
"cost": "6.22",
"status": "valid",
"dimensions": {
"weight": "1.0275 lb",
"length": "8.00 inch",
"width": "4.00 inch",
"height": "4.0000 inch"
}
}
]
}
}
},
Interestingly, they both have the same tracking number, weight and label cost, and they both have a “valid” status, but the IDs and legacy_ids are different. The really strange part is that they both say “package_number: 1”. But when go to the order details (Orders > Manage Orders) or to the Shipments Report (Reports > Shipments) in the UI, they both only show 1 label.
My question is why would it be showing this, and how do I know when a “valid” label is not actually valid?
Thanks,
Jeremy