Get Campaign Statistics
Returns the statistics of email campaigns sent within a given date range. The campaign statistics include data like the number of total recipients, the scheduled date, the number of opens, clicks bounces etc.
The “FromDate” and “ToDate” must be specified in UTC “yyyy-mm-dd hh:mm:ss” format.
API URL
Request
Content-Type: application/json{ "Parameter": { "FromDate": "2012-12-28 00:00:00", "ToDate": "2016-12-29 00:00:00" }, "Paging": { "PageIndex": 1, "PageSize": 1000 }, "Sorting": { "ColumnName":"CreatedOn", "Direction": 1 } }
Request Parameters
Parameter | Description |
---|---|
FromDate | Beginning of the date range in UTC (YYYY-MM-DD HH:MM:SS). |
ToDate | End of the date range in UTC (YYYY-MM-DD HH:MM:SS). |
PageIndex | Refers to the page number (“1” represents the first page). |
PageSize | Refers to the number of records to be displayed. |
ColumnName | The name of the column you want to sort the results by. |
Direction | Passing “1” will sort the data most recent first while “0” will sort oldest first. |
Response
{ "RecordCount": 1, "List": [ { "Id": "cd440fd7-7c26-11e6-8f87-22000aa8e760", "CampaignName": "Email Campaign 8_copy2", "Subject": "Test", "TotalRecipients": 3, "ScheduledOn": "2016-09-16 16:02:03", "NoAction": 2, "Delivered": 2, "Open": 0, "Click": 0, "Bounce": 1, "Unsubscribed": 0, "Spam": 0, "FromUser": "563fc7e8-797d-11e4-b2b6-22000a940c0c", "FromUserName": "Prashant Singh", "CreatedBy": "563fc7e8-797d-11e4-b2b6-22000a940c0c", "CreatedByName": "Prashant Singh" } ] }
HTTP Response Codes
Code | Description |
---|---|
200 OK | This is the status code for successful API call. |
401 Unauthorized | The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
400 Bad Request | The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
404 Not Found | The API could not be found. Please check the API signature. |
429 Too Many Requests | API calls exceeded the limit of 25 in 5 second(s) |
500 Internal Server Error | The API called failed. There could be many reasons for it. Check the exception message to get more details. |