Forum Discussion

JFAR49ER's avatar
JFAR49ER
Frequent Visitor
3 years ago

How to connect to Mailchimp API to return reports soft bounces

Hi

I've used Mailchimp API to connect to both Lists and campaigns, and have been able to get summary info for all email campaigns through this. 
The API doesn't return all information, in particular I'd like to return the number of soft bounces for each campaign. 
I've tried to use the API to return reports information but struggling with this. Can anyone advice? Id be happy to just get a single report return for a specific campaign ID as a starter. 

The power query ive used to get lists information:

 

let
dc = "ServerInput",
api_url = "https://" & dc & ".api.mailchimp.com/3.0/",
ClientID = "String",
apikey = "ApiKeyString",

EncodedCredentials = "Basic " & Binary.ToText(Text.ToBinary(ClientID & ":" & apikey), BinaryEncoding.Base64),
path = "lists?offset=0&count=1000/",

data= Json.Document(Web.Contents(api_url,
[ RelativePath = path,
Headers=[#"Authorization"=EncodedCredentials]])),
lists = data[lists]

in 
lists