Am getting error. I tried it on development API Portal. below is the payload.
"error_message": "create_source is missing, create_source does not have a valid value" .
{
"contacts": [
{
"email_address": {
"address": "f***@***.com",
"permission_to_send": "implicit"
},
"first_name": "Test Jonah",
"last_name": "USA Account",
"company_name": "Test Clinic",
"create_source": "Account",
"birthday_month": 7,
"birthday_day": 2,
"custom_fields": [
{
"custom_field_id": "69fa344-743a-11ee-b1df-fa163ec87d62",
"value": "Doctor"
}
],
"street_addresses": [
{
"kind": "home",
"street": "199 SW",
"city": "Toronto",
"state": "ON",
"postal_code": "MNO201",
"country": "Canada"
}
],
"taggings": [
"Staff",
"Ignore"
]
}
]
}
Solved! Go to Solution.
Hello Aurum,
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
Upon reviewing your JSON request body for the POST (create) a Contact request, I found a couple of formatting issues which would result in the request being unsuccessful. I’ll note each one below.
The first is the “{“contacts” : [ ] }” portion around the request body. This portion can be removed from the JSON body as it is not part of the request body schema and will result in the error you encountered.
The second issue is that the values in the “taggings” portion of the request should be the tag IDs rather than the tag names. I had success with your request by making the changes in the example below:
{
"email_address": {
"address": "f***@***.com",
"permission_to_send": "implicit"
},
"first_name": "Test Jonah",
"last_name": "USA Account",
"company_name": "Test Clinic",
"create_source": "Account",
"birthday_month": 7,
"birthday_day": 2,
"custom_fields": [
{
"custom_field_id": "69fa344-743a-11ee-b1df-fa163ec87d62",
"value": "Doctor"
}
],
"street_addresses": [
{
"kind": "home",
"street": "199 SW",
"city": "Toronto",
"state": "ON",
"postal_code": "MNO201",
"country": "Canada"
}
],
"taggings": [
"{tag_id}"
]
}
Please have a look and let us know if you have any other questions!
Regards,
Hello Aurum,
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
Upon reviewing your JSON request body for the POST (create) a Contact request, I found a couple of formatting issues which would result in the request being unsuccessful. I’ll note each one below.
The first is the “{“contacts” : [ ] }” portion around the request body. This portion can be removed from the JSON body as it is not part of the request body schema and will result in the error you encountered.
The second issue is that the values in the “taggings” portion of the request should be the tag IDs rather than the tag names. I had success with your request by making the changes in the example below:
{
"email_address": {
"address": "f***@***.com",
"permission_to_send": "implicit"
},
"first_name": "Test Jonah",
"last_name": "USA Account",
"company_name": "Test Clinic",
"create_source": "Account",
"birthday_month": 7,
"birthday_day": 2,
"custom_fields": [
{
"custom_field_id": "69fa344-743a-11ee-b1df-fa163ec87d62",
"value": "Doctor"
}
],
"street_addresses": [
{
"kind": "home",
"street": "199 SW",
"city": "Toronto",
"state": "ON",
"postal_code": "MNO201",
"country": "Canada"
}
],
"taggings": [
"{tag_id}"
]
}
Please have a look and let us know if you have any other questions!
Regards,
Thank you very much. It worked.
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up