You need to sign in to do that
Don't have an account?
Eugene Eruslanov 3
Can't create contact in Marketing Cloud via API call. What am I doing wrong?
Hi!
I'm taking the Thrailhead training "Develop for Marketing Cloud". I'm trying to create a contact as it's prescribed in the training and getting a strange schema validation error (see below).
Request:
POST https://<mydomain>rest.marketingcloudapis.com/contacts/v1/contacts
{
"contactKey": "example@salesforce.com",
"attributeSets": [{
"name": "Email Addresses",
"items": [{
"values": [{
"name": "Email Address",
"value": "example@salesforce.com"
},
{
"name": "HTML Enabled",
"value": true
}]
}]
}]
}
Response
{
"operationStatus": "FAIL",
"rowsAffected": 0,
"requestServiceMessageID": "795568de-bb94-400d-b000-82592435e8ce",
"responseDateTime": "2021-04-13T17:35:51.8625471-06:00",
"hasErrors": true,
"resultMessages": [
{
"formatStringParams": [
"ValueDefinition",
null,
null,
"HTML Enabled"
],
"messageFormatString": "Unable to resolve schema element of type: {0} by reference. [Id: {1}, Key: {2}, Name: {3}]",
"resultType": "Validation",
"resultClass": "Error",
"resultCode": "SchemaObjectNotFoundByReference",
"message": "Unable to resolve schema element of type: ValueDefinition by reference. [Id: , Key: , Name: HTML Enabled]"
}
],
"serviceMessageID": "d38ed5f4-7583-4fe5-80cd-60a7c09f2f1b"
}cable, include links.
I'm taking the Thrailhead training "Develop for Marketing Cloud". I'm trying to create a contact as it's prescribed in the training and getting a strange schema validation error (see below).
Request:
POST https://<mydomain>rest.marketingcloudapis.com/contacts/v1/contacts
{
"contactKey": "example@salesforce.com",
"attributeSets": [{
"name": "Email Addresses",
"items": [{
"values": [{
"name": "Email Address",
"value": "example@salesforce.com"
},
{
"name": "HTML Enabled",
"value": true
}]
}]
}]
}
Response
{
"operationStatus": "FAIL",
"rowsAffected": 0,
"requestServiceMessageID": "795568de-bb94-400d-b000-82592435e8ce",
"responseDateTime": "2021-04-13T17:35:51.8625471-06:00",
"hasErrors": true,
"resultMessages": [
{
"formatStringParams": [
"ValueDefinition",
null,
null,
"HTML Enabled"
],
"messageFormatString": "Unable to resolve schema element of type: {0} by reference. [Id: {1}, Key: {2}, Name: {3}]",
"resultType": "Validation",
"resultClass": "Error",
"resultCode": "SchemaObjectNotFoundByReference",
"message": "Unable to resolve schema element of type: ValueDefinition by reference. [Id: , Key: , Name: HTML Enabled]"
}
],
"serviceMessageID": "d38ed5f4-7583-4fe5-80cd-60a7c09f2f1b"
}cable, include links.
Thanks,