|
|||||||||||||||||||||||||||
Account Query Web Services SOAP APIUsing the Account Query Web Services you can programatically, and securely, query your account(s) to determine various pieces of information such as your account balance. These can be very useful when writing your own applications that leverage our messaging gateway, for example. This document assumes you are already familiar with the Sending SMS Web Services SOAP API and how to use it. If you have not read this, please do so prior to trying to use these services. We strongly urge you to use HTTPS when connecting to our servers. By doing so you will ensure you have a secure connection over which to send your account details and messages. To aid readability in the element tables below, a + prefix indicates a complex type or operation request/response, while the identing and - prefix indicates an element in the sequence of elements that form part of that complex type/operation. The + and - are not part of the element names, however. |
|||||||||||||||||||||||||||
Available CreditYou can check the currently available credit on any of your accounts using the Username and PIN of that account with the AvailableCredit call.
If the Username and PIN are correct the response will include the credit on that account.
For example: <?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:ns2="http://www.csoft.co.uk/dtd/sendsms5.xsd"> <SOAP-ENV:Body> <ns2:AvailableCredit> <Username>ANother.123456</Username> <PIN>123456789</PIN> </ns2:AvailableCredit> </SOAP-ENV:Body> </SOAP-ENV:Envelope> If the Username and PIN are correct, the response will be your available credit. Note the reserved section which should be ignored. This is reserved for use by Connection Software. <?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:ns2="http://www.csoft.co.uk/dtd/sendsms5.xsd"> <SOAP-ENV:Body> <ns2:AvailableCreditResponse> <Currency>GBP</Currency> <Credit>2.8950</Credit> <Reserved><Field1/><Field2/><Field3/><Field4/></Reserved> </ns2:AvailableCreditResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
|||||||||||||||||||||||||||
Available MessagesYou can also check your approximate available messages using the AvailableMessages call. Note that this is the number of premier messages, not economy messages, and that the calculation of your messages is done using the current tariff you are on at that moment.
If the Username and PIN are correct the response will be the approximate number of premier messages on that account.
For example: <?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:ns2="http://www.csoft.co.uk/dtd/sendsms5.xsd"> <SOAP-ENV:Body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <ns2:AvailableMessages> <Username xsi:type="xsd:string">ANOther.12345</Username> <PIN xsi:type="xsd:string">123456789</PIN> </ns2:AvailableMessages> </SOAP-ENV:Body> </SOAP-ENV:Envelope> If the Username and PIN are correct the response will be the approximate messages: <?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:ns2="http://www.csoft.co.uk/dtd/sendsms5.xsd"> <SOAP-ENV:Body> <ns2:AvailableMessagesResponse> <Messages>24</Messages> <Reserved><Field1/><Field2/><Field3/><Field4/></Reserved> </ns2:AvailableMessagesResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
|||||||||||||||||||||||||||
Permitted ReplyToYou can get a list of valid ReplyTo values for your account by using the PermittedReplyTo call with the account Username and PIN. The ReplyTo field is used when sending messages and is where the messages appear to come from when read by the recipient. If you have two-way numbers or an alpha tag configured, these will be returned by this call. These values can be used in a drop-down list, for example, in your own application/website.
If the Username and PIN are correct the response will include the values you are permitted to use in the ReplyTo when sending messages.
<?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:ns2="http://www.csoft.co.uk/dtd/sendsms5.xsd"> <SOAP-ENV:Body> <ns2:PermittedReplyTo> <Username>ANother.12345</Username> <PIN>123456789</PIN> </ns2:PermittedReplyTo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> If the Username and PIN are correct the response will be your permitted ReplyTo values. Note the reserved section which should be ignored. This is reserved for use by Connection Software. <?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:ns2="http://www.csoft.co.uk/dtd/sendsms5.xsd"> <SOAP-ENV:Body> <ns2:PermittedReplyToResponse> <PermittedReplyTo>447700912345,csoft.co.uk</PermittedReplyTo> <Reserved><Field1/><Field2/><Field3/><Field4/></Reserved> </ns2:PermittedReplyToResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Dealing with Errors
|
|||||||||||||||||||||||||||
| SMS This page was last modified at 9:36 UTC on Wednesday April 30, 2008 | |||||||||||||||||||||||||||