Instead of query the database directly is there a way to use the api to retrieve payout info?

Instead of query the database directly is there a way to use the api to retrieve payout info? preferable with powershelgl or curl?

The API doesn’t have all needed info for the past periods. It can give an information for the current month.
You can take a look on