Shipment not found despite existing in Order Response

Hello,

I’ve run into a strange bug where a shipment is returned via querying the orders resource, but when I look for that shipment directly via the shipment resource, I get a Shipment Not Found

query {
	order (id: "T3JkZXI6NDA1NDE4MTI2"){
		data {
			shipments{
				id
				line_items(first: 10){
					edges
					{
						node{
							id
							quantity
							line_item{
								sku
							}
						}
					}
				}
			}
		}
	}
}

I then grab the shipment id from this response and try both getting the shipment directly by ID and getting the order shipments.

query {
	shipment (id: "U2hpcG1lbnQ6MzczMDY4MTE0"){
		data
		{
			id
		}
	}
}
query {
	shipments (order_id: "T3JkZXI6NDA1NDE4MTI2"){
		data(first: 10) {
			edges
			{
				node{
					id
				}
			}
		}
	}
}

I get a shipment not found response, and then an empty list response.
Can you please provide guidance as to why this might be possible/if this is a bug and how to best proceed?

Thanks

1 Like

Hello, @rypaul12!

I did some troubleshooting, and these are my findings:

Order T3JkZXI6NDA1NDE4MTI2 and shipment U2hpcG1lbnQ6MzczMDY4MTE0 are not related and don’t belong to the same account.

That shipment ID belongs to order 383156470.

Shipment not found, or not getting any shipments are possible responses if you are not sitting in the account the object belongs to.

Kind regards,
TomasFD

Appreciate the response Tomas!

I’m still confused then as to why the shipment is returned in the orders response if it’s not part of that order/account (the first query listed in my original question)?

Ah I shared the wrong shipment id associated with that order.
On the raw order response for order T3JkZXI6NDA1NDE4MTI2, I’m seeing shipment Id U2hpcG1lbnQ6MzkzMTI0OTgx returned (which is then not findable and must be part of a different account as you said). Still confused as to how that shipment is returned on the raw response

Hello @rypaul12!

I couldn’t reproduce that either; I’m not getting that shipment when I query that order, but I can’t tell which account you were working from. Can you get me the request_id from that call?

Kind regards,
TomasFD

Yes, request_id: “65ca3c10568f1447635977be”

Hey @tomasfd, were you able to locate that request_id/find anything with regards to why that shipment is returned in that order response?

Hi @rypaul12, I’ve created an internal ticket for our engineers to investigate this issue. I will keep you update as I hear from them! Have a great day!

1 Like

Hi @tomasfd, is there any update here?

Hey @rypaul12, the internal ticket is still making its way through our engineers’ queue. I will keep you posted as it progresses. Best!

1 Like