Alerts APIs
-
Send Alerts to Array of Contacts
Description: Launches an alert using any combination of the given message types.Usage:
POST api/Alerts/Send/{TaskName}/{VoiceCode}/{FaxCode}/{SMSCode}/{EmailCode}/{PagerCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code of the voice message to send. A value of 0 will cause this to be ignored. FaxCode Int32 FromUri The unique numerical code of the fax message to send. A value of 0 will cause this to be ignored. SMSCode Int32 FromUri The unique numerical code of the sms message to send. A value of 0 will cause this to be ignored. EmailCode Int32 FromUri The unique numerical code of the email message to send. A value of 0 will cause this to be ignored. PagerCode Int32 FromUri The unique numerical code of the pager message to send. A value of 0 will cause this to be ignored. Contacts Contact[] FromBody Contact array to send the messages to. Returns:
Returns the numerical jobcode
Examples:
<!-- Intent: sends a voice message with voicecode 100123 and sends an email message with emailcode 100278 to an array of contacts and names the alert "My Test Alert" POST to the following url http://api.v4.swiftreach.com/api/Alerts/Send/MY%20Test%20Alert/100123/0/0/100278/0 --> <ArrayOfContact> <Contact> <EntityName>Sample One</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <Email>alerts@swiftreach.com</Email> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <Phone>5551234567</Phone> <Extension/> <OptInSMS>true</OptInSMS> <PhoneType>phonetype_voice</PhoneType> <PhoneLabel>Mobile</PhoneLabel> </PhoneProfile> </Phones> <UserDefined> <KeyValue><Key>FieldOne</Key><Value>foobar</Value></KeyValue> <KeyValue><Key>FieldTwo</Key><Value>other</Value></KeyValue> </UserDefined> </Contact> <Contact> <EntityName>Sample Two</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <Email>alerts@swiftreach.com</Email> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <Phone>5551234568</Phone> <Extension/> <OptInSMS>true</OptInSMS> <PhoneType>phonetype_voice</PhoneType> <PhoneLabel>Mobile</PhoneLabel> </PhoneProfile> </Phones> <UserDefined> <KeyValue><Key>FieldOne</Key><Value>foobar</Value></KeyValue> <KeyValue><Key>FieldTwo</Key><Value>other</Value></KeyValue> </UserDefined> </Contact> </ArrayOfContact> <!-- example return value --> <int>123456</int>