Webhook topic to subscribe for shipment notif and delivery notif

Webhook topic to subscribe for shipment notif and delivery notif

LeonYu
Shopify Partner
2 0 0

Hi guys,

 

Which webhook topics should the app subscribes to, if the app would like to be notified when

- An order is shipped

- An order is delivered

 

Thanks for your help!

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1453 238 511

HI @LeonYu If you want to get a webhook for the order/shipped  on the order object check out https://shopify.dev/api/admin-rest/2023-01/resources/webhook#event-topics-orders-fulfilled

And provided you have fulfillment access you can also use https://shopify.dev/api/admin-rest/2023-01/resources/webhook#event-topics-fulfillment-events-create:... to see the fulfillment events including delivered. 

 

Keep in mind you need to be aware of the conditions regarding protected customer data https://shopify.dev/apps/store/data-protection/protected-customer-data. If this is a public app. 

 

We recommend you test the webhooks and payloads before you deploy. Hope that helps. 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

LeonYu
Shopify Partner
2 0 0

Hi @ShopifyDevSup, thanks for the reply! I have a follow-up question: what's the difference between subscribing to a webhook topic via API call (e.g. `POST https://your-development-store.myshopify.com/admin/api/2022-04/webhooks.json`) and subscribing via "shop admin dashboard -> Settings -> Notification -> Create webhook"?

 

I'm asking because I noticed that, the webhook subscriptions via API call isn't listed in the dashboard; and the subscriptions listed in the dashboard won't be returned by API call `GET https://your-development-store.myshopify.com/admin/api/2022-04/webhooks.json` either. I'm wondering which one I should read as the source of truth.

 

Thank you!

ShopifyDevSup
Shopify Staff
1453 238 511

Hey @LeonYu

 

There currently is no a global source of truth that surfaces all existing subscriptions to either the Admin or API.  Webhook subscriptions are scoped to the app that they're registered with and there's some more details in the considerations section of our REST docs on the Webhook resource.

 

Cheers,

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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