FindByEmail()

Abstract

The FindByEmail() API function is an XmlHttp function to search various record types within the database for matching records based on all or part of the contact’s or resources email address.  The record types searched can be defined in the request schema and includes Contacts and Resource records. This function must be called after the LogonUser() function.

API Address

https://api.tracker-rms.com/WebAPI/XmlHttpFindByEmail.aspx

Request Format

The input format XML for this function is as follows:

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <FindByEmail>
            <UserCredentials>
                <SecurityToken></SecurityToken>
                <Username></Username>
                <Password></Password>
            </UserCredentials>
            <Email></Email>
            <RecordTypes></RecordTypes>
            <MaximumRecordsToReturn></MaximumRecordsToReturn>
        </FindByEmail>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<SecurityToken> This will be the 40 character security token obtained from the LogonUser() function
<Username> The username is typically the email address for the user in the format name@domain.com
<Password> The password will be the same as their web based password and can contain a combination of upper case, lower case and alpha-numeric characters
<Email> The partial part of the email address to search for.
<RecordTypes> (example “Contacts,Resources”) The Record Types present the types of records to search and can include the values “Contacts” and “Resources”.  These should be sent in a comma delimited list.  A blank value will assume all record types to be searched.
<MaximumRecordsToReturn> This parameter will limit the number of records returned from the search.  Zero will retrieve the first 999 records.

Example of a valid request:

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <FindByEmail>
            <UserCredentials>
                <SecurityToken>3E5g7ht5rFe3GHti5481SwqI8Rfk840GfrpzXak2</SecurityToken>
                <Username>demo@tracker-rms.com</Username>
                <Password>Password</Password>
            </UserCredentials>
            <Email>james@somewhere.com</Email>
            <RecordTypes>Contacts,Resources</RecordTypes>
            <MaximumRecordsToReturn>3</MaximumRecordsToReturn>
        </FindByEmail>
    </WebAPI>
</TrackerRMS>

Response Format

The function will return the standard RequestStatus section along with the record details for each person on the database matching any part of the name parameter provided.

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <FindByEmail_Return>
            <Records>
                <Record id=”” recordtype=””>
                    <FullName></FullName>
                    <JobTitle></JobTitle>
                    <Company></Company>
                    <AddressLine1></AddressLine1>
                    <AddressLine2></AddressLine2>
                    <Town></Town>
                    <County></County>
                    <PostCode></PostCode>
                    <Country></Country>
                    <Telephone></Telephone>
                    <HomePhone></HomePhone>
                    <MobilePhone></MobilePhone>
                    <OtherPhone></OtherPhone>
                    <Fax></Fax>
                    <Email></Email>
                    <PopURL></PopURL>
                </Record>
            </Records>
                <Record id=”” recordtype=””>
                ...
                </Record>
                ...
            </Records>
        </FindByEmail _Return>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<Records> (collection) Within the <Records> node is the individual <Record> elements that contain the specific person records to which the phone search matched.Each <Record> will return with attributes containing the records unique id, recordtype (for example “Contact” or “Resource” as well as a full set of sub-nodes containing contact information.

Example of a valid return:

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode>0</ReturnCode>
            <ReturnDescription>Success</ReturnDescription>
            <ReturnRecordCount>1</ReturnRecordCount>
        </RequestStatus>
        <FindByEmail_Return>
            <Records>
                <Record id=”123” recordtype=”Contact”>
                    <FullName>Alan James</FullName>
                    <JobTitle>Managing Director</JobTitle>
                    <Company>ABC Company Limited</Company>
                    <AddressLine1>28 The Street</AddressLine1>
                    <AddressLine2>Somewhere</AddressLine2>
                    <Town>Townsville</Town>
                    <County>Someshire</County>
                    <PostCode>AB12 3CD</PostCode>
                    <Country>United Kingdom</Country>
                    <Telephone>01234 567890</Telephone>
                    <HomePhone>04321 098765</HomePhone>
                    <MobilePhone>07777 123456</MobilePhone>
                    <OtherPhone>07777 123456</OtherPhone>
                    <Fax>01234 567899</Fax>
                    <Email>alan.james@abc-company.com</Email>
                    <PopURL>https://ukweb3.tracker-rms.com/v2-0- 0/contact.asp</PopURL>
                </Record>
            </Records>
        </FindByEmail_Return>
    </WebAPI>
</TrackerRMS>

Leave A Comment?