Discussions
How to make an update to EffectiveContactCommunicationPreferencesData
Hello,
I am trying to make an update to the endpoint api/EffectiveContactCommunicationPreferencesData, and I am able to make a GET request but not a PUT request which is what I am really after.
The response body from the get request looks like
`{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "EffectiveContactCommunicationPreferencesData",
"PrimaryParentEntityTypeName": "Party",
"Identity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "EffectiveContactCommunicationPreferencesData",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
"$values": [
"4eae6521-a4cb-4309-bc74-08ec6ce22cc4",
"81c62a8c-ccd1-49b3-84b4-00000342c7d3"
]
}
},
"PrimaryParentIdentity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "Party",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
"$values": [
"81c62a8c-ccd1-49b3-84b4-00000342c7d3"
]
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CommunicationReasonKey",
"Value": {
"$type": "System.Guid",
"$value": "4eae6521-a4cb-4309-bc74-08ec6ce22cc4"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CommunicationReasonName",
"Value": "Placement"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ContactCommunicationReasonPreferencesKey",
"Value": {
"$type": "System.Guid",
"$value": "00000000-0000-0000-0000-000000000000"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ContactKey",
"Value": {
"$type": "System.Guid",
"$value": "81c62a8c-ccd1-49b3-84b4-00000342c7d3"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "OptIn",
"Value": {
"$type": "System.Boolean",
"$value": true
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedByUserKey",
"Value": {
"$type": "System.Guid",
"$value": "00000000-0000-0000-0000-000000000000"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedOn",
"Value": "0001-01-01T00:00:00"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CreatedByUserKey",
"Value": {
"$type": "System.Guid",
"$value": "00000000-0000-0000-0000-000000000000"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CreatedOn",
"Value": "0001-01-01T00:00:00"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "FullName",
"Value": "Mchae Buckes-McCoy Funding LLC"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "234250"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedOnMonth",
"Value": "0001-01-01T00:00:00"
}
]
}
},
I do see that there are identity items, so I make my PUT request like:
${config.baseUrl}/api/EffectiveContactCommunicationPreferencesData/~81c62a8c-ccd1-49b3-84b4-00000342c7d3|4eae6521-a4cb-4309-bc74-08ec6ce22cc4
Which is essentially EffectiveContactCommunicationPreferencesData/~{ContactKey}|{CommunicationReasonKey}
For my body, I essentially just resent the contents of my get request,
{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "EffectiveContactCommunicationPreferencesData",
"PrimaryParentEntityTypeName": "Party",
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CommunicationReasonKey",
"Value": {
"$type": "System.Guid",
"$value": "4eae6521-a4cb-4309-bc74-08ec6ce22cc4"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CommunicationReasonName",
"Value": "Placement"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ContactCommunicationReasonPreferencesKey",
"Value": {
"$type": "System.Guid",
"$value": "00000000-0000-0000-0000-000000000000"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ContactKey",
"Value": {
"$type": "System.Guid",
"$value": "81c62a8c-ccd1-49b3-84b4-00000342c7d3"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "OptIn",
"Value": {
"$type": "System.Boolean",
"$value": true
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedByUserKey",
"Value": {
"$type": "System.Guid",
"$value": "00000000-0000-0000-0000-000000000000"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedOn",
"Value": "0001-01-01T00:00:00"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CreatedByUserKey",
"Value": {
"$type": "System.Guid",
"$value": "00000000-0000-0000-0000-000000000000"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CreatedOn",
"Value": "0001-01-01T00:00:00"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "234250"
},
]
}
I did do a few iterations, but I am getting 404 errors.
Is there a standard way to update this panel that I am not doing correctly or another endpoint that I have to hit?\
Best,
Andrew Tang