Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

The XML HTTP API has been deprecated.
Please ensure that all new customers us the Web Services API

The XML HTTP API is described here for customers who are already using it.

...

Code Block
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE DOCUMENT SYSTEM "http://localhost:8080/gateway/msg_core.dtd">

<DOCUMENT mode="NORMAL">

	<SENDER password="xxxx">
		<ADDRESS type="EMAIL" role="FROM" value="account@company.com"/>
	</SENDER>

	<MESSAGE>
		<ADDRESS type="EMAIL" role="REPLYTO" value="mailto:sms@company.com?subject=SMS Reply ID#765"/>
		<ADDRESS type="SMS" role="TO" value="61410123123" status="INITIATOR" priority="1"/>
		<BODY type="TEXT">
			<PAYLOAD type="TEXT" encoding="ASCII">This is an SMS from the gateway.
			</PAYLOAD>
		</BODY>
	</MESSAGE>

</DOCUMENT>

One to Many

The following is an example of sending one message to many targets. This example will send the message "Test SMS Message using XML" to the following phone numbers: 0410507753, 0402469846 and 0418235612

...

Code Block
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE DOCUMENT SYSTEM "http://localhost:8080/gateway/msg_core.dtd">

<DOCUMENT mode="NORMAL">

	<SENDER password="xxxx">
		<ADDRESS type="EMAIL" role="FROM" value="account@company.com"/>
	</SENDER>

	<MESSAGE priority="3">
		<ADDRESS type="SMS" role="TO" value="0410507753" status="INITIATOR" priority="1"></ADDRESS>
		<SUBJECT>
			Batch Test
		</SUBJECT>

		<BODY type="TEXT">
			<PAYLOAD>
				Test SMS Message using XML (Batch - 1).
			</PAYLOAD>
		</BODY>
	</MESSAGE>
	
	<MESSAGE priority="2">
		<ADDRESS type="SMS" role="TO" value="0402469846" status="INITIATOR" priority="1"></ADDRESS>
		<SUBJECT>
			Batch Test
		</SUBJECT>

		<BODY type="TEXT">
			<PAYLOAD>
				Test SMS Message using XML (Batch - 2).
			</PAYLOAD>
		</BODY>
	</MESSAGE>

</DOCUMENT>

XML Elements

Element

Attributes

Type

Required

DEFAULT/(DESCRIPTION)

<DOCUMENT>
- <SENDER>
- <REPLYTO>?
- <SMS>?
- <MESSAGE>+

ID

STRING

No

(assigned by message core)

 

TIMESTAMP

STRING

No

(assigned by message core)

 

MODE

STRING
[NORMAL
|TEST]

No

NORMAL
(when MODE is set to TEST, message will not be delivered)

 

VERSION

STRING

No

 

 

STATUS

STRING
[ACCEPTED
|REJECTED]

No

 

 

REASON

STRING

No

 

<SENDER>
- <ADDRESS>

PASSWORD

STRING

No

(this is your Amethon password)

 

 

 

 

(the attributes TYPE, ROLE and VALUE in <ADDRESS> must be provided as follow:
TYPE = "EMAIL"
ROLE = "FROM"
VALUE = email address)

<REPLYTO>
- <ADDRESS>

 

 

 

(the attributes TYPE, ROLE and VALUE in <ADDRESS> must be provided as follow:
TYPE = "EMAIL"
ROLE = "REPLYTO"
VALUE = email address)

<SMS>
- <HEADER>
- <FOOTER>

 

 

 

(SMS specific features)

<HEADER>

 

STRING

No

(up to 11 ASCII characters that can be used instead of the senders mobile phone number (or instead of amethon.com). Dependent on carrier)

<FOOTER>

 

STRING

No

(appended to each message. Note that long messages will be truncated to accommodate the footer)

<MESSAGE>
- <ADDRESS>+
- <SUBJECT>?
- <BODY>

ID

STRING

No

 

 

PRIORITY

NUMBER

No

 

 

 

 

 

(the attributes TYPE, ROLE and VALUE in <ADDRESS> must be provided as follow:
TYPE = "SMS"
ROLE = "TO"
VALUE = recipient phone number starting 04)

<ADDRESS>

ID

STRING

No

 

 

TYPE

STRING
[SMS
|EMAIL
|FAX]

Yes

 

 

ROLE

STRING
[FROM
|TO
|CC
|BCC
|REPLYTO
|FORWARD]

Yes

 

 

VALUE

STRING

Yes

 

 

TIMESTAMP

STRING

No

 

 

STATUS

STRING
[INIT
|ACK
|DELIVERED]

No

 

 

REASON

STRING

No

 

 

PRIORITY

NUMBER

No

 

<SUBJECT>

 

STRING

No

(email subject(not used for SMS))

<BODY>
- <PAYLOAD>

TYPE

STRING
[TEXT
|IMAGE]

Yes

TEXT

<PAYLOAD>

 

STRING

Yes

(body payload – the actual data. text of message to send. Note max message + footer = 160 chars)