Вы можете использовать маршрут GET /reports/{campaign_id}/click-details
для получения информации о ссылках вашей кампании, возвращая что-то вроде этого:
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json; charset=utf-8
Content-Length: 1550
Vary: Accept-Encoding
X-Request-Id: 0d2a23c7-b54a-47ca-adc7-95dff2fd4dcc
Link: <https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Collection.json>; rel="describedBy"
Date: Thu, 17 Sep 2015 14:56:01 GMT
Connection: keep-alive
{
"urls_clicked": [
{
"id": "54debc3673",
"url": "http://inspiration.mailchimp.com?goal=0_57afe96172-42694e9e57-[LIST_EMAIL_ID]&mc_cid=42694e9e57&mc_eid=[UNIQID]",
"total_clicks": 0,
"click_percentage": 0,
"unique_clicks": 0,
"unique_click_percentage": 0,
"last_click": "",
"campaign_id": "42694e9e57",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/click-details",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Collection.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/click-details/54debc3673",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Instance.json"
},
{
"rel": "members",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/click-details/54debc3673/members",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Members/Collection.json"
},
{
"rel": "campaign",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/42694e9e57",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Instance.json"
}
]
}
],
"campaign_id": "42694e9e57",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Instance.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/click-details",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Collection.json"
}
],
"total_items": 1
}
Укажите нужные ссылки в них, затем используйте маршрут GET /reports/{campaign_id}/click-details/{link_id}/members
, чтобы получить контакты, которые щелкнули по ним / им, возвращая, например:
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json; charset=utf-8
Content-Length: 498
Vary: Accept-Encoding
X-Request-Id: e9979709-0ce6-4c82-877f-0e77a6f850be
Link: <https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Members/Collection.json>; rel="describedBy"
Date: Thu, 17 Sep 2015 15:15:45 GMT
Connection: keep-alive
{
"members": [
{
"email_id": "62eeb292278cc15f5817cb78f7790b08",
"email_address": "urist.mcvankab@freddiesjokes.com",
"clicks": 42,
"campaign_id": "42694e9e57",
"url_id": "54debc3673",
"list_id": "4ca5becb8d"
}
],
"campaign_id": "42694e9e57",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/click-details/54debc3673",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Instance.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/click-details/54debc3673/members",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/ClickDetails/Members/Collection.json"
}
],
"total_items": 0
}