I am using the API v2 c#. I am getting an error when using this function:
lst = _constantContact.GetCampaignTrackingClicks(campaignID, 500, createdSince);
Other campaign tracking functions that are similar seem to work properly except for this one. It seems to be rejecting the campaign id.
There was an error deserializing the object of type CTCT.Components.ResultSet`1[[CTCT.Components.Tracking.ClickActivity, CTCT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]. The value '1114610711938' cannot be parsed as the type 'Int32'.
Hello,
Thanks for posting. The campaignID is stored as a string, so trying to cast such a large number into that type is probably causing the problem. Best keep the campaignID as a string. I hope this answers your question.
Andrew B.
Constant Contact
API Support
Actually, I didn't cast anything. It seems that the dll is doing that. I sent c.ID where c is a CTCT.Components.EmailCampaigns.EmailCampaign. It works in these functions:
GetCampaignTrackingSends
GetCampaignTrackingForwards
GetCampaignTrackingOpens
GetCampaignTrackingBounces
GetCampaignTrackingOptOuts
They all work fine. Sending the same c.ID errors only on:
GetCampaignTrackingClicks
I saw your email that you sent in yesterday and our API support team is working on a bug fix for this in the wrapper library. You're completely correct, not anything you're doing and it is a bug in the wrapper (we have a type missmatch in one of our classes). Will get this fixed soon and check the fix into Github.
You guys are awesome. Thanks!