Placewise API
Get startedExplore
Get startedExplore
Performance Cloud 🗗
Placewise 🗗
ExplorePublic APIManagement APIUsers APIOperations APIMessaging APIReporting API
ML APIData API
ExplorePublic APIManagement APIUsers APIOperations APIMessaging APIReporting API
ML APIData API
  1. Data formats
  • Introduction
  • Filter parameter specification
  • Data formats
    • Records
    • Timeseries
  • 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)
      • Examples
        • sendings - find sending by reporting_id
        • sendings_events_history - show sending events
        • sendings_recipients_statistics - show recipients by age groups
    • Links
      • links_visits_history (timeseries)
  • 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
  1. Data formats

Timeseries

Timeseries is a format which is returned for historical timeseries data.

Example#

Request params#

{
    "report": "member_balance",
    "filter": null,
    "aggregate_by": "consents",
    "interval": "auto",
    "from": "2024-04-08T00:00:00.000-06:00",
    "to": "2024-04-25T00:00:00.000-06:00"
}

Response#

{
    "interval": "1d",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-04-08T00:00:00.000-06:00",
        "2024-04-09T00:00:00.000-06:00",
        "2024-04-11T00:00:00.000-06:00",
        "2024-04-22T00:00:00.000-06:00",
        "2024-04-23T00:00:00.000-06:00",
        "2024-04-24T00:00:00.000-06:00",
        "2024-04-25T00:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {
                "type": "out"
            },
            "values": [2,2,1,1,null,1,5]
        },
        {
            "label": {
                "type": "in"
            },
            "values": [null,4,300,2,1,null,11]
        }
    ],
    "data_points": 11,
    "result_type": "timeseries"
}

Intervals#

Timeseries data is grouped in time buckets.
Each time bucket spans over specified interval
Each interval can have different retention times
Each report can use different intervals
Report handles 5m, 1h, 1d, 1w and 1mo intervals unless it's stated differently in Metadata endpoint.
IntervalTime bucket intervalRetention time
5m5 minutes14 days
1h1 hour6 months
1d1 day2 years
1w1 weekforever*
1mo1 monthforever*

interval request param#

In order to specify the interval, you need to pass interval request parameter.
You can use specific interval (like 1d) or default - auto.
auto automatically chooses interval based on logic:
if to - from difference is less or equal to 12 hours then 5m
if to - from difference is less or equal to 3 days then 1h
else 1d

Time buckets#

Time buckets are aligned to "full" time given by the interval. For example, when using 5m interval: 11:00:00, 11:05:00, 11:10:00, etc.
Time buckets are provided in ascending order
When there is no value for given time bucket, then it won't be returned.

Series#

Single series consists of:
label - an object which describes the series
values - array of numbers. Each number is a value in the corresponding time bucket.
timezone (optional) - see Timezones handling
If there is no data in the time bucket for given series then the value will be null.

Query limits#

Time points (number of time buckets)#

Single query can include at most 150 time points.
For example:
when querying the data using 1d interval, number of days between from and to parameters must be less or equal to 150
when querying the data using 5m interval, number of 5m buckets between from and to must be less or equal to 150
Trying to fetch more than 150 time points will return 422 HTTP error.
If you need more time points, you need to implement iteration using from and to parameters yourself.

Data points#

Single query can include at most 1000 data points.
Trying to fetch more than 1000 data points will not return HTTP error. Returned data will be just limited to 1000 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.

What is a data point?#

Data point is a single value point except default null values.
For example, if the query returns 3 series in which:
first have 10 non null values
second have 5 non null values
third have 15 non null values
Then the number of data points is 10+5+15 = 30
Note that there is no possibility to break 1000 data points limit unless your query returns more than 6 series.

Timezones handling#

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