The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

What is wrong with this URL?

Highlighted
Occasional Participant

What is wrong with this URL?

I'm authenticating fine, but get a 404 error when I try this url in RESTClient. It appears to be what I need to do from the docs, but

 

https://api.constantcontact.com/ws/customers/username?activityType=CLEAR_CONTACTS_FROM_LISTS&lists=h...

 

I think I'm sending in the right URI based on this documentation page:

 

http://community.constantcontact.com/t5/Documentation/Creating-a-Clear-Contacts-Activity/ba-p/25039

 

Any ideas?

 

Thank you,

Ron

7 REPLIES 7
Highlighted
Occasional Participant

Re: What is wrong with this URL?

Not sure how to show in this post how the list URL is encoded. It looks like it was re-coded so-to-speak by the board, but it's encoded the way the documentation says to encode it.

Highlighted
Occasional Participant

Re: What is wrong with this URL?

Figured it out. I was missing the /activities at the end of the base URL... You get googly eyed trying to figure out your url's after a while...

 

-Ron

Highlighted
Occasional Participant

Re: What is wrong with this URL?

Still doesn't work. I'm not getting the response the docs say. Instead it looks like this:

 

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://api.constantcontact.com/ws/customers/username/activities</id>
  <title type="text">Activities for customer: username</title>
  <link href="activities"></link>
  <link href="activities" rel="self"></link>
  <author>
    <name>username</name>
  </author>
  <updated>2011-10-17T20:26:04.589Z</updated>
  <link href="/ws/customers/username/activities" rel="first"></link>
</feed>

 

 

Any ideas?

Highlighted
Employee

Re: What is wrong with this URL?

Hey Kurt,

 

You could be trying to supply a LIST id that does not exist.

 

I just did a post to:

https://api.constantcontact.com/ws/customers/{username}/activities?activityType=CLEAR_CONTACTS_FROM_...

From doing this POST i supplied my content-type to 

application/x-www-form-urlencoded

 which resulted in a HTTP/1.1 201 Created

 

If you are getting a 404 you must be referencing a URL that does not exist.  PM the exact URI that you are using to get the 404.

 

Ryan Davis
Quality Engineer
Highlighted
Occasional Participant

Re: What is wrong with this URL?

Hello Ryan,

 

Thank you for the response. By the third message I was getting a response, but the XML isn't what I was expecting. The documentation says I should see this:

 

<entry xmlns="http://www.w3.org/2005/Atom">  <link href="/ws/customers/joesflowers/activities/a07e1ffaxjyffmvqgiz" rel="edit" />  <id>http://api.constantcontact.com/ws/customers/joesflowers/activities/a07e1ffaxjyffmvqgiz</id>  <title type="text"></title>  <updated>2008-04-29T19:35:54.923Z</updated></entry>

 But right now I receive the XML copied into my third post, and the list isn't cleared. I do supply the content type of "application/x-www-form-urlencoded" in the Delphi application that makes the call, but I don't see a way to do that in RESTClient which I've been using to test the links. In any case, both the Delphi app and the RESTClient return the same XML.

Highlighted
Employee

Re: What is wrong with this URL?

Hey Kurt,

 

If you can use our RESTclient and send an RCQ file to our webservices@constantcontact.com email address I would like to dig into this for you. 

 

 

Ryan Davis
Quality Engineer
Highlighted
Occasional Participant

Re: What is wrong with this URL?

Done. It came from me (Ron Grove), though. Kurt Beeken is the one who opened the account, but I'm the developer working on the project.

 

TIA,

Ron

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured