Our documentation is changing, please click here to enjoy it!

Skip to end of metadata
Go to start of metadata

This API route allows you to collect message or campaign statistics on the Accengage solution.

Operations

POST

/getStatistics.php

ParameterModel
body
Data

 


 

(1) At least one of these values is mandatory
(2) This feature is only available on demand

(3) If neither a messageId nor a campaignId is provided, the maximum time interval is 3 days

(4) This feature is mandatory for application using new statistics

Response
body

 


 

Statistic

 


 

Message

 


 

Stat (push notifications, automated messages, Facebook)
Stat (in-app, in-site)
Stat (local notifications)
Return code
returnCodeDescription

0

No error

1Request error
2Bad message ID
3No or bad user
4No or bad partner
5Bad campaign ID
6Too many criteria, it must be messageId OR campaignId
7Type cannot be campaign if messageId is set
8endDate must be after startDate
9Access denied
10Bad type
11Maximum 3 days of daily statistics without messageId or campaignId
12Type must be campaign if campaignId is set
13Cannot have daily criteria AND total criteria

If messageId is set, startDate and endDate are only used when daily or total keys are set to true.

If campaignId is set, startDate and endDate are only used when daily or total keys are set to true, or if the type is set to "message".

If daily or total are set to true, startDate and endDate are mandatory. If a campaignId is specified, type "message" is forbidden. Also, if no type is set, "campaign" type is the default value.

Request examples

RequestBodyDescription

POST /getStatistics.php

Collects statistics for messages from a campaign with ID "261" between the 1st of December 2013 and the 1st of February 2014
POST /getStatistics.php
Collects statistics for messages from a campaign between the 22th January 2015 and the 29th of January 2015

Response examples

RequestResponseDescription
POST /getStatistics.php
Response for one message
POST /getStatistics.php
Response for one campaign
POST /getStatistics.php
Response for all messages between 2013-12-01 and 2014-12-01
POST /getStatistics.php
Response for daily statistics for message 2647 between 2014-06-08 and 2014-06-09
POST /getStatistics.php
Response for total statistics for message 2647 between 2014-06-08 and 2014-06-09
  • No labels