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.

error when posting a new contact (400) "property found but not permitted at this location"

SOLVED
Go to solution
Highlighted
Solution Provider

error when posting a new contact (400) "property found but not permitted at this location"

Using the Mashery tool, I am able to add a contact with the sample "request body" with my info added.  

Sorry if this is a too basic of question.

Here is my "request body":
{"LISTS":["id","1712653224"],"EMAIL_ADDRESSES":["email_address","janedoe@doe.com"],"LAST_NAME":"Doe","FIRST_NAME":"Jane"}

Response body back:

[{
   
"error_key": "json.field.invalid",
   
"error_message": "#/EMAIL_ADDRESSES: Property was found but is not permitted at this location."
}, {
   
"error_key": "json.field.invalid",
   
"error_message": "#/FIRST_NAME: Property was found but is not permitted at this location."
}, {
   
"error_key": "json.field.invalid",
   
"error_message": "#/LAST_NAME: Property was found but is not permitted at this location."
}, {
   
"error_key": "json.field.invalid",
   
"error_message": "#/LISTS: Property was found but is not permitted at this location."
}, {
   
"error_key": "json.field.missing",
   
"error_message": "#/email_addresses: Property is required but not found."
}]

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: error when posting a new contact (400) "property found but not permitted at this location&q

Hello @DavidM55 ,

 

Thank you for reaching out to Constant Contact's API Support.

 

There was a mixture of syntax and a possible new issue on our side. It seems for some reason the capitalized data pairs were not being recognized. Our system should not care if you use lower or upper case so I will check in to see what is going on with that.

 

However; you did have a little bit of a syntax error as well. Here is what works.

 

{"lists":[{"id": "1712653224"}],"email_addresses":[{"email_address":"janedoe@doe.com"}],"last_name":"Doe","first_name":"Jane"}

You were missing {} in the lists and email_addresses section and you were using a , (comma) instead of : (colon) between your data pairs. I hope this helps out.


Regards,
Jimmy D.
Tier II API Support Engineer

View solution in original post

1 REPLY 1
Highlighted
Moderator

Re: error when posting a new contact (400) "property found but not permitted at this location&q

Hello @DavidM55 ,

 

Thank you for reaching out to Constant Contact's API Support.

 

There was a mixture of syntax and a possible new issue on our side. It seems for some reason the capitalized data pairs were not being recognized. Our system should not care if you use lower or upper case so I will check in to see what is going on with that.

 

However; you did have a little bit of a syntax error as well. Here is what works.

 

{"lists":[{"id": "1712653224"}],"email_addresses":[{"email_address":"janedoe@doe.com"}],"last_name":"Doe","first_name":"Jane"}

You were missing {} in the lists and email_addresses section and you were using a , (comma) instead of : (colon) between your data pairs. I hope this helps out.


Regards,
Jimmy D.
Tier II API Support Engineer

View solution in original post

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