Discussions
Update the Primary Email under Contact Address
1 day ago by Nikita Motkur
How can we update the primaryEmail under the Contact Address?
When calling the PUT request to update the Contact, the response is successful, however the underlying ContactAddresses.Address is not getting updated.
Below has 2 tabs showing the update request and the data retrieved from Contact after the update.
Please help!
https://az-am-ent-f14.corrigo.com/api/v1/base/Contact
Request
------
{
"Entity": {
"ContactAddresses": [
{
"ActorId": 16,
"Address": "[email protected]",
"Id": 4172
}
],
"Id": 16,
"FirstName": "Negley",
"LastName": "Herrera",
"CustomerId": 489,
"Comment": "WFM Store Leadership",
"ConcurrencyId": null,
"CountryId": "US"
},
"Properties": [
"Id",
"FirstName",
"LastName",
"CustomerId",
"Comment",
"ConcurrencyId"
]
}
Response
------------
{
"EntitySpecifier": {
"ConcurrencyId": 49,
"EntityType": "Contact",
"Id": 16
}
}
https://az-am-ent-f14.corrigo.com/api/v1/query/Contact
Request
--------
{
"QueryExpression":
{
"Criteria": {
"Conditions": [
{
"PropertyName": "Username",
"Operator": "Like",
"Values": ["1084276%"]
},
{
"PropertyName": "IsRemoved",
"Operator": "Equal",
"Values": ["false"]
}
],
"FilterOperator": "And"
},
"Distinct": true,
"PropertySet": { "Properties" : ["Id","CustomerId","Username","ContactAddresses.*"]},
"FirstResultIndex": 0,
"MaxResultCount": 1
}
}
Response
{
"Entities": [
{
"Data": {
"CustomerId": 489,
"ContactAddresses": [
{
"ActorTypeId": "LeaseUser",
"ActorId": 16,
"AddrTypeId": "PrimEmail",
"Address": "[email protected]",
"IsAlert": false,
"IsReport": false,
"ConcurrencyId": 4,
"Id": 4172
},
{
"ActorTypeId": "LeaseUser",
"ActorId": 16,
"AddrTypeId": "MobilePhone",
"Address": "(000) 000-4173",
"IsAlert": false,
"IsReport": false,
"ConcurrencyId": 2,
"Id": 4173
},
{
"ActorTypeId": "LeaseUser",
"ActorId": 16,
"AddrTypeId": "WAP",
"Address": "poll://a8327132-43bf-49ab-91f6-3fc596c77d8d",
"IsAlert": true,
"IsReport": false,
"ConcurrencyId": 232,
"Id": 10309
}
],
"Username": "[email protected]",
"ConcurrencyId": 49,
"Id": 16
}
}
]
}