I'm developing an application to sync Shopify product lists with my own database. When a product is deleted from the Shopify admin, I need to delete it in the MySQL database. I think I have to create a webhook to delete the product. I know a way to create a webhook in the Shopify admin page, but I want to create it when the app is installed. If you have any ideas please tell me your answers.
I tried looking for answers to this problem but couldn't find any solution.
P粉2564870772023-12-25 10:56:22
I think you are looking for Automated Webhook Subscriptions via API. Yes, Shopify does allow this. When your app is being installed or authorized by a Shopify store, you need to call the subscription hook through the API. Please check the documentation below.
Learn about webhooks and behaviors: https://shopify.dev/apps/webhooks< /p>
Webhook subscription API: https://shopify.dev/ api/admin-rest/2022-10/resources/webhook