Documentation

Content Reporting API

Content Reporting API

All content uploaded via the Tappa CMS is tracked at an impression & click level.
Tappa provides an API service so that you get more detailed statistics about content into your own systems, for in-house data analysis.

Most of this data is also available in the Content Management WebUI.

NB Please contact your Tappa representative for the appropriate reporting host to use.

URL

GET https://api.[[reporting host]]/sdk/v1/contentReporting

Query Parameters

Parameter NamePossible Values
partnerIDID that was assigned to you by a Tappa customer representative
apiKeyAPI KEY given to you by a Tappa customer representative
startDateThe start date of the report, inclusive, specified in YYYY-MM-DD.
endDateThe end date of the report, inclusive, specified in YYYY-MM-DD

Response Codes

Status CodeMeaningCommentsResponse Model
200OKData was returned according to the ResponseFormatResponse
400Bad RequestAn error occurred with the requestErrorResponse
403ForbiddenRequest is not authorized. Probably incorrect partnerID/apiKeyErrorResponse
416Requested Range Not SatisfiableThe requested time range has over 200k rows. Please selected a smaller time range with fewer rows.ErrorResponse

ErrorResponse

Minimal JSON that has more details about the error:

{
   "error" : ""
}

Response

The response model is a JSON array in the following format:

{
 "date" : {
     "content_type": {
         "content_id": STRING {
             "content_name": STRING,
             "impressions": INT,
             "clicks": INT
        }
    } 
} 

, where content_type can be:

  • stickers
  • gifs
  • wallpapers
  • themes
  • videos
  • sounds
  • polls

Example Request

Python request example:

import requests

url = "https://api.[[reporting host]]/sdk/v1/contentReporting"
params = {
     "partnerID": "ABCDEFGH",
     "apiKey": "1234567890",
  	 "startDate": "2021-07-01",
  	 "endDate": "2021-07-01"
}
result = requests.get(url, params=params)

print(result.json())

Example Response

{
    "2021-07-01":
    {
        "stickers": {
             "sticker_122": {
                  "content_name": "Tom Brady High 5",
                  "impressions": 3221,
                  "clicks": 315                 
             },
            "sticker_873": {
                  "content_name": "Air Jordan Sepia",
                  "impressions": 788,
                  "clicks": 80                 
             }
        },
        "gifs": {
             "gif_11": {
                  "content_name": "Flying High Five From Batman",
                  "impressions": 827,
                  "clicks": 7                 
             }
        }
    }
}