Skip to main content

Reports

The reports API allows you to view all types of reports available.

List all reports

This API lets you retrieve and view a simple list of available reports.

GET /wp-json/wc/v3/reports
curl https://example.com/wp-json/wc/v3/reports \
-u consumer_key:consumer_secret

Retrieve sales report

This API lets you retrieve and view a sales report.

GET /wp-json/wc/v3/reports/sales
curl https://example.com/wp-json/wc/v3/reports/sales?date_min=2016-05-03&date_max=2016-05-04 \
-u consumer_key:consumer_secret

Sales report properties

AttributeTypeDescription
total_salesstringGross sales in the period. READ-ONLY
net_salesstringNet sales in the period. READ-ONLY
average_salesstringAverage net daily sales. READ-ONLY
total_ordersintegerTotal of orders placed. READ-ONLY
total_itemsintegerTotal of items purchased. READ-ONLY
total_taxstringTotal charged for taxes. READ-ONLY
total_shippingstringTotal charged for shipping. READ-ONLY
total_refundsintegerTotal of refunded orders. READ-ONLY
total_discountintegerTotal of coupons used. READ-ONLY
totals_grouped_bystringGroup type. READ-ONLY
totalsarrayTotals. READ-ONLY

Available parameters

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Default is view. Options: view.
periodstringReport period. Default is today's date. Options: week, month, last_month and year
date_minstringReturn sales for a specific start date, the date need to be in the YYYY-MM-DD format.
date_maxstringReturn sales for a specific end date, the date need to be in the YYYY-MM-DD format.

Retrieve top sellers report

This API lets you retrieve and view a list of top sellers report.

GET /wp-json/wc/v3/reports/top_sellers
curl https://example.com/wp-json/wc/v3/reports/top_sellers?period=last_month \
-u consumer_key:consumer_secret

Top sellers report properties

AttributeTypeDescription
titlestringProduct title. READ-ONLY
product_idintegerProduct ID. READ-ONLY
quantityintegerTotal number of purchases. READ-ONLY

Available parameters

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Default is view. Options: view.
periodstringReport period. Default is week. Options: week, month, last_month and year
date_minstringReturn sales for a specific start date, the date need to be in the YYYY-MM-DD format.
date_maxstringReturn sales for a specific end date, the date need to be in the YYYY-MM-DD format.

Retrieve coupons totals

This API lets you retrieve and view coupons totals report.

GET /wp-json/wc/v3/reports/coupons/totals
curl https://example.com/wp-json/wc/v3/reports/coupons/totals \
-u consumer_key:consumer_secret

Coupons totals properties

AttributeTypeDescription
slugstringAn alphanumeric identifier for the resource. READ-ONLY
namestringCoupon type name. READ-ONLY
totalstringAmount of coupons. READ-ONLY

Retrieve customers totals

This API lets you retrieve and view customers totals report.

GET /wp-json/wc/v3/reports/customers/totals
curl https://example.com/wp-json/wc/v3/reports/customers/totals \
-u consumer_key:consumer_secret

Customers totals properties

AttributeTypeDescription
slugstringAn alphanumeric identifier for the resource. READ-ONLY
namestringCustomer type name. READ-ONLY
totalstringAmount of customers. READ-ONLY

Retrieve orders totals

This API lets you retrieve and view orders totals report.

GET /wp-json/wc/v3/reports/orders/totals
curl https://example.com/wp-json/wc/v3/reports/orders/totals \
-u consumer_key:consumer_secret

Orders totals properties

AttributeTypeDescription
slugstringAn alphanumeric identifier for the resource. READ-ONLY
namestringOrders status name. READ-ONLY
totalstringAmount of orders. READ-ONLY

Retrieve products totals

This API lets you retrieve and view products totals report.

GET /wp-json/wc/v3/reports/products/totals
curl https://example.com/wp-json/wc/v3/reports/products/totals \
-u consumer_key:consumer_secret

Products totals properties

AttributeTypeDescription
slugstringAn alphanumeric identifier for the resource. READ-ONLY
namestringProduct type name. READ-ONLY
totalstringAmount of products. READ-ONLY

Retrieve reviews totals

This API lets you retrieve and view reviews totals report.

GET /wp-json/wc/v3/reports/reviews/totals
curl https://example.com/wp-json/wc/v3/reports/reviews/totals \
-u consumer_key:consumer_secret

Reviews totals properties

AttributeTypeDescription
slugstringAn alphanumeric identifier for the resource. READ-ONLY
namestringReview type name. READ-ONLY
totalstringAmount of reviews. READ-ONLY