Social Analytics API v1 Documentation

The Social Analytics API provides programmatic access for you to consume all the content used to create social analytics campaign reports.

This page will introduce you to the basic principles of the Social Analytics API and specific endpoint description pages will teach you more about the content that is available from this API.

The base endpoint for the API is https://analytics-api.flockler.com/v1/

API key

Every endpoint requires an API key to present in the request. Key should be used only between servers and not shown to end user. Key must be included in every request as query parameter.

Example: https://...?api_key=f9911067dd263ac7f9fe9a4a8376dfe4

To obtain your API key, please contact our support.

Endpoints

Campaigns

Report

Entries

Users

Response

Currently Social Analytics API only responds via JSON. Most responses consist of a meta, pagination and data node. Below is an example of a typical response with the typical meta, pagination and data nodes:

{
  "meta": {
    "total_count": 214,
    "count": 20
  },
  "pagination": {
    "base": "https://analytics-api.flockler.com/v1/campaigns/92/users?count=9",
    "older": "https://analytics-api.flockler.com/v1/campaigns/92/users?page=2&count=9"
  },
  "users": []
}

Here we have a meta node, pagination node and lastly users node, which in this case, is the data node.

Meta

total_count total number of available items.

count shows how many items are included in this response.

Pagination

base URL for fetching the basic resource.

older URL for fetching next set of items.

Data
The data is presented using an unique key for the request. If you requested for users, the key will be called “users”, if you requested a single campaign, the key will be called “campaign”. This is “the meat” of the response. It may be a list or dictionary, but either way this is where you'll find the data you requested.

HTTP Status Codes

200 OK Successful request.

400 Bad Request Most likely a missing or invalid parameter(s).

404 Not Found The requested item was not found.

500 Internal Server Error Something went wrong on our end.