I noticed that new webhooks I've created for new stores seem to come back with an api_version of "2020-01" which I would consider "correct".
I've attempted to recreate a webhook on an existing store by deleting it, then re-created it. However, it comes back with a "2019-04", or the old one.
I was sure to create the webhook through the 2020-01 version of the api.
Am I missing something? What would be the manner by which I could update the webhook api version?
Can I update the app settings directly through the API? As I mentioned previously, I have access to the stores through the API and wish to keep the webhooks current for my app. Going through each and every UI making a manual adjustment to the webhook seems very unnecessary. If I can make webhook updates through a PUT request, can I not change the version of the webhook as well?
Sorry, I feel like I keep asking the same question, so perhaps I'm not communicating clearly enough. I have a large number stores using a private app for our integration with them. I setup the webhooks through the API because I do NOT have access to the store's UI as in the screenshot. I need to be able to update the version of the webhook directly through the API. I'm guessing more and more that this is not possible. It seems very strange however, that I could create a webhook through the API, I can modify the webhook through the API, however if I want to use the latest version of the webhook, it requires somebody to access the UI of the store and change the dropdown. Just didn't make sense to me.
No worries! I think the confusion might be around public vs private apps.
For public apps, update the version in the app settings (once).
For private apps, update the version in admin > private apps > app > settings (for each app). You'll need to have them grant you access or update the version for you. Keep in mind, if an app is set to use an API version that is no longer supported, then Shopify will fall forward to use the oldest supported version. I.e. it will auto update every few months.
There's a walkthrough for each here: https://shopify.dev/tutorials/manage-webhook-api-versions
Let me know if you have any questions!
Thanks. The App in question is a private app. So it looks like I can't make an API call to update that. Note, I think that is probably a fair feature request, since we can do pretty much everything else via the API.
The fact that it will roll forward automatically will ultimately fix it. But I wish I could be more pro-active without having to ask customers to make changes to webhooks for me.