FaxMessages APIs
-
Create New Fax Message
Description: Creates a new fax message using a minimum set of optionsUsage:
POST api/Messages/Fax/Create/Simple
Parameter Type Source Description FaxObject SimpleFax FromBody SimpleFax object Returns:
the new Fax_Message
Examples:
<!-- Intent: Create a new Fax message using a minimal set of options POST to the following url http://api.v4.swiftreach.com/api/Messages/Fax/Create/Simple --> <SimpleFax> <Name>My Simple Fax</Name> <Description>this is an example of a simple fax message</Description> <CallerID>2012361344</CallerID> <Content>This is a simple fax message.</Content> </SimpleFax> <!-- example return value --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Fax_Message"> <VoiceCode>123456</VoiceCode> <Name>My Simple Fax</Name> <Description>this is an example of a simple fax message</Description> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>1</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <VoiceType>fax_message</VoiceType> <Body> <FAX_TEXT_SOURCE xsi:type="FAX_TEXT_SOURCE_TEXT"> <Text>This is a simple fax message.</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </Body> </Message_Profile>
-
Create New Fax Message
Description: Creates a new fax messageUsage:
POST api/Messages/Fax/Create
Parameter Type Source Description FaxObject Message_Profile FromBody Fax_Message object Returns:
the new Fax_Message
Examples:
<!-- POST to the following url http://api.v4.swiftreach.com/api/Messages/Fax/Create --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Fax_Message"> <Name>API Fax</Name> <Description>created by api</Description> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>1</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <VoiceType>fax_message</VoiceType> <Body> <FAX_TEXT_SOURCE xsi:type="FAX_TEXT_SOURCE_TEXT"> <Text>this is the body of my fax</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </Body> </Message_Profile> <!-- example return value --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Fax_Message"> <VoiceCode>123456</VoiceCode> <Name>API Fax</Name> <Description>created by api</Description> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>1</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <VoiceType>fax_message</VoiceType> <Body> <FAX_TEXT_SOURCE xsi:type="FAX_TEXT_SOURCE_TEXT"> <Text>this is the body of my fax</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </Body> </Message_Profile>
-
Update Existing Fax Message
Description: Updates the fax message parameters and content.Usage:
PUT api/Messages/Fax/Update/{FaxCode}
Parameter Type Source Description FaxCode Int32 FromUri The unique numerical code of the fax message to update FaxObject Message_Profile FromBody The Fax_Message object containing the modifications Returns:
Returns the updated Fax_Message object which includes any new fragment codes in its content.
Examples:
<!-- Intent: Update fax message with faxcode of 100000 PUT to the following url http://api.v4.swiftreach.com/api/Messages/Fax/Update/100000 --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Fax_Message"> <VoiceCode>100000</VoiceCode> <Name>API Fax</Name> <Description>created by api</Description> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>1</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <VoiceType>fax_message</VoiceType> <Body> <FAX_TEXT_SOURCE xsi:type="FAX_TEXT_SOURCE_TEXT"> <Text>this is the body of my fax</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </Body> </Message_Profile> <!-- example return value --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Fax_Message"> <VoiceCode>100000</VoiceCode> <Name>API Fax</Name> <Description>created by api</Description> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>1</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <VoiceType>fax_message</VoiceType> <Body> <FAX_TEXT_SOURCE xsi:type="FAX_TEXT_SOURCE_TEXT"> <Text>this is the body of my fax</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </Body> </Message_Profile>
-
Delete Existing Fax Message
Description: Deletes the given fax message.Usage:
DELETE api/Messages/Fax/Delete/{FaxCode}
Parameter Type Source Description FaxCode Int32 FromUri The unique numerical code identifying the fax message to delete Returns:
Returns 0 on success
Examples:
<!-- Intent: Delete fax message with faxcode of 100000 DELETE to the following url http://api.v4.swiftreach.com/api/Messages/Fax/Delete/100000 --> <!-- No XML input is required --> <!-- example return value --> <int>0</int>
-
List Fax Messages
Description: Returns a list of fax messagesUsage:
GET api/Messages/Fax/List
Returns:
Returns a list of Message objects
Examples:
<!-- Intent: retrieve a list of existing fax messages GET to the following url http://api.v4.swiftreach.com/api/Messages/Fax/List --> <!-- No XML input is required --> <!-- example return values --> <ArrayOfMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Messages.Voice"> <Message> <ChangeStamp>2012-07-30T15:35:36.303</ChangeStamp> <ChangedByUser/> <CreateStamp>2012-07-30T15:35:36.303</CreateStamp> <CreatedByUser>sample</CreatedByUser> <DeleteLocked>true</DeleteLocked> <Description>This is a test message - Deletable</Description> <LastUsed>0001-01-01T00:00:00</LastUsed> <Name>Bob's Test Fax</Name> <Visibility>Visible</Visibility> <VoiceCode>644047</VoiceCode> <VoiceType>fax_message</VoiceType> </Message> <Message> <ChangeStamp>2012-09-14T10:24:53.987</ChangeStamp> <ChangedByUser/> <CreateStamp>2012-09-14T10:24:53.987</CreateStamp> <CreatedByUser>sample</CreatedByUser> <DeleteLocked>false</DeleteLocked> <Description>this is a test of a fax message</Description> <LastUsed>2012-09-14T13:09:11.147</LastUsed> <Name>Test Fax</Name> <Visibility>Visible</Visibility> <VoiceCode>646607</VoiceCode> <VoiceType>fax_message</VoiceType> </Message> </ArrayOfMessage>
-
Get Fax Message Profile
Description: Returns the Message_Profile object for the given faxcodeUsage:
GET api/Messages/Fax/{FaxCode}
Parameter Type Source Description FaxCode Int32 FromUri The unique numerical code identifying the fax message to return Returns:
Returns Fax_Message object for the given faxcode.
Examples:
<!-- Intent: retrieve the profile for faxmessage with faxcode of 100000 GET to the following url http://api.v4.swiftreach.com/api/Messages/Fax/100000 --> <!-- No XML input is required --> <!-- example return value --> <Fax_Message xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Messages.Voice"> <ChangeStamp>2012-07-30T15:35:36.303</ChangeStamp> <ChangedByUser/> <CreateStamp>2012-07-30T15:35:36.303</CreateStamp> <CreatedByUser>sample</CreatedByUser> <DeleteLocked>true</DeleteLocked> <Description>This is a test message - Deletable</Description> <LastUsed>0001-01-01T00:00:00</LastUsed> <Name>Bob's Test Fax</Name> <Visibility>Visible</Visibility> <VoiceCode>100000</VoiceCode> <VoiceType>fax_message</VoiceType> <AutoRetries>0</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <CallerID>1234567890</CallerID> <CapacityLimit>0</CapacityLimit> <CongestionAttempts>3</CongestionAttempts> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableWaterfall>false</EnableWaterfall> <RingSeconds>60</RingSeconds> <Body> <FAX_TEXT_SOURCE i:type="FAX_TEXT_SOURCE_TEXT"> <TextType>fax_text_source_text</TextType> <Text> <div id="wrapper"> <h1> Just the Fax.</h1> <p> This is the fax message text</p> </div> </Text> </FAX_TEXT_SOURCE> </Body> </Fax_Message>
-
Verify Fax Message Exists
Description: Checks to see if the given fax message exists.Usage:
GET api/Messages/Fax/Exists/{FaxCode}
Parameter Type Source Description FaxCode Int32 FromUri The unique numerical code identifying the fax message Returns:
Returns true if the fax message exists.
Examples:
<!-- Intent: verify that faxmessage with faxcode of 100000 exists GET to the following url http://api.v4.swiftreach.com/api/Messages/Fax/Exists/100000 --> <!-- No XML input is required --> <!-- example return value --> <boolean>true</boolean>
-
Send Fax 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/Fax/Send/Compressed/{TaskName}/{FaxCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. FaxCode Int32 FromUri The unique numerical code identifying the fax message to send. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
//-- Currently no examples for XML --//
-
Send Fax Message to Contact List
Description: Launches an alertUsage:
POST api/Messages/Fax/Send/{TaskName}/{FaxCode}/{ListCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. FaxCode Int32 FromUri The unique numerical code identifying the fax message to send. ListCode Int32 FromUri The unique numerical code identifying the contact list to send the fax message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the faxmessage with faxcode 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/Fax/Send/MY%20Test%20Alert/100000/200000 --> <!-- No XML input is required --> <!-- example return value --> <int>123456</int>
-
Send Fax Message to Array of Contacts
Description: Launches an alertUsage:
POST api/Messages/Fax/Send/{TaskName}/{FaxCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. FaxCode Int32 FromUri The unique numerical code identifying the fax message to send. Contacts Contact[] FromBody Array of Contact to send the fax message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the faxmessage with faxcode 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/Fax/Send/MY%20Test%20Alert/100000 --> <ArrayOfContact> <Contact> <EntityName>Sample One</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Fax>2012361222</Fax> </Contact> <Contact> <EntityName>Sample Two</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Fax>2012361344</Fax> </Contact> </ArrayOfContact> <!-- example return value --> <int>123456</int>
-
String to FAX_TEXT_SOURCE[] Helper Function
Description: Converts the given text content including auto-fields into a FAX_TEXT_SOURCE object.Usage:
POST api/Messages/Fax/Helpers/TextToFaxSourceObject
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 FAX_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/Fax/Helpers/TextToFaxSourceObject --> <TextContent>this is the body of my message</TextContent> <!-- Example Return Value --> <ArrayOfFAX_TEXT_SOURCE xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Messages.Voice"> <FAX_TEXT_SOURCE i:type="FAX_TEXT_SOURCE_TEXT"> <Text>this is the body of my message</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </ArrayOfFAX_TEXT_SOURCE>
-
FAX_TEXT_SOURCE[] to String Helper Function
Description: Retrieves the text content for the given fax content object arrayUsage:
POST api/Messages/Fax/Helpers/FaxContentObjectArrayToText
Parameter Type Source Description ContentObject FAX_TEXT_SOURCE[] FromBody The FAX_TEXT_SOURCE object array 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 array of fax text source objects POST to the following url http://api.v4.swiftreach.com/api/Messages/Fax/Helpers/FaxContentObjectArrayToText --> <ArrayOfFAX_TEXT_SOURCE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <FAX_TEXT_SOURCE xsi:type="FAX_TEXT_SOURCE_TEXT"> <Text>this is the body of my message.</Text> <TextType>fax_text_source_text</TextType> </FAX_TEXT_SOURCE> </ArrayOfFAX_TEXT_SOURCE> <!-- Example Return Value --> <string>this is the body of my message.</string>