WooCommerce Analytics REST API: Querying Reports Programmatically
WooCommerce 4.0+ ships a dedicated Analytics REST API at /wp-json/wc/v3/reports/ and the newer Analytics endpoints at /wp-json/wc-analytics/ that power the WooCommerce Admin dashboard. These endpoints support date filtering, pagination, extended stats, and segmentation — making it possible to build custom dashboards, export pipelines, or headless reporting tools without direct database access.