We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

how to get modified members since lastupdated time using query parameter?

SOLVED
Go to solution
sagarn5
Regular Participant

how to get modified members since lastupdated time using query parameter?

 I want updated users from contactlist  using query parameter modified_since. I can't see any documentation about how to pass query parameter using C# wrapper for V2 api.

 

Any Code snippest for this will be very helpfull.

 

Thanks in advance

1 ACCEPTED SOLUTION
Shannon_W
Employee

Hi,

 

The GetContacts method in the .net sdk allows you to pass in the modified since date you'd like to use, like this:

 

_constantContact = new ConstantContact(_apiKey, _accessToken);
DateTime modifiedSince = new DateTime(2013, 19, 06, 0, 0, 0, 000);
_constantContact.GetContacts(modifiedSince);

 

Update: I see now that you were talking about contact Lists.  See below:

 

 _constantContact = new ConstantContact(_apiKey, _accessToken);
DateTime date = new DateTime(2013, 19, 06, 0, 0, 0, 000);
_constantContact.GetContactsFromList("1", date); //listId, modifiedsince

 

 

Best Regards,

Shannon W.

API Support Specialist

View solution in original post

6 REPLIES 6
Shannon_W
Employee

Hi,

 

The GetContacts method in the .net sdk allows you to pass in the modified since date you'd like to use, like this:

 

_constantContact = new ConstantContact(_apiKey, _accessToken);
DateTime modifiedSince = new DateTime(2013, 19, 06, 0, 0, 0, 000);
_constantContact.GetContacts(modifiedSince);

 

Update: I see now that you were talking about contact Lists.  See below:

 

 _constantContact = new ConstantContact(_apiKey, _accessToken);
DateTime date = new DateTime(2013, 19, 06, 0, 0, 0, 000);
_constantContact.GetContactsFromList("1", date); //listId, modifiedsince

 

 

Best Regards,

Shannon W.

API Support Specialist

View solution in original post

sagarn5
Regular Participant

Thanks Shannon_W for your reply

 

But I cant see any such method for GetContact as well as GetContactsFromList  I can only see below methods

 

public ResultSet<Contact> GetContactsFromList(ContactList list);
public ResultSet<Contact> GetContactsFromList(Pagination pag);
public ResultSet<Contact> GetContactsFromList(string listId);
public ResultSet<Contact> GetContactsFromList(ContactList list, int? limit);
public ResultSet<Contact> GetContactsFromList(string listId, int? limit);
public ResultSet<BounceActivity> GetContactTrackingBounces(Pagination pag);
 
 public Contact GetContact(string contactId);
 public ResultSet<Contact> GetContacts();
 public ResultSet<Contact> GetContacts(Pagination pag);
 public ResultSet<Contact> GetContacts(string email, int? limit);

 

 

 

 

Looks like you have an older version of the wrapper.  If you look at the main branch, latest version on Github, you'll see we added new overloads of all the get methods to support modifiedSince and/or createdSince parameters.  You can see the lastest version here of the ConstantContact class to confirm they are there: https://github.com/constantcontact/.net-sdk/blob/master/CTCTWrapper/ConstantContact.cs

Dave Berard
Senior Product Manager, Constant Contact
sagarn5
Regular Participant

Thanks, Dave

 

I have updated wrapper code from repository.

 

I can see you have mentioned in some of the aswers that  v1 API is no longer being updated with new functionality at this point and is only in a maintenance status.

 

I can  see V1 is more stable as it is there for long time for V2 I can see some frequent commits. 

 

And which are new functionality that are there in V2 which are not there in V1? 

 

At this particular moment which api Version you suggest for applications which are going in production?  

The v2 API is definitely in a stable place, the majority of the commits were initial polishing of the wrapper (for example, in .NET we only supported a Forms based OAuth 2.0 flow and not an ASP.NET flow at launch, we've since added that) and lots of additional feature enhancements as we continue to develop the v2 API.  We're doing regular releases to the v2 API to add functionality and new endpoints and always updating the wrapper with those features.

 

At this point, the only major difference in API endpoints in the v1 and v2 API is that the v1 has access to MyLibrary and EventSpot and the v2 does not, though we are in the process of adding those endpoints over the next couple of months.  The v2 API has much better pagination, you can generally get much more data per request (up to 500 results on most endpoints) and can control the number of results per page (anywhere from 1-Max) if you want smaller payloads.  Add in JSON support which makes for smaller data payloads and in most languages faster parsing times and it's overall a better API. 

 

I hope you don't mistake all of the check ins on the v2 wrappers as a sign of flux, it's actually a sign of growth as we continue to make enhancements, add new features and respond to developer feedback for new functionality.

Dave Berard
Senior Product Manager, Constant Contact
sagarn5
Regular Participant

Thanks for the detail information Dave.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page