GET https://webapi.mymarketing.co.il/api/campaignreports/{id}/unsubscribed?FromDate={FromDate}&ToDate={ToDate}&Page={Page}&Limit={Limit}
Get all the contacts that unsubscribed in a specific email. You can limit the search to specific time (by default, the search will be for campaigns that were updated in the last 3 months. Please note: if the campaign you are searching for wasn't sent in the given dates - you'll get an empty list)
Request Information
URI Parameters
Name
Description
Type
Additional information
id
Campaign id. Can be found using the endpoint "Get account's email campaigns..." or in the UI(go to Emails->Emails Lists->click on the campaign's preview -> you'll find the id int the URL)
integer
Required
from_date
The start date the campaign was last updated
date
to_date
The end date the campaign was last updated
date
page
Get a specific page (number of pages is limited)
integer
Range: inclusive between 1 and 2147483647
limit
Limit the number of items you get in the results. (Removing the "limit" will, by default, display only 20 records)
integer
Range: inclusive between 1 and 100
Body Parameters
None.
Response Information
Resource Description
Name
Description
Type
Additional information
campaign_id
The campaign id
integer
total_items
Total number of unsbscribe contacts
integer
Response Formats
application/json, text/json
Sample:
{ "campaign_id": 1, "total_items": 2, "unsubscribes": [ { "id": 1, "first_name": "sample string 2", "last_name": "sample string 3", "resone_id": 4, "customer_reason": "sample string 5", "email": "sample string 6", "state_id": 7, "unsubscribe_date": "2016-12-24T14:12:12" }, { "id": 1, "first_name": "sample string 2", "last_name": "sample string 3", "resone_id": 4, "customer_reason": "sample string 5", "email": "sample string 6", "state_id": 7, "unsubscribe_date": "2016-12-24T14:12:12" } ] }
application/xml, text/xml
Sample:
<ApiUnsubscribeReportList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models.CampaignReport"> <campaign_id>1</campaign_id> <total_items>2</total_items> <unsubscribes> <ApiUnsubscribeReport> <customer_reason>sample string 5</customer_reason> <email>sample string 6</email> <first_name>sample string 2</first_name> <id>1</id> <last_name>sample string 3</last_name> <resone_id>4</resone_id> <state_id>7</state_id> <unsubscribe_date>2016-12-24T14:12:12</unsubscribe_date> </ApiUnsubscribeReport> <ApiUnsubscribeReport> <customer_reason>sample string 5</customer_reason> <email>sample string 6</email> <first_name>sample string 2</first_name> <id>1</id> <last_name>sample string 3</last_name> <resone_id>4</resone_id> <state_id>7</state_id> <unsubscribe_date>2016-12-24T14:12:12</unsubscribe_date> </ApiUnsubscribeReport> </unsubscribes> </ApiUnsubscribeReportList>