366 Degrees

366 Web API

Save Contact

Contact Create/Update

Description: This will allow you to create or update a contact record in your 366 Degrees instance. You can also utilize 366 Degrees notification and subscription management by connecting the 'Page_Type' field to corresponding page in 366 Degrees. If this is done and you use this API to submit/update contact records then landing page and subscription notifications will be sent out of 366 Degrees accordingly.
Method: SaveContact
URL: https://api.366.io/366LeadAPI/api/Contact/SaveContact
 

Try it out

Sample Code

C# Code

public void InsertContact(Contact cont)
{
var request = new RestRequest("/api/Contact/SaveContact", Method.POST) { RequestFormat = DataFormat.Json };
request.AddHeader("Contact_Email", cont.Email);
request.AddHeader("App_Key", cont.App_Key);
request.AddHeader("App_Secret", cont.App_Secret);
request.AddHeader("Lead_Source", cont.LeadSource);
request.AddHeader("Mobile", cont.Mobile);
request.AddHeader("Password", cont.Password);
request.AddHeader("Address", cont.Address);
request.AddHeader("City", cont.City);
request.AddHeader("State", cont.State);
request.AddHeader("Country", cont.Country);
request.AddHeader("Zip", cont.ZipCode);
request.AddHeader("CustomerType", cont.ContactType);
request.AddHeader("MiddleName", cont.MiddleName);
request.AddHeader("DOB", cont.DOB);
request.AddHeader("Fax", cont.Fax);
request.AddHeader("Status", cont.EnrollStatus);
request.AddHeader("UserName", cont.UserName);
request.AddHeader("EnrollDate", cont.EnrollDate);
request.AddHeader("Signup_Type", cont.SignupType);
request.AddHeader("First_Name", cont.FirstName);
request.AddHeader("Last_Name", cont.LastName);
request.AddParameter("Page_Type", cont.PageType);
request.AddParameter("CompanyName", cont.CompanyName);
request.AddParameter("PageId", cont.PageId);
request.AddParameter("CampaignScheduleId", cont.CampaignScheduleId);
request.AddParameter("website",cont.website);
var response = client.Execute(request);
}

JQuery Code

function saveContact() {
jQuery.support.cors = true;
var emailid = $('#txtContactEmail').val();
var appkey = $('#txtAppKey').val();
var appsecret = $('#txtAppSecret').val();
if (emailid == '' & appkey == '' & appsecret == '') {
alert("Please provide the values for 'Contact Email','App_Key' and 'App_Secret'");
return false;
}
else {
var obj = {};
obj.age = $.trim($("[id*=CompanyName]").val());
$.ajax({
url: 'http://api.366.io/366ContactLeadAPI/api/Contact/SaveContact',
type: 'GET',
contentType: "application/json; charset=utf-8",
data: JSON.stringify(obj),
headers:
{
'App_Key': appkey,
'App_Secret': appsecret,
'Contact_Email': emailid,
'Lead_Source': $('#txtLeadSource').val(),
'RoleId': $('#txtRoleId').val(),
'Mobile': $('#txtMobile').val(),
'Password': $('#txtPassword').val(),
'Address': $('#txtAddress').val(),
'City': $('#txtCity').val(),
'State': $('#txtState').val(),
'Country': $('#txtCountry').val(),
'Zip': $('#txtZip').val(),
'CustomerType': $('#txtCustomerType').val(),
'MiddleName': $('#txtMiddleName').val(),
'DOB': $('#txtDOB').val(),
'Fax': $('#txtFax').val(),
'Status': $('#txtStatus').val(),
'UserName': $('#txtUserName').val(),
'EnrollDate': $('#txtEnrollDate').val(),
'Signup_Type': $('#txtSignupType').val(),
'First_Name': $('#txtFirstName').val(),
'Last_Name': $('#txtLastName').val(),
'PageId': $('#txtPageId').val(),
'CampaignScheduleId': $('#txtCampaignScheduleId').val()
'website':$('#txtwebsite').val()
},
success: function (data) {
alert(data);
},
error: function () {
alert('error');
}
});
}
}

Json Output

{
"Contact Created Successfully"
}