Listening for a POST request from an API URL endpoint

I'm looking for a way to listen for a POST from an API URL endpoint, and then just log the output data. I tried using Flask to create a simple server-side script in Python to listen for POST requests on the URL endpoint and print the data, but that approach doesn't work (external IP). Any other method that might work?

The API URL endpoint (to continuously poll/listen on for new data):

request_url = "https://xxxx-ocean.com:xxx/v2/vesselcount/"

Example data after using r = requests.get(request_url):

537