Draft Order API: status=any stopped working

Draft Order API: status=any stopped working

Jonathan-HA
Shopify Partner
327 25 101

Hi guys,

 

It looks like filtering by `status=any` in the DraftOrder API stopped working around August 1.  I didn't see this change mentioned in the Developer Changelog.

 

Also the docs here doesn't seem accurate: https://help.shopify.com/en/api/reference/orders/draftorder

 

According to this page, the default status is supposed to be `open` but not passing in a status actually returns everything.

 

So, on our side we can push an update to just not pass in a status but I'm still curious why `status=any` stopped working all of a sudden and I'm worried the default status would change to `open` later as that's what's documented.

 

Anyone knows if this is a known bug or an intentional change and what's recommended way to retrieve all draft orders?

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Replies 9 (9)

Josh
Shopify Staff
1134 84 234

Hey again @Jonathan-HA , 

 

It almost looks like the documentation for 'status' was copied from older order docs. This isn't a known bug at the moment but I don't think it was an intentional change either, I know there was some work going on with relation to the new cursor-based pagination that resources are switching over to during this timeframe and wonder if that might have inadvertently caused this. 

 

I'll check with our team here and get back to you! In the meantime it seems like not passing a status at all returns all draft orders, but without more details on what caused this and if it was intended I don't want to suggest doing this as a permanent change.

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Jonathan-HA
Shopify Partner
327 25 101

Thanks Josh, appreciate it!

 

We'll wait for your confirmation on whether not passing in `status` to get all draft orders is a safe assumption before making it a permanent change on our side.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Jonathan-HA
Shopify Partner
327 25 101

Hey there @Josh ,

 

Do you have any update on this issue by any chance?

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Josh
Shopify Staff
1134 84 234

Hey @Jonathan-HA , 

 

Sorry for the slow reply - still haven't heard anything back, but I'll check back in on this today and see if I can get an answer for you.

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Jonathan-HA
Shopify Partner
327 25 101

Hey @Josh,

 

Sorry to keep bugging you about this, but have you heard back from the API team by any chance?

 

Thanks!

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Josh
Shopify Staff
1134 84 234

Hey again @Jonathan-HA , 

 

Not a problem at all - I saw that you had filed a support ticket today, so I touched on this topic in there. 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

juan3211
Shopify Partner
121 0 38

Hi,any news?I can't filter my graphql query with "status".

 

Josh
Shopify Staff
1134 84 234

Hi @juan3211 , 

 

Could you provide some more details on what you're seeing? The following query, for example, only returns open draft orders for me : 

 

{
  draftOrders(first: 50, query: "status:open") {
    edges {
      node {
        id
        status
      }
    }
  }
}

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

juan3211
Shopify Partner
121 0 38

May be I have do mistake with quotes, yes! it works perfectly, thanks.


@Josh wrote:

Hi @juan3211 , 

 

Could you provide some more details on what you're seeing? The following query, for example, only returns open draft orders for me : 

 

{
  draftOrders(first: 50, query: "status:open") {
    edges {
      node {
        id
        status
      }
    }
  }
}