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).

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

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

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

537

Any other method that might work?