PagerMessages APIs
-
Create New Pager Message
Description: Creates a new Pager message using a minimum set of optionsUsage:
POST api/Messages/Pager/Create/Simple
Parameter Type Source Description PagerObject SimplePager FromBody SimplePager object Returns:
The unique numerical code identifying the new Pager message
Examples:
<!-- Intent: Create a new Pager message using a minimal set of options POST to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Create/Simple --> <SimplePager> <Name>My Simple Pager Message</Name> <Description>this is an example of a simple pager message</Description> <From>2012361344</From> <Subject>Pager Example</Subject> <Body>this is a simple pager message.</Body> </SimplePager> <!-- example return value --> <int>123456</int>
-
Create New Pager Message
Description: Creates a new Pager messageUsage:
POST api/Messages/Pager/Create
Parameter Type Source Description PagerObject Pager_Message FromBody Pager_Message object Returns:
The unique numerical code identifying the new Pager message
Examples:
<!-- POST to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Create --> <Pager_Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Pager"> <Name>API Pager</Name> <Description>created by api</Description> <From>SwiftAPI</From> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <Body> <Pager_Content> <SpokenLanguage>English</SpokenLanguage> <Subject>my subject</Subject> <Body> <PAGER_TEXT_SOURCE xsi:type="PAGER_TEXT_SOURCE_TEXT"> <Text>this is the body of my message</Text> <TextType>pager_text_source_text</TextType> </PAGER_TEXT_SOURCE> </Body> </Pager_Content> </Body> </Pager_Message> <!-- example return value --> <int>123456</int>
-
Update Existing Pager Message
Description: Updates the Pager message parameters and content.Usage:
PUT api/Messages/Pager/Update/{PagerCode}
Parameter Type Source Description PagerCode Int32 FromUri The unique numerical code of the Pager message to update PagerObject Pager_Message FromBody The Pager_Message object containing the modifications Returns:
Returns 0 on success
Examples:
<!-- Intent: Update pager message with pagercode of 100000 PUT to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Update/100000 --> <Pager_Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Pager"> <PagerCode>100000</PagerCode> <Name>API Pager</Name> <Description>created by api</Description> <From>SwiftAPI</From> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <Body> <Pager_Content> <SpokenLanguage>English</SpokenLanguage> <Subject>my subject</Subject> <Body> <PAGER_TEXT_SOURCE xsi:type="PAGER_TEXT_SOURCE_TEXT"> <Text>this is the body of my message</Text> <TextType>pager_text_source_text</TextType> </PAGER_TEXT_SOURCE> </Body> </Pager_Content> </Body> </Pager_Message> <!-- example return value --> <int>123456</int>
-
Delete Existing Pager Message
Description: Deletes the given Pager message.Usage:
DELETE api/Messages/Pager/Delete/{PagerCode}
Parameter Type Source Description PagerCode Int32 FromUri The unique numerical code identifying the Pager message to delete Returns:
Returns 0 on success
Examples:
<!-- Intent: Delete pager message with pagercode of 100000 DELETE to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Delete/100000 --> <!-- No XML input is required --> <!-- example return value --> <int>0</int>
-
List Pager Messages
Description: Returns a list of Pager messagesUsage:
GET api/Messages/Pager/List
Returns:
Returns a list of Pager_Message objects
Examples:
<!-- Intent: retrieve a list of existing pager messages GET to the following url http://api.v4.swiftreach.com/api/Messages/Pager/List --> <!-- No XML input is required --> <!-- example return values --> <ArrayOfPager_Message xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Messages.Pager"> <Pager_Message> <ChangeStamp>2012-09-17T11:38:54.94</ChangeStamp> <ChangedByUser>sample</ChangedByUser> <Body> <Pager_Content> <Body> <PAGER_TEXT_SOURCE i:type="PAGER_TEXT_SOURCE_TEXT"> <TextType>pager_text_source_text</TextType> <Text>this is a test of the email messaging</Text> </PAGER_TEXT_SOURCE> </Body> <SpokenLanguage>English</SpokenLanguage> <Subject>foobar</Subject> </Pager_Content> </Body> <CreateStamp>2012-09-17T11:21:55.647</CreateStamp> <CreatedByUser>sample</CreatedByUser> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <DeleteLocked>true</DeleteLocked> <Description>this is just a test</Description> <PagerCode>646697</PagerCode> <From>Swift911V4</From> <LastUsed>2012-12-21T08:44:18.38</LastUsed> <Name>Test Pager</Name> <Visibility>Visible</Visibility> </Pager_Message> <Pager_Message> <ChangeStamp>2012-09-25T15:13:11.59</ChangeStamp> <ChangedByUser/> <Body> <Pager_Content> <Body> <PAGER_TEXT_SOURCE i:type="PAGER_TEXT_SOURCE_TEXT"> <TextType>pager_text_source_text</TextType> <Text>kmandelbaum@swiftreach.com</Text> </PAGER_TEXT_SOURCE> </Body> <SpokenLanguage>English</SpokenLanguage> <Subject>TEST</Subject> </Pager_Content> </Body> <CreateStamp>2012-09-25T15:13:11.59</CreateStamp> <CreatedByUser>kmandelbaum</CreatedByUser> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <DeleteLocked>false</DeleteLocked> <Description>TEST</Description> <PagerCode>647037</PagerCode> <From>Swift911V4</From> <LastUsed>0001-01-01T00:00:00</LastUsed> <Name>TEST</Name> <Visibility>Visible</Visibility> </Pager_Message> </ArrayOfPager_Message>
-
Get Pager Message Profile
Description: Returns the Pager_Message object for the given PagercodeUsage:
GET api/Messages/Pager/{PagerCode}
Parameter Type Source Description PagerCode Int32 FromUri The unique numerical code identifying the Pager message to return Returns:
Returns Pager_Message object for the given Pagercode.
Examples:
<!-- Intent: retrieve the profile for pager message with pagercode of 100000 GET to the following url http://api.v4.swiftreach.com/api/Messages/Pager/100000 --> <!-- No XML input is required --> <!-- example return value --> <Pager_Message> <ChangeStamp>2012-09-17T11:38:54.94</ChangeStamp> <ChangedByUser>sample</ChangedByUser> <Body> <Pager_Content> <Body> <PAGER_TEXT_SOURCE i:type="PAGER_TEXT_SOURCE_TEXT"> <TextType>pager_text_source_text</TextType> <Text>this is a test of the Pager messaging</Text> </PAGER_TEXT_SOURCE> </Body> <SpokenLanguage>English</SpokenLanguage> <Subject>foobar</Subject> </Pager_Content> </Body> <CreateStamp>2012-09-17T11:21:55.647</CreateStamp> <CreatedByUser>sample</CreatedByUser> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <DeleteLocked>true</DeleteLocked> <Description>this is just a test</Description> <PageCode>100000</PagerCode> <FromName>Swift911V4</FromName> <LastUsed>2012-12-21T08:44:18.38</LastUsed> <Name>Test Pager</Name> <Visibility>Visible</Visibility> </Pager_Message>
-
Verify Pager Message Exists
Description: Checks to see if the given Pager message exists.Usage:
GET api/Messages/Pager/Exists/{PagerCode}
Parameter Type Source Description PagerCode Int32 FromUri The unique numerical code identifying the Pager message Returns:
Returns true if the Pager message exists.
Examples:
<!-- Intent: verify that pager message with pagercode of 100000 exists GET to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Exists/100000 --> <!-- No XML input is required --> <!-- example return value --> <boolean>true</boolean>
-
Send Pager Message to gzipped Array of Contacts
Description: Launches an alert. The gzip compressed contacts array xml should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/Messages/Pager/Send/Compressed/{TaskName}/{PagerCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. PagerCode Int32 FromUri The unique numerical code identifying the Pager message to send. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
//-- Currently no examples for XML --//
-
Send Pager Message to Contact List
Description: Launches an alertUsage:
POST api/Messages/Pager/Send/{TaskName}/{PagerCode}/{ListCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. PagerCode Int32 FromUri The unique numerical code identifying the Pager message to send. ListCode Int32 FromUri The unique numerical code identifying the contact list to send the Pager message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the pager message with pagercode of 100000 to an existing contact list with listcode 200000 and name the alert "My Test Alert" POST to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Send/MY%20Test%20Alert/100000/200000 --> <!-- No XML input is required --> <!-- example return value --> <int>123456</int>
-
Send Pager Message to Array of Contacts
Description: Launches an alertUsage:
POST api/Messages/Pager/Send/{TaskName}/{PagerCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. PagerCode Int32 FromUri The unique numerical code identifying the Pager message to send. Contacts Contact[] FromBody Array of Contact to send the Pager message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the pager message with pagercode of 100000 to an array of contacts posted in the body of the request and name the alert "My Test Alert" POST to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Send/MY%20Test%20Alert/100000 --> <ArrayOfContact> <Contact> <EntityName>Sample One</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <Pager>5551234567</Pager> <SMSNetwork>0</SMSNetwork> <PagerNetwork>1</PagerNetwork> </Contact> <Contact> <EntityName>Sample Two</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <Pager>5551234567</Pager> <SMSNetwork>0</SMSNetwork> <PagerNetwork>7</PagerNetwork> </Contact> </ArrayOfContact> <!-- example return value --> <int>123456</int>
-
String to PAGER_TEXT_SOURCE[] Helper Function
Description: Converts the given text content including auto-fields into a Pager_TEXT_SOURCE object.Usage:
POST api/Messages/Pager/Helpers/TextToPagerSourceObject
Parameter Type Source Description TextContent String FromBody The text content of the message. This may contain auto-fields such as [Name/] or [Date/] etc. Returns:
Returns a new PAGER_TEXT_SOURCE object array.
Examples:
<!-- Intent: parses the text content and returns an array of text sources POST to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Helpers/TextToPagerSourceObject --> <TextContent>this is the body of my pager message</TextContent> <!-- Example Return Value --> <ArrayOfPAGER_TEXT_SOURCE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <PAGER_TEXT_SOURCE xsi:type="PAGER_TEXT_SOURCE_TEXT"> <Text>this is the body of my pager message</Text> <TextType>pager_text_source_text</TextType> </PAGER_TEXT_SOURCE> </ArrayOfPAGER_TEXT_SOURCE>
-
Pager_Content to String Helper Function
Description: Retrieves the text content for the given alert content objectUsage:
POST api/Messages/Pager/Helpers/PagerContentObjectToText
Parameter Type Source Description ContentObject Pager_Content FromBody The Pager_Content object that contains the current content Returns:
Returns a string containing the textual content of the message including auto-fields if used.
Examples:
<!-- Intent: return the text content of the pager_content object POST to the following url http://api.v4.swiftreach.com/api/Messages/Pager/Helpers/PagerContentObjectToText --> <Pager_Content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SpokenLanguage>English</SpokenLanguage> <Subject>my subject</Subject> <Body> <PAGER_TEXT_SOURCE xsi:type="PAGER_TEXT_SOURCE_TEXT"> <Text>this is the body of my message</Text> <TextType>pager_text_source_text</TextType> </PAGER_TEXT_SOURCE> </Body> </Pager_Content> <!-- Example Return Value --> <string>this is the body of my message</string>