...
method | parameters | return |
---|---|---|
send | (String username, String password, String[] recipients, String text); | String documentId |
query | (String username, String password, String documentId); | SubmitStatus[] |
sendDocument | (Document document); | String documentId |
receive | (String username, String password, Option[] criteria); | Message[] |
Send SMS
This provides the capability to send a text message of up to 160 characters to a list of 1 or more mobile phones. A documentId is returned which can then be used to query the status of the submitted SMS.
Query SMS Status
This provides the capability to query the status of previously submitted SMS. A query is made using the documentId returned from above. An list of phone numbers and current status is returned
Receive SMS
Amethon is able to host a dedicated number on which to receive SMS. All SMS messages received on this number can be forwarded in one of the following ways. Initially this will need to be configured by Amethon. For each received message we know the following:
- sender: the number of the person who sent the message
- recipients: the number to which the message was sent (this is the hosted number)
- text: the SMS message text
an email is sent to a preconfigured email address. The email will appear to come from phoneNumber@amethon.net (eg 6142154353@amethon.net). It's subject will be "SMS Message Received" and the email body will contain the SMS text.
HTTP GET
A remote URL can be called passing as parameters the sender, recipient and SMS text details. Eg
http://www.company.com/receive.asp?sender=61450123123&recipient=61414414414&message=Hello+World
Web Service
A remote Web Service can be called passing as parameters the sender, recipient and SMS text details.
method | parameters | return |
---|---|---|
receive | (String sender, String recipient, String text) | Boolean (success | failure) |
Send Document
This provides the capability to send advanced SMS messages. The Document structure provides a powerful but complex interface. Multiple messages can be submitted in a single document. Each message can be addresses to one or more recipients. A reply address can be set for each individual message destination. 8-Bit or binary SMS is supported enabling ringtone, logos & picture messages to be sent. Messages can be individually scheduled and also be given an expiry time.
method | parameters | return |
---|---|---|
sendDocument | (Document document); | String documentId |
Document, Message & Destination Options include: (default values in bold).
scheduled-time | YYYY/MM/DD HH:MM:SS |
|
exipry-time | YYYY/MM/DD HH:MM:SS |
|
priority | 0 = no priority; 1 = priority delivery |
|
confirm | Address for confirmations to be sent | Only used by Document |
reply-with-body | TRUE | FALSE |
|
header | Source MS-ISDN |
|
footer | Appended to each message |
|
replyto | Address for replies to be sent |
|
- Destination options take precedence over Message options which in turn take precedence over Document options.
- Addresses will be serialised into Strings
- A unique documentId will be generated by MessageCore.
Document
Code Block |
---|
Class Document{
String username;
String password;
Message[] message;
Option[] option;
}
|
Message
Code Block |
---|
Class Message{
String subject;
Destination[] destination;
String referenceId;
Body body;
Option[] option;
}
|
Destination
Code Block |
---|
Class Destination{
Address destinationAddress;
Address fromAddress;
String referenceId;
Option[] option;
}
|
Address
Code Block |
---|
Class Address{
String type;
String value;
}
|
Type: EMAIL | SMS | URL | WEBSERVICE
Note: Type is automatically determined when Value is set to one of the following:
PROTOCOL | TYPE | EXAMPLE |
---|---|---|
mailto: | xxx@yyy.com | |
http: | URL | http://www.xyz.com |
https: | URL | https://www.xyz.com |
ftp: | URL | ftp://<username>:<password>@ftp.xyz.com |
webservice: | WEBSERVICE | webservice: http://services.xyz.com |
Body
Code Block |
---|
Class Body{
String type;
Payload[] payload;
}
|
Type: TEXT | RINGTONE | LOGO | PICTURE
Payload
Code Block |
---|
Class Payload{
String type;
String encoding;
String content;
Option[] option;
}
|
Attribute | Description |
---|---|
type | TEXT | IMELODY | MOTOROLA | OTT | RTTTL | GIF | BITMAP |
encoding | ASCII | BASE64 | HEX |
content | This is the content in ASCII, base64 or Hex |
Payload Options include:
width | Number of pixels |
height | Number of pixels |
depth | Number of bits |
mcc | Country Code |
mnc | Carrier Code |
Option
Code Block |
---|
Class Option{
String name;
String value;
}
|