I need to send off information to an endpoint that a direct to garment printer has setup for us to get our products customized based on line item properties that are added to the product within the order. The issue is that the normal webhooks module via the Shopify admin sends webhooks for every single order. We only need the printer to get order information for particular orders that contain a particular product. How would we be able to accomplish this? Every order that we would want to be exported would always have 1 product along with several line item properties. We would want those orders to be sent to the endpoint so as not to bombard the endpoint with orders that don't pertain to customization.
You could poll using the REST or GraphQL API for just those specific order instances. I don't think you can modify the orders/create webhook so it only fires for a filtered set of criteria. If it were me I'd just stay with the existing webhook, and have my receiver inspect the JSON request body to handle just what you need.
@ner, You can't filter them within Shopify webhooks. If it is about not sharing all the data with the third-party I would recommend you create your own endpoint (server code) for which you create the webhook in Shopify. Then filter the orders based on certain conditions and send the filtered data to the third-party endpoint.