HTTP XML Post

28/08/2010 14:04:54

The URL used to post XML formatted data is: https://service.sms4you.lt/XMLInput.php


* Duplicate numbers in one post request will be filtered in the sms4you system (single recipient can't receive more than 1 message per request).

XML format

The XML formatted string must be POST'ed as a value of the XML key;
"XML" => "<SMS>.</SMS>"

<SMS>
    <authentification>
        <username></username>
        <password></password>
    </authentification>
    <message>
        <sender></sender>
        <text></text>
        <type>long</type>
    </message>
    <recipients
        <gsm messageId="clientmsgID1"></gsm>
        <gsm messageId="clientmsgID2"></gsm>
        <gsm messageId="clientmsgID3"></gsm>
        <gsm messageId="clientmsgID4"></gsm>
    <recipients>
</SMS>

Orange text marks optional parameters.

Parameters specification:

Parameter

Description

authentification

username

Client's id in SMSpoint.co.uk system

password

Client's password in SMSpoint.co.uk system

message

sender

Dynamic sender ID of the message; allowed length for alphanumeric string up to 11 characters or for numeric string up to 14 characters

text

The message body

type If set, a long message (more that 160 characters) will be concatenated.

recipients

gsm

Destination address of the message, must be in international format without leading "0" or "+" For example: 37065841316

messageId

Registered delivery; client set the msgID, later will be described how to collect delivery reports

Return XML

After the POST XML initiated by the client some status codes will be available.

XML format

<RESPONSE>
    <status>status_code</status>
    <credits>credit_amount</credits>
</RESPONSE>

Status codes:

Status

Value

Description

AUTH_FAILED

-1

Invalid id and/or password

XML_ERROR

-2

Incorrect XML format

NOT_ENOUGH_CREDITS

-3

Not enough credits in user account

NO_RECIPIENTS

-4

No good recipients

SEND_OK

>0

Number of messages that will be sent