Messaging and Code Statistics

This request returns the total statistics of all messaging and code related activities over the last few days, allowing for a quick view of the most recent activity, allowing also for defining the time period to be set regardless of calendar periods.

For example, the user can request the statistics over the last 7 days but not apparently within the calendar week. So if the end of the period is a Wednesday, the start of the period can be set to last week's Thursday.

HTTP Request

URLMethodDescription
https://app.tellody.com/CampaignCloud/Report/UniqueCode POST Get statistics for messaging and codes activities over a flexible time period (non-calendar based).

POST Parameters

All involved parameters in the request are time related.

NameDescription
"from" This key is set to the start date of the examined period represented in milliseconds.
"to" For the most recent activity, this key is set to the current date represented in milliseconds and marks the end of the period for the collected statistics.
"unit" This key is set to any of the folllowing string values: hour,day,week,month.
"dow" This key represents the day of the week and for this request it is ignored but should be set to zero as a default value.

Sample Request

PythonOther

#Retrieving the XSRF Token needed for Session
pingResponse = my_session.get("https://app.tellody.com/CampaignCloud/RememberMeController/ping")

#Import the X-XSRF-Token returned from RememberMeController/ping into the request headers
xsrfToken = pingResponse.headers.get("X-XSRF-TOKEN")

#HTTP request header
header = {"Content-Type" : "application/json", "X-XSRF-TOKEN" : xsrfToken}
data={"from":1438635600000,"to":1439240399999,"unit":"day","dow":0}
url="https://app.tellody.com/CampaignCloud/Report/UniqueCode"
response = my_session.post(url,header,data).json()
print(json.dumps(response,ensure_ascii=False))

Response

Each value per row represents the total count per code activity type during the selected period.

Below is also a description of each returned key in the response.

JSON KeyDescription
"SMS_SENT" SMS attempts
"DL" File downloads
"OPTOUT" Optout initiations
"URL" Clicked URLs
"VOUCHER" Vouchers viewed
"EMAIL_SENT" Email attempts
{
   "OPTOUT":0,
   "DL":0,
   "VOUCHER":0,
   "SMS_SENT":0,
   "URL":0,
   "EMAIL_SENT":0
}

Errors

In case of an error information may be derived by the HTTP Status in the result of each request (e.g. HTTP 400 – Bad Request).

Back to Top