InsightlyAPI api = new InsightlyAPI([your api key]);

Create a new contact

Contact newContact = new Contact();
newContact.SALUTATION = "Ms";
newContact.FIRST_NAME = "Mary";
newContact.LAST_NAME = "Jones";

Contact addedContact = api.AddNewContact(newContact);

Create a new contact with an email address

ContactInfo newInfo = new ContactInfo();
newInfo.TYPE = ContactInfo.InfoType.Email.GetDescription();
newInfo.LABEL = ContactInfo.InfoLabelEmail.Work.GetDescription();
newInfo.DETAIL = "mike.harper[at]dentist.com";

Contact newContact = new Contact();
newContact.SALUTATION = "Dr";
newContact.FIRST_NAME = "Mike";
newContact.LAST_NAME = "Harper";
newContact.CONTACTINFOS = new List<ContactInfo> {newInfo};

Contact addedContact = api.AddNewContact(newContact);

Create a new contact with a postal address

Address newAddress = new Address();
newAddress.ADDRESS_TYPE = Address.AddressType.Postal.GetDescription();
newAddress.STREET = "The Warren";
newAddress.CITY = "The Field";
newAddress.STATE = "The Farm";
newAddress.POSTCODE = "1Z1";
newAddress.COUNTRY = "United States";

Contact newContact = new Contact();
newContact.FIRST_NAME = "Peter";
newContact.LAST_NAME = "Rabbit";
newContact.ADDRESSES = new List<Address> { newAddress };

Contact addedContact = api.AddNewContact(newContact);

Simple Usage is a public wiki page

This wiki page is a public wiki page. It can be read by anyone including users that have not logged in and web crawlers such as Google.

Entry has no comments

You do not have sufficient permissions to comment

7 years ago
HadleyHope picture
HadleyHope updated Wiki Simple Usage

Text: @InsightlyAPI api = new InsightlyAPI([your api key]);@ h4. Create a new contact @Contact newContact = new Contact();@ @newContact.SALUTATION = "Ms";@ @newContact.FIRST_NAME = "Mary";@ @newContact.LAST_NAME = "Jones";@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with an email address @ContactInfo newInfo = new ContactInfo();@ @newInfo.TYPE = ContactInfo.InfoType.Email.GetDescription();@ @newInfo.LABEL = ContactInfo.InfoLabelEmail.Work.GetDescription();@ @newInfo.DETAIL = "mike.harper[at]dentist.com";@ @Contact newContact = new Contact();@ @newContact.SALUTATION = "Dr";@ @newContact.FIRST_NAME = "Mike";@ @newContact.LAST_NAME = "Harper";@ @newContact.CONTACTINFOS = new List<ContactInfo> {newInfo};@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with a postal address @Address newAddress = new Address();@ @newAddress.ADDRESS_TYPE = Address.AddressType.Postal.GetDescription();@ @newAddress.STREET = "The Warren";@ @newAddress.CITY = "The Field";@ @newAddress.STATE = "The Farm";@ @newAddress.POSTCODE = "1Z1";@ @newAddress.COUNTRY = "United States";@ @Contact newContact = new Contact();@ @newContact.FIRST_NAME = "Peter";@ @newContact.LAST_NAME = "Rabbit";@ @newContact.ADDRESSES = new List<Address> { newAddress };@@InsightlyAPI api = new InsightlyAPI([your api key]);@ h4. Create a new contact @Contact newContact = new Contact();@ @newContact.SALUTATION = "Ms";@ @newContact.FIRST_NAME = "Mary";@ @newContact.LAST_NAME = "Jones";@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with an email address @ContactInfo newInfo = new ContactInfo();@ @newInfo.TYPE = ContactInfo.InfoType.Email.GetDescription();@ @newInfo.LABEL = ContactInfo.InfoLabelEmail.Work.GetDescription();@ @newInfo.DETAIL = "mike.harper[at]dentist.com";@ @Contact newContact = new Contact();@ @newContact.SALUTATION = "Dr";@ @newContact.FIRST_NAME = "Mike";@ @newContact.LAST_NAME = "Harper";@ @newContact.CONTACTINFOS = new List<ContactInfo> {newInfo};@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with a postal address @Address newAddress = new Address();@ @newAddress.ADDRESS_TYPE = Address.AddressType.Postal.GetDescription();@ @newAddress.STREET = "The Warren";@ @newAddress.CITY = "The Field";@ @newAddress.STATE = "The Farm";@ @newAddress.POSTCODE = "1Z1";@ @newAddress.COUNTRY = "United States";@ @Contact newContact = new Contact();@ @newContact.FIRST_NAME = "Peter";@ @newContact.LAST_NAME = "Rabbit";@ @newContact.ADDRESSES = new List<Address> { newAddress };@ @Contact addedContact = api.AddNewContact(newContact);@

HadleyHope picture
HadleyHope updated Wiki Simple Usage

Text: h4. Create a new contact @Contact newContact = new Contact();@ @newContact.SALUTATION = "Ms";@ @newContact.FIRST_NAME = "Mary";@ @newContact.LAST_NAME = "Jones";@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with an email address @ContactInfo newInfo = new ContactInfo();@ @newInfo.TYPE = ContactInfo.InfoType.Email.GetDescription();@ @newInfo.LABEL = ContactInfo.InfoLabelEmail.Work.GetDescription();@ @newInfo.DETAIL = "mike.harper[at]dentist.com";@ @Contact newContact = new Contact();@ @newContact.SALUTATION = "Dr";@ @newContact.FIRST_NAME = "Mike";@ @newContact.LAST_NAME = "Harper";@ @newContact.CONTACTINFOS = new List<ContactInfo> {newInfo};@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with a postal address @Address newAddress = new Address();@ @newAddress.ADDRESS_TYPE = Address.AddressType.Postal.GetDescription();@ @newAddress.STREET = "The Warren";@ @newAddress.CITY = "The Field";@ @newAddress.STATE = "The Farm";@ @newAddress.POSTCODE = "1Z1";@ @newAddress.COUNTRY = "United States";@ @Contact newContact = new Contact();@ @newContact.FIRST_NAME = "Peter";@ @newContact.LAST_NAME = "Rabbit";@ @newContact.ADDRESSES = new List<Address> { newAddress };@@InsightlyAPI api = new InsightlyAPI([your api key]);@ h4. Create a new contact @Contact newContact = new Contact();@ @newContact.SALUTATION = "Ms";@ @newContact.FIRST_NAME = "Mary";@ @newContact.LAST_NAME = "Jones";@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with an email address @ContactInfo newInfo = new ContactInfo();@ @newInfo.TYPE = ContactInfo.InfoType.Email.GetDescription();@ @newInfo.LABEL = ContactInfo.InfoLabelEmail.Work.GetDescription();@ @newInfo.DETAIL = "mike.harper[at]dentist.com";@ @Contact newContact = new Contact();@ @newContact.SALUTATION = "Dr";@ @newContact.FIRST_NAME = "Mike";@ @newContact.LAST_NAME = "Harper";@ @newContact.CONTACTINFOS = new List<ContactInfo> {newInfo};@ @Contact addedContact = api.AddNewContact(newContact);@ h4. Create a new contact with a postal address @Address newAddress = new Address();@ @newAddress.ADDRESS_TYPE = Address.AddressType.Postal.GetDescription();@ @newAddress.STREET = "The Warren";@ @newAddress.CITY = "The Field";@ @newAddress.STATE = "The Farm";@ @newAddress.POSTCODE = "1Z1";@ @newAddress.COUNTRY = "United States";@ @Contact newContact = new Contact();@ @newContact.FIRST_NAME = "Peter";@ @newContact.LAST_NAME = "Rabbit";@ @newContact.ADDRESSES = new List<Address> { newAddress };@

HadleyHope picture
HadleyHope created Wiki Simple Usage

View View full history