Contacts APIs
-
Search for a Contact on a List
Description: Searches the given contact list and returns an array of ContactsUsage:
GET api/ContactLists/Contacts/Search/{ListCode}/{RowIndex}/{PageSize}/{SortField}/{SortDir}/{SearchField}/{SearchCriteria}
Parameter Type Source Description ListCode Int32 FromUri Unique numerical code that identifies the contact list RowIndex Int32 FromUri the starting row index for the page to get records from. The first row starts with 0. PageSize Int32 FromUri the total number of records to return in a page SortField String FromUri The direction to sort the results Value Description EntityName The name of the contact entity EntityGuid Guid that uniquely identifies the contact Phone The phone number of the entity Email The email address of the entity Address The street address of the entity City The city of the entity StateProv The state or provence of the entity PostalCode The postal code of the contact entity SortDir String FromUri The direction to sort the results Value Description ASC Sort in ascending order DESC Sort in descending order SearchField String FromUri The direction to sort the results Value Description EntityName The name of the contact entity EntityGuid Guid that uniquely identifies the contact Phone The phone number of the entity Email The email address of the entity Address The street address of the entity City The city of the entity StateProv The state or provence of the entity PostalCode The postal code of the contact entity SearchCriteria String FromUri The value to search for in the given field Returns:
Array of Contact objects
Examples:
<!-- Intent: gets the list of contacts in the contact list with ListCode 123456 sorted by Phone where the EntityName is like Bob. This will return the first 5 rows. GET to the following url http://api.v4.swiftreach.com/api/ContactLists/Contacts/Search/123456/1/5/Phone/DESC/EntityName/Bob --> <!-- No XML input is required --> <!-- example return value --> <ArrayOfContact xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.ContactLists"> <Contact> <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> <ChangeStamp>2012-09-11T15:19:05.457</ChangeStamp> <ChangedByUser>sample</ChangedByUser> <CreateStamp>2012-09-11T15:04:02.833</CreateStamp> <CreatedByUser>sample</CreatedByUser> <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> </ArrayOfContact>