# Read Account Statistics

Reads how one KlickTipp account is doing -- the five blocks of its dashboard in one call. recentCampaigns: the last ten mailings with what they achieved, including the same open and click rates get-campaign-statistics reports. topTags: the tags that gained the most contacts today, with their totals. activity: one entry per day with subscriptions, unsubscriptions, SMS subscriptions, imports, the three bounce kinds and spam complaints -- no sends, opens or clicks, which are only counted per campaign. ispShares: which mail providers the contacts are at. bounces: how many contacts are bouncing, by kind. An SMS campaign reports opensUnique and openRate as null -- it has no opens to count. For one campaign in detail use get-campaign-statistics.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "days": {
      "type": "integer",
      "description": "How many days of daily activity to return, 1 through 90; the other blocks are unaffected",
      "default": 30,
      "minimum": 1,
      "maximum": 90
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "days",
    "recentCampaigns",
    "topTags",
    "activity",
    "ispShares",
    "bounces"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "days": {
      "type": "integer"
    },
    "recentCampaigns": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "name",
          "sent",
          "opensUnique",
          "openRate",
          "clicksUnique",
          "clickRate"
        ],
        "properties": {
          "campaignId": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "sent": {
            "type": "integer"
          },
          "opensUnique": {
            "type": [
              "integer",
              "null"
            ]
          },
          "openRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "clicksUnique": {
            "type": "integer"
          },
          "clickRate": {
            "type": "number"
          }
        }
      }
    },
    "topTags": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "tagId",
          "name",
          "contacts",
          "addedToday",
          "addedYesterday",
          "addedDayBefore"
        ],
        "properties": {
          "tagId": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "contacts": {
            "type": "integer"
          },
          "addedToday": {
            "type": "integer"
          },
          "addedYesterday": {
            "type": "integer"
          },
          "addedDayBefore": {
            "type": "integer"
          }
        }
      }
    },
    "activity": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "date",
          "subscriptions",
          "unsubscriptions",
          "smsSubscriptions",
          "imports",
          "hardBounces",
          "softBounces",
          "spamBounces",
          "spamComplaints"
        ],
        "properties": {
          "date": {
            "type": "string"
          },
          "subscriptions": {
            "type": "integer"
          },
          "unsubscriptions": {
            "type": "integer"
          },
          "smsSubscriptions": {
            "type": "integer"
          },
          "imports": {
            "type": "integer"
          },
          "hardBounces": {
            "type": "integer"
          },
          "softBounces": {
            "type": "integer"
          },
          "spamBounces": {
            "type": "integer"
          },
          "spamComplaints": {
            "type": "integer"
          }
        }
      }
    },
    "ispShares": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "domain",
          "contacts"
        ],
        "properties": {
          "domain": {
            "type": "string"
          },
          "contacts": {
            "type": "integer"
          }
        }
      }
    },
    "bounces": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "bounceType",
          "contacts"
        ],
        "properties": {
          "bounceType": {
            "type": "string"
          },
          "contacts": {
            "type": "integer"
          }
        }
      }
    }
  }
}
```

