Discussions
API Patch
3 days ago by Alex Matei
I have noticed that now Patch works in API and I was able to change basic values using a patch call rather than a get/put, however I could not find a way to change a more complex value, for example changing the type of a contact.
Status change works: patch
/api/person
{
"$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts",
"Status": {
"$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts",
"PartyStatusId": "A"
}
}
However type/BillingCategory does not:
/api/person
{
"$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts",
"AdditionalAttributes": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CustomerTypeCode",
"Value": "NM"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "BillingCategory",
"Value": "SR"
}
]
}
}
Is there a way this can be achieve with patch rather than get/put?