We are an on-demand delivery service looking to integrate ourselves into a store. We would like to dispatch order details to our DB when the user selects our shipping option and makes an order. However I am unsure whether I need to use an App, or the API and overall direction.
So question is whether or not I can do this, and what the event would be for such a transaction to take place?
If it is possible where could I start?
Thanks in advance,
Cian here from Shopify. Great question!
You could set this up via Shopify's API. You would need to set up a webhook to track new orders being created. You could then use a custom app that you created to run a GET request on your orders to get that information. Check out the following link for more information on using Shopify's API for GET requests: https://help.shopify.com/api/reference/order#index
Another useful resource that you could explore using is our API & Technology forum: https://ecommerce.shopify.com/c/shopify-apis-and-technology
Hope that helps!
All the best.
Another option is to create a webhook in your store that points to a web application that has access to your database. The application doesn't have to be a Shopify app, it would just recieve the webhook data (JSON), parse out the order details, and update your database.
To create a webhook:
If you wanted to create a custom Shopify app, you'd do almost the same thing though the webhook setup process is done in code instead of in the admin interface.
One useful resource I use for this is http://requestb.in/. You can create urls in it that Shopfiy's webhooks can send data to. Then you can inspect the data. It's like a webhook data debugger.
I have a Shopify webhook created already. I am receiving a JSON response locally using a tunnel service. I have created an entry point in my application but I don’t know exactly how to have that JSON response available in the application. I appreciate if you could give me an idea/example of how to do it would be great.
So, my question is, can we create a web-hook for specific products?
And my second question is, once we add our end point, can we control what is sent? I want to send the product and customer information to my end point? Do I need to add this manually or does Shopify does it for me? Please let me know.
Thank you very much, and have a wonderful day.
Hi cian i am using laravel to create a shopify app , i am getting customers and orders details but i want to know customers order detail in a single response