BUI: Update contact
Summary
Rest api in Ajax not workingContent
Hi All,
I am using below code to update contact record in Ajax using Rest API
function updateContactRecord(sessionToken,ExContactID,email,fname,lname,custid){
return $.ajax({
url: globalContext.getInterfaceServiceUrl('rest')+'/connect/v1.3/contacts/'+ ExContactID,
method: "POST",
headers:{'Authorization':'Session '+sessionToken,'X-HTTP-Method-Override': 'PATCH'},
data: JSON.stringify({
name : {
first: fname,
last: lname
},
customFields:{
c:{
customerid: custid
}
}
}),
dataType: "json"
});
}
But it is not working, anybody help me