Simple client side syntax to display contact information

Highlighted
Solution Provider

Simple client side syntax to display contact information

Q1; I want to display contact information from a local web page using client side java script. Is this possible?


Q2: Also is there a sandbox contact that I can test without signing up that I can test with? I just need to test diplaying contact stats in a local web page.


Q3: Is there a query string URL syntax that can be used to get read only data?  example http://api.constantcontact?userid=me&email=me@me.com


 

Gary Cawley

3 REPLIES 3
Highlighted
Moderator

1. Yes you can displayin

1. Yes you can displayin JavaScript, XmlHttpRequest should allow you to pull in the XML from a request, format it and display it with Javascript.


2. We do not offer any sandbox, however you can use a 60 day free trial for testing purposes.  The only limitation to a trial account is the 60 day restriction and you can not have more than 100 active contacts.


3. Yes, there is a query string for finding contacts by email address: https://api.constantcontact.com/ws/customers/{username}/contacts?email=address@address.com.  That will return any contacts that match that email string.


 


Note that this will return somewhat unexpected results.  Searching for address@address.com will return address@address.com and address123@address.com since the local name and domain both match.  It is not a total string match search in it's current form.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Solution Provider

Query String

That is great, thanks.


Q: Are there any query strings for adding a contact to a list?

Gary Cawley

Highlighted
Moderator

Constant Contact employs a

Constant Contact employs a REST based API.  REST is a noun based API that depends on URIs and the HTTP request type to determine the intent of the action.  So the short answer is, no there is no query string.  However, to create a contact all you need to do is send a POST (create) request to the contacts collection:


 


https://api.constantcontact.com/ws/customers/joesflowers/contacts


 


To update contact, you would need to send a PUT (update) request to the actual URI you want to update, for example the first contact in your account would be updated using this URI:


 


https://api.constantcontact/ws/customers/joesflowers/contacts/1

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured