API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
IndexPublic APIManagement APIUsers APIOperations APIMessaging APIReporting API
ML APIData API
IndexPublic APIManagement APIUsers APIOperations APIMessaging APIReporting API
ML APIData API
  1. Data formats
  • Introduction
  • Filter parameter specification
  • Data formats
    • Records
    • Timeseries
    • Statistics
  • Reports
    • Members
      • members (records)
      • members_count (records)
      • members_grouped_count (records)
      • member_balance (timeseries)
      • members_count_snapshot (timeseries)
      • members_count_history (timeseries)
    • Sendings
      • sendings (records)
      • sendings_events_history (timeseries)
      • sendings_recipients_statistics (timeseries)
      • sendings_links (records)
      • sendings_links_stats (records)
      • sendings_stats (statistics)
      • Examples
        • sendings - find sending by reporting_id
        • sendings_events_history - show sending events
        • sendings_recipients_statistics - show recipients by age groups
        • sendings_stats - show statistics for campaign
        • sendings_events_history - show sending events for campaign
        • sendings_stats - show statistics for all campaigns
        • sendings_events_history - show sending events for all campaigns
    • Links
      • links_visits_history (timeseries)
    • Offers
  • Geo API
    • Find Locations Coordinates
      POST
    • List places
      POST
    • Show place
      GET
  • Metadata
    POST
  • Field metadata
    POST
  • Query (records)
    POST
  • Query (timeseries)
    POST
  • Query (records) export
    POST
  • Query (timeseries) export
    POST
  • Tenants query (records) export
    POST
  • Tenants query (timeseries) export
    POST
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
IndexPublic APIManagement APIUsers APIOperations APIMessaging APIReporting API
ML APIData API
IndexPublic APIManagement APIUsers APIOperations APIMessaging APIReporting API
ML APIData API
  1. Data formats

Statistics

Statistics is a format which allows to make statistical operations (for example: sum) on underlying timeseries data.

Example#

Request params#

{
    "report": "sending_stats",
    "filter": null,
    "aggregate_by": "campaign_id",
    "statistic": "sum",
    "from": "2024-04-08T00:00:00.000-06:00",
    "to": "2024-04-25T00:00:00.000-06:00"
}

Response#

{
    "range_timezone": "America/Denver",
    "series": [
        {
            "label": {
                "type": "out"
            },
            "value": 50
        },
        {
            "label": {
                "type": "in"
            },
            "value": 60
        }
    ],
    "result_type": "statistics",
    "interval": "1d",
    "effective_from": "2024-04-05T00:00:00.000-06:00",
    "effective_to": "2024-04-25T00:00:00.000-06:00"
}

from, to request params#

The from and to request params are optional, but we strongly suggest providing them for faster responses. When empty, data will be searched between customer's creation time and now.
When those params are provided, query:
Will be executed to match requested timeframe using timeseries data from time buckets that were not deleted by retention yet.
Will be executed over maximum of 150 time buckets. In case of query that queries more time buckets than 150, the greater time bucket resolution will be searched.
Time buckets with their retention are described here: Timeseries#intervals.

statistic request param#

Available statistical operations:
sum
minimum
maximum
Note that these operations are made over interval used to execute the query.
For example, when interval is 1mo result of the minimum would be value of month with minimal value.

Series#

Single series consists of:
label - an object which describes the series
value - number which is produced via statistic operation

Query limits#

Data points#

Single query can include at most 100 data points.
Trying to fetch more than 100 data points will not return HTTP error. Returned data will be just limited to 100 data points. You can see how many data points were returned by the query via data_points response field.
In order to lower down number of data points, you need to use filter or from/to params to scope down the query.

Timezones handling#

See Introduction#Timezones
Previous
Timeseries
Next
members (records)
Built with