Hi @tomasw adding the quantity (and quantity_shipped) only returns the total quantity across all packages. Please see the example below. This sku (3079) was actually shipped across 3 packages, with different quantities in each, with a total ordered/shipped quantity of 10.
query {
order(id: "148606821") {
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 {
id
tracking_number
carrier
shipping_name
shipping_method
cost
carrier_account_id
created_date
shipment_line_items(first: 20) {
edges {
node {
id
line_item {
id
sku
partner_line_item_id
quantity
quantity_shipped
fulfillment_status
shipped_line_item_lots{
id
line_item_id
lot_id
lot_name
lot_expiration_date
}
}
}
}
}
}
}
}
}
}
Response
{
“data”: {
“order”: {
“request_id”: “5f6cb47ef5c50d9b8c97525d”,
“complexity”: 21,
“data”: {
“id”: “T3JkZXI6MTQ4NjA2ODIx”,
“legacy_id”: 148606821,
“order_number”: “90210004”,
“shop_name”: “STORD”,
“fulfillment_status”: “fulfilled”,
“order_date”: “2020-09-22T00:00:00+00:00”,
“required_ship_date”: “2020-09-09T00:00:00+00:00”,
“shipping_address”: {
“first_name”: “Isaac”,
“last_name”: “Wyatt”,
“address1”: “Address Data”,
“address2”: null,
“city”: “City”,
“state”: “State”,
“state_code”: null,
“zip”: “Zip”,
“country”: “US”
},
“shipments”: [
{
“id”: “U2hpcG1lbnQ6MTAxMjk1NTQ5”,
“order_id”: “T3JkZXI6MTQ4NjA2ODIx”,
“shipping_labels”: [
{
“id”: “U2hpcHBpbmdMYWJlbDo3MzMwODY2OQ==”,
“tracking_number”: “1Z87VY021214635017”,
“carrier”: “ups”,
“shipping_name”: “Manual Order Shipping Method”,
“shipping_method”: “UPS 3 Day Select”,
“cost”: “482.06”,
“carrier_account_id”: “XXXX”,
“created_date”: “2020-09-22T15:21:06+00:00”,
“shipment_line_items”: {
“edges”: [
{
“node”: {
“id”: “U2hpcHBlZExpbmVJdGVtOjE4MDgzODM0Mg==”,
“line_item”: {
“id”: “TGluZUl0ZW06NDIyMDM5MzIz”,
“sku”: “3079”,
“partner_line_item_id”: “90210014__1__S”,
“quantity”: 10,
“quantity_shipped”: 10,
“fulfillment_status”: “fulfilled”,
“shipped_line_item_lots”: []
}
}
},
{
“node”: {
“id”: “U2hpcHBlZExpbmVJdGVtOjE4MDgzODM2NQ==”,
“line_item”: {
“id”: “TGluZUl0ZW06NDIyMDM5MzI0”,
“sku”: “27201”,
“partner_line_item_id”: “90210014__2__S”,
“quantity”: 5,
“quantity_shipped”: 5,
“fulfillment_status”: “fulfilled”,
“shipped_line_item_lots”: []
}
}
}
]
}
},
{
“id”: “U2hpcHBpbmdMYWJlbDo3MzMwODY3MA==”,
“tracking_number”: “1Z87VY021201771626”,
“carrier”: “ups”,
“shipping_name”: “Manual Order Shipping Method”,
“shipping_method”: “UPS 3 Day Select”,
“cost”: “0.00”,
“carrier_account_id”: “109530”,
“created_date”: “2020-09-22T15:21:06+00:00”,
“shipment_line_items”: {
“edges”: [
{
“node”: {
“id”: “U2hpcHBlZExpbmVJdGVtOjE4MDgzODM0Nw==”,
“line_item”: {
“id”: “TGluZUl0ZW06NDIyMDM5MzIz”,
“sku”: “3079”,
“partner_line_item_id”: “90210014__1__S”,
“quantity”: 10,
“quantity_shipped”: 10,
“fulfillment_status”: “fulfilled”,
“shipped_line_item_lots”: []
}
}
}
]
}
},
{
“id”: “U2hpcHBpbmdMYWJlbDo3MzMwODY3MQ==”,
“tracking_number”: “1Z87VY021208358838”,
“carrier”: “ups”,
“shipping_name”: “Manual Order Shipping Method”,
“shipping_method”: “UPS 3 Day Select”,
“cost”: “0.00”,
“carrier_account_id”: “109530”,
“created_date”: “2020-09-22T15:21:06+00:00”,
“shipment_line_items”: {
“edges”: [
{
“node”: {
“id”: “U2hpcHBlZExpbmVJdGVtOjE4MDgzODM1OQ==”,
“line_item”: {
“id”: “TGluZUl0ZW06NDIyMDM5MzIz”,
“sku”: “3079”,
“partner_line_item_id”: “90210014__1__S”,
“quantity”: 10,
“quantity_shipped”: 10,
“fulfillment_status”: “fulfilled”,
“shipped_line_item_lots”: []
}
}
},
{
“node”: {
“id”: “U2hpcHBlZExpbmVJdGVtOjE4MDgzODM4Ng==”,
“line_item”: {
“id”: “TGluZUl0ZW06NDIyMDM5MzI0”,
“sku”: “27201”,
“partner_line_item_id”: “90210014__2__S”,
“quantity”: 5,
“quantity_shipped”: 5,
“fulfillment_status”: “fulfilled”,
“shipped_line_item_lots”: []
}
}
}
]
}
}
]
}
]
}
}
}
}