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. Reporting API
  • 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. Reporting API

Filter parameter specification

filter parameter allows for scoping down queries. It consists of nodes which are used to build tree-like structure and generate correct SQL queries over underlying databases.
Each of JSON object (node) requires "type" key which determines logic that needs to be applied.

Example#

{
  "type" => "and",
  "operations" => [
    { "type" => "equal", "field" => "grouping_type", "value" => "optin_channel" },
    { "type" => "equal", "field" => "grouping_value", "value" => "default" }
  ]
}
Adding following filter parameter to a query will scope it down to records/timeseries data which have both:
grouping_type field with optin_channel value and
grouping_value field with default value

Logical node#

Logical node joins several nodes with provided logic. JSON object needs to include:
"type" - logical node type (see below)
"operations" - array with underlying nodes
"type" keyOperation logicRate limiting cost
andJoins operations with AND1
orJoins operations with OR3

Base operation node#

Operation is a single operation which will be executed. JSON object needs to include:
"type" - operation node type (see below)
"field" - field which will be used for operation. Note that this field must be "filterable" for given report.
"value" - value which will be used in operation
"type" keyOperation logicRequirementsAdditional notes
equalChecks whether field equals to value-When null is provided as a value then IS NULL query will be executed
not_equalChecks whether field is not equal to value-When null is provided as a value then IS NOT NULL query will be executed
greater_thanChecks whether field is greater than valueField must be numerical or timestamp.-
greater_or_equal_toChecks whether field is greater or equal to valueField must be numerical or timestamp.-
less_thanChecks whether field is less than valueField must be numerical or timestamp.-
less_or_equal_toChecks whether field is less or equal to valueField must be numerical or timestamp.-
inChecks whether field equals to one of provided valuesValue must be an arrayWhen field is an array, then it will be returned when any elements are in common
not_inChecks whether field not equals to one of provided valuesValue must be an arrayLogical opposite of in

Rate limiting#

Each operation node adds 1 token to request cost.

JSON operations node#

This operation allows to query over JSON fields. JSON object needs to include:
"type" - JSON operation node type (see below)
"field" - field which will be used for operation. It needs to be formatted as <report field>.<json_key> (for example consents.sms_consent). Note that <report's field> must be filterable.
"value" - value which will be used in operation
"type" keyOperation logicRequirementsAdditional notes
existsChecks whether JSON key exists--
not_existsChecks whether JSON key does not exist--
equalChecks whether JSON key value is equal to value--
not_equalChecks whether JSON key value is not equal to value--

Rate limiting#

Each operation node adds 2 tokens to request cost.

Examples#

{
  "type": "and",
  "operations": [
    { "type": "equal", "field": "grouping_type", "value": "optin_channel" },
    { "type": "equal", "field": "grouping_value", "value": "default" }
  ]
}
This param will use 1 (and logical node) + 2x1 (equal operation nodes) = 3 tokens of rate limit cost.
Previous
Introduction
Next
Records
Built with