All Collections
How do I access a report from the API
How do I access a report from the API
Derek Stotz avatar
Written by Derek Stotz
Updated over a week ago

When interacting with the Reporting API, you may find it easier to build a report in Heartland Retail rather than constructing the request URL manually. This tutorial will assist you in getting the request URL from a report that you have built.

1) Build the report exactly how you want to retrieve the data from the API. For instance, if subtotals and grand totals are turned on, those lines will be accessible from the API as well so the script you build will need to handle those lines. Typically those options are both turned off for these reports.

2) Open up either Chrome or Firefox’s developer tools menu from your web browser and select the Network tab.

3) Refresh the web page with the Network tab open and it will capture all requests being made. You will want to select the GET request beginning with “analyzer?per_page” and you will be able to see the API Request URL.

This is the URL to use as an endpoint for a GET request using our API to read a report. Below is an example of what a response will look like when parsed.

Did this answer your question?