Can you not use ShopifyQL using the rest API?

Highlighted
New Member
1 0 1
Hi guys,
We want to get the values of returning customers vs new customers,
indeally the same values as in this report:

https://precisionhydration.myshopify.com/admin/reports/customers_first_return

It seems the analytics api would be suitable for this and its listed under the REST Admin api section in your help.

But it also says on the same page that "ShopifyQL requests must be made using the Embedded App SDK." Which is a front end js library for accessing the data?

Can you not use ShopifyQL using the rest API?

Thanks,
1 Like
Highlighted
Shopify Staff
Shopify Staff
619 76 139

Hey @dmcolley,

 

I can see how that warning in the doc is confusing, we'll look at getting that updated.

 

The warning refers to using ShopifyQL queries from the front-end of an app. If you wanted to create an app that allows merchants to write their own queries and see that data in the app, you'd need to use the embedded app SDK. We have an example app here if you want to play around with it (to get this working you need to change the Ruby version to 4.2.11 in the Gemfile before installing dependancies, I also used NGROK and whitelisted redirect URI https://11aa1111.ngrok.io/auth/shopify/callback)

 

If you want to use this API to create reports in the admin using ShopifyQL, you can do so without using an embedded app. This doc shows some example REST calls that can be made from any client.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

1 Like
Highlighted
New Member
1 0 1

Hey, I'm also finding the docs a bit confusing. Is it possible to use the ShopifyQL to get store data from a rest request?
e.g. this kind of request: curl -X GET https://{username}:{password}@{shop}.myshopify.com/admin/api/2020-01/shop.json -H 'Content-Type: application/json'
or is there another way to get at that analytics data from the rest API?
This is for a private app for internal reporting for our stores.

 

1 Like
Highlighted
Shopify Partner
13 0 4

As I understand it the doc you linked you helps me create custom reports that show up in the admin analytics section, which i managed to do. 

 

Is it possible to download the data and use it locally with the rest API? Im doing it with the graph QL at the moment and it's a hassle to match the reports in the admin analytics section.

 

Best regards

Antonio at Funnel

0 Likes