Reputation: 11
There is a POS windows application where a store manager processes bills for customers. Our client want us to provide them an API service where this service will add a customer as a contact and also be assigned to a POS contacts contact group in Kentico 12.
Is there any possibility to achieve this using Kentico 12 Rest API out of the box feature?
Upvotes: 1
Views: 128
Reputation: 694
In Kentico contact membership in a contact group is stored in om.contactgroupmembercontact object type. So I believe the following should work:
POST request to URL: ~/rest/om.contactgroupmembercontact?format=json
And the following data:
{
"ContactGroupMemberContactGroupID":yourContactGroupID,
"ContactGroupMemberType":0,
"ContactGroupMemberRelatedID":yourContactID,
"ContactGroupMemberFromManual":true // Manually added contact
}
You need to know ContactGroupID and ContactID which can be retrieved with other queries.
Upvotes: 4