ACME's Reporting API endpoints can be leveraged to execute reports without having to login to ACME Backoffice to run individual report instances. Using the API you can automate your reporting and retrieve data at any time to meet your reporting needs. This guide intends to explain the steps to implement this feature.



To utilize the ACME API, you will need the following:

  1. ACME API Key to your ACME tenant database. See Requesting an API Key for instructions.
  2. An API platform for using ACME APIs with active access.
  3. Pre-configured report definitions in ACME for the reports you would like to execute.



Prerequisite: Configure Report Definition

If not already present, configure your desired report in ACME Backoffice. Set the top level parameters and filters, and the fields to include in your output. Take note of the Report Definition ID that is in the URL of the report.

Note: Output fields are defined by the Group By/Summarize By fields OR the selected fields in Edit Columns if no grouping is applied.

Step 1: Get Report Definition

You will need to obtain the query expression from the report you will be executing. Use the report definition ID from the report URL as the {id}.

GET/v2/b2b/analytics/report/definitions/{id}NoneReport Definition

Note the queryExpression that is in the response. You will need this in Step 2.

Step 2: Execute Report

In your request, insert the queryExpression obtained from Step 1 in your payload to execute the report.

POST/v2/b2b/async/reportAsync Report Object Async Report Object

Note the report instance ID, which will be used to confirm status in Step 3.

Step 3: Confirm Report Status

Use the report instance ID obtained in Step 2 to confirm the report status. Some reports may take time to execute. Make sure the report status is Complete before you retrieve the results. 

GET/v2/b2b/async/report/{id}NoneAsync Report Object

Step 4: Retrieve Report Results

Once the report’s status is “complete", obtain the report output via JSON or CSV format using the report instance ID obtained in Step 2.

GET/v2/b2b/async/report/json/{id}NoneJSON-formatted report results
GET/v2/b2b/async/report/csv/{id}NoneCSV-formatted report results