cancel
Showing results for 
Search instead for 
Did you mean: 
We had to temporarily close one of our support sites. You may experience a longer than normal wait time when calling into our support center. Remember to check out all of our available support resources including live chat for the quickest response.

Contact list not showing when retrieving campaign details using ws API.

Occasional Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi,

 

Thanks for ur valuable help. I need alittle help from you. In previous version I can get optouts in retriving xml. But now I couldn't get that field. Can you please help me on this.

Honored Contributor

Re: Contact list not showing when retrieving campaign details using ws API.

Hello,

 

In order to get the unsubscribes for a campaign, you will want this API endpoint: http://developer.constantcontact.com/docs/campaign-tracking/opt-out-activities-collection.html

 

The request URL is in this format: https://api.constantcontact.com/v2/emailmarketing/campaigns/{campaignId}/tracking/unsubscribes

 

Please let me know if you have any questions about this!

 

Sincerely,

Elijah G.
API Support Engineer
Occasional Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi,

 

Thanks for all your help. Your valuable information help me alot. 

 

Can you please tell me How could I insert contat list and contact list using code. 

 

 

Occasional Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi,

 

Thanks for all your help. Your valuable information help me alot. 

 

Can you please tell me How could I insert contat list in contact lists and how to create a contact lists using code. 

 

 

Highlighted
Honored Contributor

Re: Contact list not showing when retrieving campaign details using ws API.

Hello,

 

You can find information about creating lists with the API here: http://developer.constantcontact.com/docs/contact-list-api/contactlist-collection.html?method=POST

 

 

In addition, you can use our .NET SDK to create lists with code similar to this:

// Set up the List Service
IUserServiceContext userServiceContext = new UserServiceContext(_accessToken, _apiKey);
ConstantContactFactory serviceFactory = new ConstantContactFactory(userServiceContext);
ContactService ListServiceObject = serviceFactory.CreateListService();

// Create a List Object
ContactList myList = new ContactList();
myList.Name = "List Name";
myList.Status = "HIDDEN";

// Use the API to add the list to your Constant Contact account
ContactList createdList = ListServiceObject.AddList(myList);

For your other question, I need a bit of clarification about "insert contact list in contact lists". Do you want to merge two different lists?

 

Sincerely,

Elijah G.
API Support Engineer
Occasional Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi Elijah,

 

Thanks for your help. It woks fine .Now I can create the list to contant contact. Is there any hope to add contact to Contact list using this code. 

 

Honored Contributor

Re: Contact list not showing when retrieving campaign details using ws API.

Hello,

 

You absolutely can add contacts to a list using our .NET SDK. Contacts must be added to a list when you first create them, and they can also be added to a list after they're created by updating the existing contact. You can find a sample of how to create and update contacts in the sample code provided with our SDK (Link). You can also find the API documentation for these steps here:

- Create Contact: http://developer.constantcontact.com/docs/contacts-api/contacts-collection.html?method=POST

- Update Contact: http://developer.constantcontact.com/docs/contacts-api/contacts-resource.html?method=PUT

 

If you have any questions about the process, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer
New Member

Re: Contact list not showing when retrieving campaign details using ws API.

Hi Elijah,

 

Its working for me.But there is a small issue in this... How can I give ContactList in this code.I have attached the code. Please help me on this.

 


2016-07-22_145252.jpg
Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi Elijah,

 

I have done all my work relating constant contact with your valuable information.There is one requirment is pendining in my work. I am working in SAP B1 development.

 

As per your update I have added constant contact authenticatin in my project. Is there any hope to pass the costant contact username to a string after authetication. If its possible thats good for us.

 

I have attached the screen shot of my form and authentication form with this mail.

 


2016-07-22_204902.jpg
Honored Contributor

Re: Contact list not showing when retrieving campaign details using ws API.


@First-NameL2869 wrote:

Hi Elijah,

 

Its working for me.But there is a small issue in this... How can I give ContactList in this code.I have attached the code. Please help me on this.

 


In order to set the contact list in that code, you will need to use a list that has already been created. The code will look like this: 

 

contact.Lists.Add( new ContactList() { Id = "YOUR_LIST_ID" });

 

You can get the list ID by having it stored in an application config (if it is a fixed value) or by using the ListService.GetLists() method to get all of your lists and select the one you want.

 

 

 


@ThirdW0 wrote:

Hi Elijah,

 

I have done all my work relating constant contact with your valuable information.There is one requirment is pendining in my work. I am working in SAP B1 development.

 

As per your update I have added constant contact authenticatin in my project. Is there any hope to pass the costant contact username to a string after authetication. If its possible thats good for us.

 

I have attached the screen shot of my form and authentication form with this mail.

 


 

Unfortunately it is not possible to auto-fill the username at this time.

 

 

 

If I can provide any additional information, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer