When trying to fetch unfulfilled orders using this query:
{
orders(
first: 50,
query: "fulfillment_status:unfulfilled",
reverse: false
) {
nodes {
id
name
createdAt
displayFulfillmentStatus
}
pageInfo {
hasNextPage
endCursor
}
}
}
the API returns fulfilled orders, as well:
Why is that?
Hey @Dieter_Frei - thanks for reaching out.
I took a look at this and your query syntax is valid. One distinction is that fulfillment_status:unfulfilled includes partially fulfilled orders, while displayFulfillmentStatus is calculated separately. Those statuses can differ, but we’d need to check these specific orders to confirm the cause here.
Could you please share the shop ID of the store you’re querying? It would also help to know whether this started recently or has consistently behaved this way. If you’d prefer to share the shop ID privately, let me know and I can set up a DM.
Thanks for your feedback!
Not sure, how fulfillment_status and displayFulfillmentStatus should differ in any way, as they should definitely be exactly the same.
I filtered the admin dashboard for unfulfilled (incl. partially fulfilled) and open orders and got the same result, i.e. fulfilled orders also showed up. So here is the dev shop id: 55689969801.
Thanks in advance!
There’s also fulfillment_status:unshipped on the orders query, which should leave out the partially fulfilled ones Wes mentioned. Running that against unfulfilled and diffing the two sets would show fairly quickly whether the extra orders are coming from the partial bucket or from somewhere else.
Partially fulfilled orders are part of the set that I would like to have. The problem is that fulfilled orders are present, even when filtering in the Shopify Admin.
Hi @Dieter_Frei - following up on this now that I’ve done some digging with your dev shop ID.
I’ve checked all three orders, and they match a historical issue with cancelled returns. Each order was fully fulfilled, but cancelling a return incorrectly changed its stored fulfilment status back to partial, even though those items had already been fulfilled.
That explains the mismatch: the Admin displays a separately calculated fulfilment status, while fulfillment_status:unfulfilled also matches orders with a stored status of partial.
The underlying issue was addressed in September 2024, so this specific problem shouldn’t occur on orders placed after that fix. These older orders still retain the incorrect status from before the change. If you’re seeing the same behaviour on newer orders, please share an example so we can investigate it separately.
Also, I can arrange to have the stored fulfilment statuses corrected for the three affected orders shown in the screenshot you shared, as well as any others in this status. Let me know if you’d like us to proceed.
Hope this helps!
Hi Wes,
thanks! That was the problem. I’ve archived all orders before 2025 and no more inconsistency occured.
Issue solved!