Campaigns

GET
/campaigns

Get all campaigns available.

GET https://analytics-api.flockler.com/v1/campaigns
{
  "campaigns": [
    {
      "id": 93,
      "name": "Social Analytics API Doc example - test",
      "last_update_at": "2016-06-22T09:01:35.052Z",
      "update_enabled": false,
      "disabled_by_user": true,
      "flockler_section_id": 15268,
      "flockler_site_id": 1409,
      "facebook_access_token_expired": false,
      "facebook_password_changed": false,
      "instagram_access_token_invalid": false,
      "twitter_access_token_invalid": false,
      "twitter_spam_protection_triggered": false,
      "being_deleted": false,
      "section_deleted": false,
      "instagram_connected": false,
      "twitter_connected": true,
      "facebook_connected": false,
      "campaign_type": "social",
      "old_articles_fetched": false,
      "instagram_items_exist": false,
      "twitter_items_exist": false,
      "facebook_items_exist": false
    },
    {
      "id": 92,
      "name": "Example report",
      "last_update_at": "2019-07-10T09:39:51.197Z",
      "update_enabled": true,
      "disabled_by_user": false,
      "flockler_section_id": 15263,
      "flockler_site_id": 1409,
      "facebook_access_token_expired": false,
      "facebook_password_changed": false,
      "instagram_access_token_invalid": true,
      "twitter_access_token_invalid": false,
      "twitter_spam_protection_triggered": false,
      "being_deleted": false,
      "section_deleted": false,
      "instagram_connected": true,
      "twitter_connected": true,
      "facebook_connected": false,
      "campaign_type": "social",
      "old_articles_fetched": true,
      "instagram_items_exist": true,
      "twitter_items_exist": true,
      "facebook_items_exist": false
    }
  ]
}
Field Data type Description values
facebook_api_token_expired boolean Indicates if Facebook needs to be reconnected
facebook_connected boolean true if this campaign has Facebook account connected
flockler_section_id integer ID of the section this campaign is for, null for site-wide campaigns
flockler_site_id integer ID of the Flockler site this campaigns belongs to
id integer ID of this campaign
instagram_connected boolean true if this campaign has Instagram account connected
is_initiated boolean true if campaign is ready to be read
last_update_at datetime Campaign's last update time
name string Name of this campaign
twitter_connected boolean true if this campaign has Twitter account connected
twitter_spam_protection_triggered boolean Indicates if Twitter's spam protection was triggered for the connected account
GET
/campaigns/campaign-id

Get information about a campaign

GET https://analytics-api.flockler.com/v1/campaigns/92
{
  "campaign": {
    "id": 92,
    "name": "Example report",
    "last_update_at": "2019-07-10T09:39:51.197Z",
    "update_enabled": true,
    "disabled_by_user": false,
    "flockler_section_id": 15263,
    "flockler_site_id": 1409,
    "facebook_access_token_expired": false,
    "facebook_password_changed": false,
    "instagram_access_token_invalid": true,
    "twitter_access_token_invalid": false,
    "twitter_spam_protection_triggered": false,
    "being_deleted": false,
    "section_deleted": false,
    "instagram_connected": true,
    "twitter_connected": true,
    "facebook_connected": false,
    "campaign_type": "social",
    "old_articles_fetched": true,
    "instagram_items_exist": true,
    "twitter_items_exist": true,
    "facebook_items_exist": false
  }
}
Field Data type Description values
facebook_api_token_expired boolean Indicates if Facebook needs to be reconnected
facebook_connected boolean true if this campaign has Facebook account connected
flockler_section_id integer ID of the section this campaign is for, null for site-wide campaigns
flockler_site_id integer ID of the Flockler site this campaigns belongs to
id integer ID of this campaign
instagram_connected boolean true if this campaign has Instagram account connected
is_initiated boolean true if campaign is ready to be read
last_update_at datetime Campaign's last update time
name string Name of this campaign
twitter_connected boolean true if this campaign has Twitter account connected
twitter_spam_protection_triggered boolean Indicates if Twitter's spam protection was triggered for the connected account