Connection Software


         Connection Software

Querying Your Available Credit and Available Messages

Available credit

You can check your credit in several ways

  • in your private Extranet area on the website
  • using an HTTP(S) POST request
  • using a SOAP over HTTP(S) request
Using an HTTP(S) POST request

The HTTP(S) request includes a set of parameters that specify the account you want to query. All examples below are single lines but may appear split into more than one line in some browsers. You must include your Username and PIN to identify the account and authenticate yourself. Remember that the Username is case sensitive. See the HTTP(S) to SMS documentation for more information on using the HTTP(S) interface.

POST /sendsms HTTP/1.1
Host: www.csoft.co.uk:80
Content-Type: application/x-www-form-urlencoded; charset="utf-8"
Content-Length: 64

Username=ANOther.12345&PIN=123456&AvailableCredit=

The response will be your available credit

AvailableCredit=UKL 15.2345

with the value returned in Sterling - UKL - £ to 4 decimal places

An incorrect Username or PIN will return the result

MessageIdentifier=-1&Report=2&Text=Invalid%20Login


Using a SOAP over HTTP request

As with the HTTP request, you can use either HTTP or HTTPS (more secure) to either of the It's Arrived servers. However, unlike HTTP you must use an HTTP POST to carry the SOAP payload. See the SOAP over HTTP documentation for more complete details of the SOAP Interface.

POST /sendsms2 HTTP/1.1
Host: www.csoft.co.uk:80
Content-Type: text/soap; charset="utf-8"
Content-Length: 594

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV= " http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="urn:CSoft:ItsArrived">
<SOAP-ENV:Body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:AvailableCredit>
<Username xsi:type="xsd:string">ANOther.12345</Username>
<PIN xsi:type="xsd:string">123456</PIN>
</ns1:AvailableCredit>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The HTTP response will be your available credit

HTTP/1.1 200 OK
Date: Wed, 13 Nov 2002 12:58:10 GMT
Content-Length: 569
Content-Type: text/xml; charset=utf-8
X-Pad: work around browser bug
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6b mod_fastcgi/2.2.10
Via: 1.1 cache-har (NetCache NetApp/5.1R2D14)

<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:ns1="urn:CSoft:ItsArrived">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<AvailableCreditResponse>
<Currency xsi:type="xsd:string">UKL</Currency>
<Credit xsi:type="xsd:string">995.4400</Credit>
</AvailableCreditResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Available Messages

You can check your approximate available premier messages in several ways

  • in your private Extranet area on the website
  • using an HTTP(S) POST request
Using an HTTP(S) POST request

The HTTP(S) request includes a set of parameters that specify the account you want to query. All examples below are single lines but may appear split into more than one line in some browsers. You must include your Username and PIN to identify the account and authenticate yourself. Remember that the Username is case sensitive. See the HTTP(S) to SMS documentation for more information on using the HTTP interface.

POST /sendsms HTTP/1.1
Host: www.csoft.co.uk:80
Content-Type: application/x-www-form-urlencoded; charset="utf-8"
Content-Length: 64

Username=ANOther.12345&PIN=123456&AvailableMessages=

The response will be your approximate available messages

AvailableMessages=1002

An incorrect Username or PIN will return the result

HTTP/1.1 200 OK
Date: Tue, 10 Dec 2002 14:33:38 GMT
Server: Apache/1.3.23 (Unix) (Red-Hat/Linux) mod_ssl/2.8.7 OpenSSL/0.9.6b DAV/1.0.3 PHP/4.1.2 mod_perl/1.26 mod_fastcgi/2.2.12
Transfer-Encoding: chunked
Content-Type: text/html;

MessageIdentifier=-1&Report=2&Text=Invalid Login

Dealing with Errors

  • If you are unable to establish a TCP/IP connection with www.csoft.co.uk then it is vital that you automatically failover to www2.csoft.co.uk.
  • If you receive a response code indicating an error condition DO NOT automatically retry your request. For example if you are Out of Credit you will still be Out Credit. If you do enter a retry loop we may block your IP address as repeated retries may appear to us to be a Denial of Service attack.
SMS This page was last modified at 17:06 UTC on Tuesday October 31, 2006