Mautic Calling API

I would like mautic to call my app to pull the current purchases of a certain item so I can send them all an email from within mautic.

So I think I need to hook into the segments code to pull the buyers of a product. Anyone has experience with this ?