Shipping labels can have different statuses in ShipHero: void, valid, etc. It is possible for a warehouse to generate a shipping label, cancel the label, and regenerate a new label at a different time. As a result, when querying shipments & shipping labels, we only want to receive the valid labels that were generated and shipped, and ignore the “void” labels.
Is it possible to query shipping labels by status = valid? I am receiving an error while using the query below. When removing the status filter in the shipping label node, the query executes successfully and returns all shipping labels on the order.
query {
order(id: "149649090") {
request_id
complexity
data {
id
legacy_id
order_number
shop_name
fulfillment_status
order_date
required_ship_date
shipping_address {
first_name
last_name
address1
address2
city
state
state_code
zip
country
}
shipments {
id
order_id
shipping_labels (status:"valid") {
id
tracking_number
carrier
status
shipping_name
shipping_method
cost
carrier_account_id
created_date
shipment_line_items(first: 20) {
edges {
node {
id
quantity
line_item {
id
sku
partner_line_item_id
quantity_shipped
fulfillment_status
shipped_line_item_lots {
id
line_item_id
lot_id
lot_name
lot_expiration_date
}
}
}
}
}
}
}
}
}
}