Contact_RetrieveByEmailAddress

Retrieves a Contact record based on customer's email address.

Warning: This API endpoint will eventually be deprecated (existing implementations will still continue to work). We strongly advise to use the new CRM v3 REST API endpoints. Here is an example on how to get a customer by the email address using the new endpoints.

Request

  • Method: SOAP
  • Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.
  • Path: /catalystwebservice/catalystcrmwebservice.asmx
  • The username and password fields:You can make SOAP API calls can be authorized either by using the actual username or password of an Admin username or, if you are making the calls from an app leave the username field empty and use the authorization token as the password.

Parameters

  • siteId - ID of the site (integer)
  • username - email address of user account, leave empty if using site token (string)
  • password - password of user account, or site authentication token for specified site (string)
  • emailaddress - (string)

To use a site token instead of username/password, send an empty username field and the site token as the password. See example below.

Response

A Contact_RetrieveByEmailAddressResponse object with the following properties:

  • Contact_RetrieveByEmailAddressResult - (object)
    • entityId - (integer)
    • externalId - (string)
    • emailAddress - (string)
    • contactTitle - (string)
    • deleted - (boolean)
    • fullName - (string)
    • firstName - (string)
    • lastName - (string)
    • username - (string)
    • password - this field has been deprecated, it always returns a blank value
    • dateOfBirth - (dateTime) - e.g. 2014-09-9T10:24:00
    • createDate - (dateTime) - e.g. 2014-09-9T10:24:00
    • lastUpdateDate - (dateTime) - e.g. 2014-09-9T10:24:00
    • customerType - (string)
    • industryType - (string)
    • leadSourceType - (string)
    • ratingType - (string)
    • relationships - (object)
      • entityId - (integer)
      • entityType - (integer)
      • name - (string)
    • addresses
      • Address - (object)
        • addressTypeID - (integer)
        • addressLine1 - (string)
        • addressLine2 - (string)
        • city - (string)
        • zipcode - (string)
        • state - (string)
        • countryCode - (string)
    • phoneNos
      • phoneNos - (object)
        • phoneNoTypeID - (integer)
        • phoneNo - (string)
    • crmForms - (object)
      • formId - (integer)
      • formName - (string)
      • crmFormFields - (array)
    • MasterOptIn - (boolean)

Examples

Accepts and returns XML as Content-Type.

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values, please note the data in the request and response is only for explanatory purposes.

Request:

POST /catalystwebservice/catalystcrmwebservice.asmx HTTP/1.1
Host: worldsecuresystems.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Contact_RetrieveByEmailAddress xmlns="http://tempuri.org/CatalystDeveloperService/CatalystCRMWebservice">
      <username>jdoe@yourdomain.com</username>
      <password>Y0urP@ssw0rdH3re</password>
      <siteId>12345</siteId>
      <emailAddress>jdoe@yourdomain.com</emailAddress>
    </Contact_RetrieveByEmailAddress>
  </soap12:Body>
</soap12:Envelope>

Response:

POST /catalystwebservice/catalystcrmwebservice.asmx HTTP/1.1
Host: worldsecuresystems.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Contact_RetrieveByEmailAddress xmlns="http://tempuri.org/CatalystDeveloperService/CatalystCRMWebservice">
      <username>jdoe@yourdomain.com</username>
      <password>Y0urP@ssw0rdH3re</password>
      <siteId>12345</siteId>
      <emailAddress>jdoe@yourdomain.com</emailAddress>
    </Contact_RetrieveByEmailAddress>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Contact_RetrieveByEmailAddressResponse xmlns="http://tempuri.org/CatalystDeveloperService/CatalystCRMWebservice">
      <Contact_RetrieveByEmailAddressResult>
        <entityId>1234</entityId>
        <externalId>12345</externalId>
        <emailAddress>jdoe@yourdomain.com</emailAddress>
        <contactTitle>string</contactTitle>
        <deleted>false</deleted>
        <fullName>John Doe</fullName>
        <firstName>John</firstName>
        <lastName>Doe</lastName>
        <username>jdoe@yourdomain.com</username>
        <password>Y0urP@ssw0rdH3re</password>
        <dateOfBirth>1980-03-03T10:20:00</dateOfBirth>
        <createDate>2010-08-08T12:22:00</createDate>
        <lastUpdateDate>2012-08-08T12:22:00</lastUpdateDate>
        <customerType>Other</customerType>
        <industryType>Other</industryType>
        <leadSourceType>Other</leadSourceType>
        <ratingType>Warm</ratingType>
<relationships>
        <Relationship>
           <entityId>9636075</entityId>
           <entityType>2</entityType>
           <name>Sony Inc</name>
        </Relationship>
               </relationships>
        <addresses>
          <Address>
             <addressTypeID>1</addressTypeID>
             <addressLine1>Home Address</addressLine1>
             <city>Home City</city>
             <zipcode>HOME ZIP</zipcode>
             <state>home state</state>
             <countryCode>RO</countryCode>
          </Address>
          <Address>
             <addressTypeID>1</addressTypeID>
             <addressLine1>Home Address</addressLine1>
             <city>Home City</city>
             <zipcode>HOME ZIP</zipcode>
             <state>home state</state>
             <countryCode>RO</countryCode>
          </Address>
        </addresses>
        <phoneNos>
          <PhoneNo>
            <phoneNoTypeID>12345</phoneNoTypeID>
            <phoneNo>12345</phoneNo>
          </PhoneNo>
          <PhoneNo>
            <phoneNoTypeID>12345</phoneNoTypeID>
            <phoneNo>12345</phoneNo>
          </PhoneNo>
        </phoneNos>
        <crmForms>
          <CrmForms>
            <formId>12345</formId>
            <formName>Webform name here</formName>
            <crmFormFields xsi:nil="true" />
          </CrmForms>
          <CrmForms>
            <formId>12345</formId>
            <formName>Webform name here</formName>
            <crmFormFields xsi:nil="true" />
          </CrmForms>
        </crmForms>
        <MasterOptIn>true</MasterOptIn>
      </Contact_RetrieveByEmailAddressResult>
    </Contact_RetrieveByEmailAddressResponse>
  </soap12:Body>
</soap12:Envelope>