attribution_app_id error & where to find the ID

johnnyk
Tourist
4 0 1

When making a GET request to fetch the orders I run into status code 500 if I use the attribution_app_id. The GET request look something like this:

 

GET /api/2021-01/orders.json?status=any&financial_status=paid&fulfillments_status=any&limit=250&attribution_app_id=current

 

I have concluded that it is the attribution_app_id which is the culprit here, because if I leave that out from the parameters, then I am able to successfully fetch the orders. However, the problem with this is that the amount of orders is too big. I've tried it, and after 20 min the process was still ongoing. So this is not an option for me. 

I am pretty sure the GET request in itself, with the attribution_app_id parameter, is correct, since it works in another app. So I find it quite strange that it doesn't work in this specific case.

So the question is why do I get status code 500 (Internal Server Error)?

Do I perhaps need to specify the attribution_app_id as a number? And if so, where can I find this ID?
I haven't been able to find it in the admin pages, nor any success when googling on it. Any help is appreciated.

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
310 42 53

Hey @johnnyk 

I do see attribution_app_id as a valid parameter for the order endpoint. Would you be able to provide the x-request-id response header from the call that returns the 500 error? 

Kevin_A | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
johnnyk
Tourist
4 0 1

Hi @Kevin_A ,

The x-request-id I receive is 931899f0-d7de-4e7e-9606-5dac71dbfb3a.

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
310 42 53

Hey @johnnyk 

Looks like we are seeing timeout errors which are causing the 500s. Likely the combination the filters and a limit of 250 is the culprit. I can pass along feedback about this to our development teams but for an immediate workaround I would suggest testing out limit values less than 250 until you see more consistent results.  

Kevin_A | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
johnnyk
Tourist
4 0 1

It would be great if you could find a working solution. Not even the simplest filter works:

/admin/api/2021-01/orders.json?attribution_app_id=current

 

Kevin_A
Shopify Staff
Shopify Staff
310 42 53

Hey @johnnyk 

Ok thanks for the heads up. I will need to present this to our development team to see if they can provide any feedback or additional workarounds. 

Kevin_A | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
johnnyk
Tourist
4 0 1

Hi @Kevin_A ,

I've found a workaround which involves querying based on the last updated date and time:

GET /admin/api/2021-01/orders.json?attribution_app_id=current&updated_at_min=xxxxx

This works, for now. But I imagine that the timeout error will reappear as time progresses and the amount of orders increase. 

Now, I don't really have a use for fetching all orders at the moment, but I suspect it might be relevant in the future. 

0 Likes
cventuram
Shopify Partner
3 0 0

I'm also having trouble when including attribution_app_id. The request is basically ignoring this query parameter. Adding updated_at_min did not fix it for me.

0 Likes