ContactService


Click here for a complete list of operations.

GetContactsByFilter

Get contacts by filter.

Params:
  • ContactFilter:
    • Hint 1. All filter fields are optional and could be combined together.
    • Hint 2. Specifying single filtered value (for ex. address) and filtered value collection (for ex. addresses) results in filtered value collection with all specified values (in ex. specified address and specified addresses).
    • Hint 3. If several fields are specified then they are combined via AND condition.
    • ids - contact ids for search for
    • excludeIds - if true then exclude specified ids
    • contactType - search for specified contact type
    • contactTypes - search for specified contact types
    • excludeContactTypes - if true - exclude specified contact types
    • confirmed - true - search for confirmed only, false - search only for not confirmed, null - search both
    • overlimited - true - search for overlimited only, false - search only for not overlimited, null - search both
    • acceptBillingNotifications - true - search for contacts which accepts billing notifications,
      false - search only for contacts which does not accept billing notifications, null - search both
    • address - search for contacts with specified address
    • addresses - search for contacts with specified addresses
    • excludeAddresses - search for contacts with not specified addresses
  • additionalInfo - ContactInformation flags. See GetContacts for details
Result is array of Contact derived types - EmailContact, SmsContact, IMContact, VoiceCallContact. See GetContacts for details.
Soap client faults:
  • WrongContactType - specified wrong contact type

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /api/soap/v1/contact.asmx HTTP/1.1
Host: www.host-tracker.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.host-tracker.com/Services/GetContactsByFilter"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <AuthHeader xmlns="http://www.host-tracker.com/Services">
      <login>string</login>
      <password>string</password>
      <ticket>string</ticket>
    </AuthHeader>
  </soap:Header>
  <soap:Body>
    <GetContactsByFilter xmlns="http://www.host-tracker.com/Services">
      <filter>
        <id>guid</id>
        <ids>
          <guid>guid</guid>
          <guid>guid</guid>
        </ids>
        <excludeIds>boolean</excludeIds>
        <contactType>string</contactType>
        <contactTypes>
          <string>string</string>
          <string>string</string>
        </contactTypes>
        <excludeContactTypes>boolean</excludeContactTypes>
        <confirmed>boolean</confirmed>
        <overlimited>boolean</overlimited>
        <acceptBillingNotifications>boolean</acceptBillingNotifications>
        <name>string</name>
        <names>
          <string>string</string>
          <string>string</string>
        </names>
        <nameSearchLike>boolean</nameSearchLike>
        <excludeNames>boolean</excludeNames>
        <address>string</address>
        <addresses>
          <string>string</string>
          <string>string</string>
        </addresses>
        <addressSearchLike>boolean</addressSearchLike>
        <excludeAddresses>boolean</excludeAddresses>
      </filter>
      <additionalInfo>None or Subscriptions</additionalInfo>
    </GetContactsByFilter>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetContactsByFilterResponse xmlns="http://www.host-tracker.com/Services">
      <GetContactsByFilterResult>
        <Contact>
          <id>guid</id>
          <confirmed>boolean</confirmed>
          <contactType>string</contactType>
          <name>string</name>
          <address>string</address>
          <sendCost>decimal</sendCost>
          <sendCostDirty>boolean</sendCostDirty>
          <alertDelay>int</alertDelay>
          <activePeriodStart>string</activePeriodStart>
          <activePeriodEnd>string</activePeriodEnd>
          <activeDays>
            <string>string</string>
            <string>string</string>
          </activeDays>
          <billingOverlimit>
            <string>string</string>
            <string>string</string>
          </billingOverlimit>
          <subscriptions>
            <Subscription xsi:nil="true" />
            <Subscription xsi:nil="true" />
          </subscriptions>
        </Contact>
        <Contact>
          <id>guid</id>
          <confirmed>boolean</confirmed>
          <contactType>string</contactType>
          <name>string</name>
          <address>string</address>
          <sendCost>decimal</sendCost>
          <sendCostDirty>boolean</sendCostDirty>
          <alertDelay>int</alertDelay>
          <activePeriodStart>string</activePeriodStart>
          <activePeriodEnd>string</activePeriodEnd>
          <activeDays>
            <string>string</string>
            <string>string</string>
          </activeDays>
          <billingOverlimit>
            <string>string</string>
            <string>string</string>
          </billingOverlimit>
          <subscriptions>
            <Subscription xsi:nil="true" />
            <Subscription xsi:nil="true" />
          </subscriptions>
        </Contact>
      </GetContactsByFilterResult>
    </GetContactsByFilterResponse>
  </soap:Body>
</soap:Envelope>