Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
According to this: https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments-as-a-service-app, when a store makes a fulfillment request, your app (as the fulfillment service) receives a notification with a parameter "kind" being either FULFILLMENT_REQUEST or CANCELLATION_REQUEST.
Is there any way to get an ID?
- Fulfillment order ID
- or Order ID
- or Shop handle
From that guide, it sounds like every time someone requests fulfillment, Shopify wants you to make an API call to every single user to see if they have open fulfillment orders.
I figure I must be missing something because this is wasting thousands of API calls, but from the documentation I can't find anything.
Could anyone tell me how to get the rest of the data for those fulfillment requests?
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi @JoesIdeas
Is there anything in the received headers that might give you that information - as opposed to it being in the body of the notification?
I don't know if that's the case or not - it was just my first hunch.
I agree that it would seem ridiculous to have to query every authed store to see if they had a fulfilment.
Perhaps there's some kind of token/HMAC validation that you can verify against your own data to get the store name?
This is an accepted solution.
Hi @JoesIdeas
Is there anything in the received headers that might give you that information - as opposed to it being in the body of the notification?
I don't know if that's the case or not - it was just my first hunch.
I agree that it would seem ridiculous to have to query every authed store to see if they had a fulfilment.
Perhaps there's some kind of token/HMAC validation that you can verify against your own data to get the store name?
Oh nice one, ya I found a field ["HTTP_X_SHOPIFY_SHOP_DOMAIN"], good idea... I didn't expect that because on normal webhooks they give the data in the hook.
Thanks!