Contacts APIs
-
Create New Contact
Description: Creates a new Contact on the given contact listUsage:
POST api/ContactLists/Contacts/Create/{ListCode}
Parameter Type Source Description ListCode Int32 FromUri Unique numerical code that identifies the contact list ContactProfile Contact FromBody The Contact profile to create Returns:
Returns the Guid that uniquely identifies the new contact
Examples:
<!-- Intent: add a new contact to a contact list with listcode of 123456 POST to the following url http://api.v4.swiftreach.com/api/ContactLists/Contacts/Create/123456 --> <!-- POSTED data --> <Contact xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.ContactLists"> <Addresses> <AddressProfile> <Address1>14 Industrial Ave</Address1> <Address2></Address2> <AddressGuid>22748f25-07b8-459c-bcef-ce2ba851a84c</AddressGuid> <City>Mahwah</City> <County></County> <IsPrimary>false</IsPrimary> <Label>Office</Label> <Latitude>41.052698269486427</Latitude> <Longitude>-74.121656566858292</Longitude> <PostalCode>07430</PostalCode> <State>NJ</State> </AddressProfile> </Addresses> <Email>info@swiftreach.com</Email> <EntityGuid>736c8340-e23b-4c23-aaa1-f55cfdb391bb</EntityGuid> <EntityName>Bob</EntityName> <Fax> </Fax> <Pager></Pager> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <AnsDetectionOverride>UseDefault</AnsDetectionOverride> <Extension></Extension> <OptInSMS>true</OptInSMS> <Phone>2012361344</Phone> <PhoneLabel>Mobile</PhoneLabel> <PhoneType>phonetype_voice</PhoneType> </PhoneProfile> </Phones> <PinCode></PinCode> <SMSNetwork>0</SMSNetwork> <SMSPhone></SMSPhone> <SpokenLanguage>English</SpokenLanguage> <Tag></Tag> <UserDefined /> </Contact> <!-- example return value --> <string>22748f25-07b8-459c-bcef-ce2ba851a84c</string>