cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
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 REPLY 1
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