Hi @manuelcj! Thanks for your patience and the additional info.
If your legacy WooCommerce Reports are empty, then it’s might be because the site has HPOS enabled, but without sync.
If that is the case, the solution is to go to WP Admin > WooCommerce > Settings > Advanced > Features. Find the Enable compatibility mode (synchronizes orders to the posts table) setting, check the box next to it, and click Save changes.
It may take a short while for the data to sync, depending on the number of orders in your store. Once done, go to WP Admin > WooCommerce > Status > Tools, and Clear Transients. After this step, your WooCommerce > Reports should be populated once again. The issue was originally reported last year, in this since-closed GitHub issue.
To refer back to your original question about the API:
Are you working on updating the WooCommerce API as the old ‘Reports’ section is becoming obsolete?
There’s more information about that in this GitHub issue: wp-json/wc-analytics endpoint documentation, but the tl;dr: is that while there is an API accessible at /wp-json/wc-analytics/
, it’s still “application specific” and not documented. However, the link provides details about how it could be used in the interim. I might also suggest joining the WooCommerce Developer Community Slack to discuss its use further.
I hope the above is helpful and offers a path forward.