I want to know that how can I get the reports by API ? like Sales By Month, Sales by hour, Sales by channel, Sales by product , and the other report present in the site.
It looks like i cannot use SHOPIFYQL in my Shopify plan ($79/month) is this correct ? if yes, i could use the orders api but i need some pointers please
i need to output the total amount in $ of all orders for a specific product, in this case it is a buy-button gift card
You can’t use ShopifyQL in your plan. You have got plan ‘Shopify’ but for ShopifyQL you need ‘Advanced Shopify’. https://www.shopify.com/pricing
Having your plan you can work with Shopify REST Admin Api to upload your orders data and then you can use your own app for do reports. https://help.shopify.com/api/reference
Sending requests you have to staying within this call limit.
After uploading all orders what you need you can start analyzing the data using the method of your choice, for example SQL, if you have saved data to the database.
After reading, and researching and more reading i am able to do just that what you have nicely described above. so thank you!
I created a private app and was able to do api calls on the order object and i was able to narrow it down to the amount value I needed.
a couple of questions.
i am calling the api url from another server not my shopify store, using php. do i need to maintain a separate server to be able to make api call or can i use my shopify store to do it. create a template inside my store that make that api call.
I created a private app and got the necessary credentials to make my calls from my partner shopify account. I am not sure what i need to do from my production site to install that private app that i created under my partner shopify account.
I am glad that the information was helpful for you.
You can use your server or local machine to send requests to Shopify Rest Api. If you need to use Shopify webhooks, then you should have a server with a domain or subdomain address, e.g. mysubdomain.carinho.co.
You don’t need to install inside your app anything. Your script is your app. If you use PHP then your script should send GET requests, for example via curl, and display or save the results or what you need. The results what you will receive will be in JSON format.
A little trick to check if your app will be work correctly with your creditentials:
Yes i am successful now at making my api call from a separate server using my private app credentials and it works i get the right value i asked for. I want to add that retrieved value on one of my shopify blog pages, to do that i used an iframe to display it.
It is perfectly fine and it does what i needed to do.
just wandering if iframe is the way to go or if there is another method to diaply that api info from inside the shopify page without using iframe.
I think that this solution is more elegant and, and relieves your server (you do not need to handle every request when displaying your blog page, because all is done by Shopify resources). Maybe this method will give you new ideas for using Metafields and dynamic values and make your store even more attractive for your clients.