Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents:

Table of Contents
minLevel2

Intro

Info

This is the primary aggregated Aggregated reports API method.

In fact, all All the Analytics reports one finds in the Ongage UI, such as the Aggregate report, Matrix report, Transactional, etc. are all generated with this API method.!

(info) Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used. 

Methods Summary

POST /api/reports/query

Description 

This method fetches reports data from "mailing_data". Those residing under the Analytics in the UI of your account. 

...

The response will include the counts rates.

include_conversion_points

Optional boolean

The response will include conversion points stats.

All list_data optional fields:

...

Ongage\ResourceBundle\Model\Exception\InvalidData

Examples

Example - Retrieve Stats from All Lists

...

Code Block
{
    "select": [
    "link_id",
        [ "sum(`sent`)", "total_sent" ]
    ],
    "filter": [
        ["mailing_id",  "=",  555555       ],
        [ "stats_date", ">=", "2013-01-15" ]
 ],
    "from": "mailing",
    "group": [ "link_id" ],
    "order": []
}

Example - Get aggregated campaign report with NOT LIKE/LIKE Operator

POST URL: https://api.ongage.net/<list_id?/api/reports/query

Code Block
{
 "select":[
 "mailing_name",
 "sum(`sent`)",
 "sum(`opens`)",
 "sum(`unique_opens`)",
 "sum(`unsubscribes`)",
 "sum(`complaints`)",
 "sum(`hard_bounces`)",
 "sum(`soft_bounces`)",
 "sum(`clicks`)",
 "sum(`unique_clicks`)"
 ],
 "from":"mailing",
 "filter":[
 [
 "is_test_campaign",
 "=",
 0
 ],
 [
 "mailing_name",
 "NOT LIKE",	// you can use LIKE here //
 "%_Text%"		// TEXT here is any word in your campaign names which you want to use to ADD/DISCARD to get the reports. //
 ],
 [
 "stats_date",
 ">=",
 "2021-03-01"
 ]
 ],
 "group":[
 "mailing_name"
 ],
 "list_ids" : "all",

"get_extra_conversion_points":true
}

...