Report

Version 2019-10

Note

The Reports Publishing API and the Reports resource are available to Shopify Advanced and Shopify Plus merchants only.

You can use the Report resource to publish reports to the Reports page in the Shopify admin. For example, a shirt fulfillment app could publish a report that compares the sales of shirts by marketing campaign. The reports are based on queries written in ShopifyQL.

Reports are scoped to the app that created them. When an app creates a report, other apps can't view, modify, or delete that report. Also, apps can't access reports that were created from the Shopify admin.

Setting reports publishing permissions

To give reports publishing permissions to your app, add the write_reports permission to your OAuth requested scopes.

What you can do with Report

The Shopify API lets you do the following with the Report resource. More detailed versions of these general actions may be available:

Report properties

category
"category": "custom_app_reports"

The category for the report. When you create a report, the API will return custom_app_reports.

id
"id": 517154478

The unique numeric identifier for the report.

name
"name": "My App Report"

The name of the report. Maximum length: 255 characters.

shopify_ql
"shopify_ql": "SHOW total_sales BY order_id FROM sales SINCE -1m UNTIL today ORDER BY total_sales"

The ShopifyQL query that generates the report. See Shopify Query Language.

updated_at
"updated_at": "2008-02-01T19:00:00-05:00"

The date and time (ISO 8601) when the report was last modified.

Endpoints

GET /admin/api/2019-10/reports.json
Retrieves a list of reports. Note: As of version 2019-10, this endpoint implements pagination by using links that are provided in the response header. Sending the page parameter will return an error. To learn more