EmailReports APIs
-
Count Email Records Search Results
Description: Gets the total number of records for the given job using the search criteriaUsage:
GET api/Alerts/Reports/Email/Search/Count/{JobCode}/{SearchField}/{SearchCriteria}
Parameter Type Source Description JobCode Int32 FromUri the unique numerical code identifying the job to get records for SearchField String FromUri The field to search for criteria in Value Description TimeStamp The time the email was sent EntityName The name of the recipient entity EntityGuid Guid that uniquely identifies the recipient EmailAddress The email address of the recipient EmailResult The result of the message send SearchCriteria String FromUri The value to search for in the given field Returns:
Returns the total number of records for the given job
Examples:
<!-- Intent: retrieve the count of records for the email alerts sent for job 1546897 that contain an EntityName like "Nick". GET to the following url http://api.v4.swiftreach.com/api/Alerts/Reports/Email/Search/Count/1546897/EntityName/Nick --> <!-- No XML input is required --> <!-- example return value --> <int>1</int>
-
List Email Records
Description: Returns a paged set of records for the given jobUsage:
GET api/Alerts/Reports/Email/{JobCode}/{RowIndex}/{PageSize}
Parameter Type Source Description JobCode Int32 FromUri the unique numerical code identifying the job to get records for RowIndex Int32 FromUri the starting row index for the page to get records from. The first row starts with 0. PageSize Int32 FromUri the total number of records to return in a page Returns:
Array of EmailRecord objects
Examples:
<!-- Intent: retrieve the records for the email alerts sent for job 1546897. This will retrieve the 1st page of 5 records. GET to the following url http://api.v4.swiftreach.com/api/Alerts/Reports/Email/1546897/0/5 --> <!-- No XML input is required --> <!-- example return value --> <ArrayOfEmailRecord xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Reports.Email"> <EmailRecord> <Address1>14 industrial ave</Address1> <City>Mahwah</City> <County/> <CustomerCode>200201</CustomerCode> <EmailAddress>alerts@swiftreach.com</EmailAddress> <EmailResult>Sent</EmailResult> <EntityGuid>fff8b034-1e34-43eb-878e-3c237555005c</EntityGuid> <EntityName>Nick</EntityName> <JobCode>1546897</JobCode> <Language>English</Language> <Latitude>0</Latitude> <ListCode>667987</ListCode> <Longitude>0</Longitude> <PostalCode>07430</PostalCode> <ReadStamp>2013-03-05T10:43:25.263</ReadStamp> <State>NJ</State> <TimeStamp>3/5/2013 10:43:11 AM</TimeStamp> </EmailRecord> </ArrayOfEmailRecord>
-
List Email Records
Description: Returns a paged set of records for the given job sorted as specifiedUsage:
GET api/Alerts/Reports/Email/{JobCode}/{RowIndex}/{PageSize}/{SortField}/{SortDir}
Parameter Type Source Description JobCode Int32 FromUri the unique numerical code identifying the job to get records for RowIndex Int32 FromUri the starting row index for the page to get records from. The first row starts with 0. PageSize Int32 FromUri the total number of records to return in a page SortField String FromUri The field to sort the results by Value Description TimeStamp The time the email was sent EntityName The name of the recipient entity EntityGuid Guid that uniquely identifies the recipient EmailAddress The email address of the recipient EmailResult The result of the message send SortDir String FromUri The direction to sort the results Value Description ASC Sort in ascending order DESC Sort in descending order Returns:
Array of EmailRecord objects
Examples:
<!-- Intent: retrieve the records for the email alerts sent for job 1546897. This will retrieve the 1st page of 5 records sorted by TimeStamp in an Ascending direction. GET to the following url http://api.v4.swiftreach.com/api/Alerts/Reports/Email/1546897/0/5/TimeStamp/ASC --> <!-- No XML input is required --> <!-- example return value --> <ArrayOfEmailRecord xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Reports.Email"> <EmailRecord> <Address1>14 industrial ave</Address1> <City>Mahwah</City> <County/> <CustomerCode>200201</CustomerCode> <EmailAddress>alerts@swiftreach.com</EmailAddress> <EmailResult>Sent</EmailResult> <EntityGuid>fff8b034-1e34-43eb-878e-3c237555005c</EntityGuid> <EntityName>Nick</EntityName> <JobCode>1546897</JobCode> <Language>English</Language> <Latitude>0</Latitude> <ListCode>667987</ListCode> <Longitude>0</Longitude> <PostalCode>07430</PostalCode> <ReadStamp>2013-03-05T10:43:25.263</ReadStamp> <State>NJ</State> <TimeStamp>3/5/2013 10:43:11 AM</TimeStamp> </EmailRecord> </ArrayOfEmailRecord>
-
Search Email Records
Description: Returns a paged set of records for the given job sorted as specified and filtered by the search criteriaUsage:
GET api/Alerts/Reports/Email/Search/{JobCode}/{RowIndex}/{PageSize}/{SortField}/{SortDir}/{SearchField}/{SearchCriteria}
Parameter Type Source Description JobCode Int32 FromUri the unique numerical code identifying the job to get records for RowIndex Int32 FromUri the starting row index for the page to get records from. The first row starts with 0. PageSize Int32 FromUri the total number of records to return in a page SortField String FromUri The field to sort the results by Value Description TimeStamp The time the email was sent EntityName The name of the recipient entity EntityGuid Guid that uniquely identifies the recipient EmailAddress The email address of the recipient EmailResult The result of the message send SortDir String FromUri The direction to sort the results Value Description ASC Sort in ascending order DESC Sort in descending order SearchField String FromUri The field to search for criteria in Value Description EntityName The name of the recipient entity EntityGuid Guid that uniquely identifies the recipient EmailAddress The email address of the recipient EmailResult The result of the message send SearchCriteria String FromUri The value to search for in the given field Returns:
Array of EmailRecord objects
Examples:
<!-- Intent: search the records for the email alerts sent for job 1546897 to any EntityName that contains the text "Nick". This will retrieve the 1st page of 5 records sorted by TimeStamp in an Ascending direction. GET to the following url http://api.v4.swiftreach.com/api/Alerts/Reports/Email/Search/1546897/0/5/TimeStamp/ASC/EntityName/Nick --> <!-- No XML input is required --> <!-- example return value --> <ArrayOfEmailRecord xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Reports.Email"> <EmailRecord> <Address1>14 industrial ave</Address1> <City>Mahwah</City> <County/> <CustomerCode>200201</CustomerCode> <EmailAddress>alerts@swiftreach.com</EmailAddress> <EmailResult>Sent</EmailResult> <EntityGuid>fff8b034-1e34-43eb-878e-3c237555005c</EntityGuid> <EntityName>Nick</EntityName> <JobCode>1546897</JobCode> <Language>English</Language> <Latitude>0</Latitude> <ListCode>667987</ListCode> <Longitude>0</Longitude> <PostalCode>07430</PostalCode> <ReadStamp>2013-03-05T10:43:25.263</ReadStamp> <State>NJ</State> <TimeStamp>3/5/2013 10:43:11 AM</TimeStamp> </EmailRecord> </ArrayOfEmailRecord>
-
Count Email Records
Description: Gets the total number of records for the given jobUsage:
GET api/Alerts/Reports/Email/Count/{JobCode}
Parameter Type Source Description JobCode Int32 FromUri the unique numerical code identifying the job to get records for Returns:
Returns the total number of records for the given job
Examples:
<!-- Intent: retrieve the count of records for the email alerts sent for job 1546897. GET to the following url http://api.v4.swiftreach.com/api/Alerts/Reports/Email/Count/1546897 --> <!-- No XML input is required --> <!-- example return value --> <int>1</int>
-
Download Email Records
Description: Downloads a zipped comma-delimited CSV file of the raw recordsUsage:
GET api/Alerts/Reports/Email/Download/{JobCode}
Parameter Type Source Description JobCode Int32 FromUri the unique numerical code identifying the job to get records for Returns:
Zipped File Content
Examples:
<!-- Intent: Initiates a downbload of the raw records for the email alerts sent for job 1546897. The records are returned in a zip compressed CSV file. GET to the following url http://api.v4.swiftreach.com/api/Alerts/Reports/Email/Download/1546897 --> <!-- No XML input is required --> <!-- example return value --> <!-- return value is a binary file -->