cancel
Showing results for 
Search instead for 
Did you mean: 

Put call failing when trying to update an individual contact

Occasional Contributor

Put call failing when trying to update an individual contact

Hi There

I've have an issue when I attempt to put via my rest client using the api. I'm able to Post and Get successfully but Put appears to be an issue.

 

Use the "Try It" option my JSON and URI work correctly. However, when I attempt to do this via my rest client I get a "400 Bad Request" error. Is it possible that Open API issue WS6671 is causing that?

 

Any pointers or suggestions would be greatly appreciated

 

Thanks

Rohan

3 REPLIES 3
Honored Contributor

Re: Put call failing when trying to update an individual contact

Hi Rohan,

 

It's difficult to say precisely what the cause is without seeing the API response on the 400 error response. Any time our API sends back a bad request, we also send along a JSON formatted error in the response that gives some additional details. Is it possible for you to retrieve and share this error message?

 

Do you have any details that you could share about the PUT request? If needed you can anonymize the data first, as simply being able to see the structure may give some insight.

 

Let me know if you have any questions!

 

Sincerely,

Elijah G.
API Support Engineer
Occasional Contributor

Re: Put call failing when trying to update an individual contact

Hi there ,

thanks for getting back to me.

My code (to change a Lits name for example is as follows)

 

https://api.constantcontact.com/v2/lists/1406959561?api_key=nnnnnnnnnnnnn&access_token=nnnnnnnnnnnnn...

The JSON I'm posting
{"name": "SV New great Tips & Tricks 2!","status": "ACTIVE"}

 

I'm net getting any JSON returned in the response with the error message

 

thanks

Rohan

 

Honored Contributor

Re: Put call failing when trying to update an individual contact

Hi Rohan,

 

I did some testing on this and it looks like the problem is definitely not the payload or the general formatting. I suspect that there may be something about the exact details that you're sending that could be responsible. Would you be able to send us an email to webservices@constantcontact.com with the exact details that you're using to make the reuqest?

 

Sincerely,

Elijah G.
API Support Engineer