|
||||
Querying Your Available Credit and Available Messages |
||||
Available creditYou can check your credit in several ways
Using an HTTP(S) POST requestThe 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.1Host: 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 requestAs 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.1Host: 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 OKDate: 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 MessagesYou can check your approximate available premier messages in several ways
Using an HTTP(S) POST requestThe 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.1Host: 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 Dealing with Errors
|
||||
| SMS This page was last modified at 17:06 UTC on Tuesday October 31, 2006 | ||||