Skip to main content

Reports API

Get programmatic access to all your reports

Mihai Iova avatar
Written by Mihai Iova
Updated over a week ago

This API lets you programmatically run any saved report from Datma and retrieve structured results exactly as they appear in the Datma app - including all configured dimensions, measures and filters.


Endpoint

https://data.datma.io/reports/{report_id}

Example Request

curl --location 'https://data.datma.io/reports/All_Products-q4r5?start_date=2025-05-01&end_date=2025-05-25&page=0&size=50' \ --header 'Authorization: Bearer YOUR_API_TOKEN'

Path Parameters

Parameter

Description

report_id

Identifier of the saved report. Extracted from the URL when viewing a report in the Datma app.

Example for the "All products" report with the following URL:

https://app.datma.io/shopify/reporting/metrics/All_Products-q4r5

The report_id is: All_Products-q4r5

Query Parameters

Parameter

Description

Example

start_date

Start of the date range (YYYY-MM-DD)

2025-05-01

end_date

End of the date range (YYYY-MM-DD)

2025-05-25

page

Page number (0-based)

0

size

Number of results per page

50

โš ๏ธ Limitation:
The maximum allowed range between start_date and end_date is 30 days. Requests exceeding this will return an error.

Required Header

Header

Description

Authorization

Bearer token for API access

You can generate a token from your account: https://app.datma.io/shopify/reporting/account-settings/api

Response

The response includes:

  • The report_id and the report_name

  • The store_url

  • The exact time in UTC when the report was generated

  • Pagination info

  • A data array with result rows matching the report configuration

Example Response

{
"id": 40123,
"report_id": "All_Products-q4r5",
"report_name": "All Products",
"store_url": "storedomain.com",
"report_time_utc": "2025-05-27T14:09:57+00:00",
"start_date": "2025-05-01",
"end_date": "2025-05-25",
"data": [
{
"Product Title": "Luxe Leather Wallet",
"Product Type": "Accessories",
"Product Revenue": "158",
"PDP Views": "1,204"
},
{
"Product Title": "Aviator Sunglasses",
"Product Type": "Accessories",
"Product Revenue": "94",
"PDP Views": "870"
},
{
"Product Title": "Canvas Shoulder Bag",
"Product Type": "Accessories",
"Product Revenue": "133",
"PDP Views": "992"
}
],
"page": 0,
"page_size": 50
}
Did this answer your question?