ContactService


Click here for a complete list of operations.

GetContacts

Get all user contacts.

Params:
  • additionalInfo - combinartion of simple ContactInformation flags:
    • 0x00 (None) - no additional info
    • 0x01 (Subscriptions) - return array of Subscription for every contact (see subscription service for details)
Result: array of Contact derived types - EmailContact, SmsContact, IMContact, VoiceCallContact
  • Contact:
    • id - contact id (GUID). Could be used in subscription API calls
    • confirmed - contact is confirmed (sended confirmation code was provided for contact)
    • contactType - one of available contact types. See GetContactTypes method
    • name - user provided contact name
    • address - contact address
    • sendCost - cost of one notification
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method
    • activePeriodStart - string in format hh:mm, specify start of contact daily activity period.
      Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as
      period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time.
      If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm, specify period of contact activity.
      Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as
      period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time.
      If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • billingOverlimit - array of overlimit reasons. When no overlimit array is empty. Currently only one reason supported - Contact - indicate overlimit by contact count in current package.
    • subscriptions - subscriptions for this contact (see subscription service GetSubscriptions for details).
      Returned only if specified input flag ContactInformation.Subscriptions
  • EmailContact:
    • reportFormat - format of emails. Currently supported: Text, ShortText. Planned: HTML, Pdf(for reports)
    • sendNews - could be contact used for news delivery
    • sendPressRelease - could be contact used for press release delivery
    • sendBillingNotifications - send billing notifications (about low balance, overlimits and others)
  • SmsContact:
    • gateway - sms gateway of contact. See GetSmsGateways for details
  • IMContact:
    • gateway - instant messaging gateway of contact. See GetIMGateways for details
  • VoiceCallContact:
    • Currently has no additional field. VoiceCall gateway is twiliovoice. Send cost: $0.02 for US carriers, $0.222 for other.

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/GetContacts"

<?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>
    <GetContacts xmlns="http://www.host-tracker.com/Services">
      <additionalInfo>None or Subscriptions</additionalInfo>
    </GetContacts>
  </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>
    <GetContactsResponse xmlns="http://www.host-tracker.com/Services">
      <GetContactsResult>
        <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>
      </GetContactsResult>
    </GetContactsResponse>
  </soap:Body>
</soap:Envelope>