I'm trying to use ShopifyAPI::Report endpoint via Rails/Ruby shopify_api gem. Other endpoints like ShopifyAPI::Order work fine.
But ShopifyAPI::Report returns an empty result. But it works via browsers. See screenshots
Any idea what might be going on?
Solved! Go to the solution
Hi @stellahealth,
I've done some investigation into the behaviour you're experiencing and would like to share the context I gathered with you.
The behaviour you see currently is the expected behaviour of the Report API within our platform per the docs as the image below shows.
The following are some of the behaviours to take into consideration:
custom_reports
category.custom_app_reports
category.Hopefully the above clarifies the behaviour you're seeing. However, if you created a report with your app credentials and you still are getting an empty result set when you query please do get back to me and I'd look into the issue further.
Best,
Seth.
syf_ | 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
So even "common reports" or "default reports" that exist in Shopify Admin by default, are not accessible via this ShopifyAPI::Report? If so which "app" cretaed those reports?
The main reason i want access to them is to use them as a template/example for customizing our own internal reports. Documentation on the topic is sparse, and I learn best by example
This is an accepted solution.
Hi @stellahealth,
The default reports are created by Shopify and aren't accessible via API to the best of my knowledge. The ShopifyAPI is a wrapper around our Admin API and you would still need to use credentials from an app (private, custom, or public) on your store to access any data from your store.
If you're interested in the the ShopifyQL that generates the default reports, what you can do is to save a copy of the report (you can make customisations as well) through the Admin. Doing this would save the report as a custom report, making it accessible via the /report.json
using the browser, and you'll be able to see the ShopifyQL that generated the report of interest. Once you have the query, you can use that to create a report via the API.
Let me know if this helps, or if you have any more questions regarding this.
Best,
Seth.
syf_ | 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
User | Count |
---|---|
12 | |
12 | |
7 | |
6 | |
5 |