Skip to content

Service query

Request

Credit checks, server time, SMS cost, and connectivity diagnostics. Exactly one of servertime, httpresponse, creditcheck, or charge is required. charge also requires version > 2.00 and cell.

Security
ApiKeyAuth
Bodyapplication/x-www-form-urlencodedrequired
specversionstring

Spec version coded against. The gateway keys on major version 2.

Example:"2.61"
commsversionstring

Communication protocol/version (advisory, for support).

Example:"1.0"
appversionstring

Sending-application version (advisory, for support).

Example:"1.0"
servertimestring

Return server time (default option).

Value:"true"
Example:"true"
httpresponsestring

Plain-text diagnostic to test firewalls blocking XML.

Value:"true"
Example:"true"
creditcheckstring

Return remaining credits.

Value:"true"
Example:"true"
chargestring

Query the cost of an SMS. Requires version > 2.00 and cell.

Value:"true"
Example:"true"
versionstring

Set to 2 or 2.x for the credits-per-user layout; required for charge.

Example:"2.55"
cellstring

Mobile number for a charge query (may start with +).

Example:"26771333444"
allusersstring

Admin-only. Include per-user credit breakdown.

Value:"true"
Example:"true"
curl -i -X POST \
  https://docs.ecommunicate.co.za/_mock/apis/biz-sms/smsbatch/servicequery \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  --data-urlencode version=2.55 \
  --data-urlencode creditcheck=true

Responses

XML service-query result (plain text for httpresponse).

Body
string

Namespaced XML <ecomm:creditcheck> document.

Response
<?xml version="1.0" encoding="UTF-8" ?>
<ecomm:response xmlns:ecomm="http://messaging.ecommunicate.biz/sms/response">
    <ecomm:result>
        <ecomm:status code="0">success</ecomm:status>
        <ecomm:explanation>The request was processed correctly</ecomm:explanation>
        <ecomm:completiontime>2026-06-28T22:40:11.399+02:00</ecomm:completiontime>
        <ecomm:userid>your-userid</ecomm:userid>
        <ecomm:clientref>your-client-ref</ecomm:clientref>
    </ecomm:result>
    <ecomm:creditcheck status="">
        <ecomm:credits>200</ecomm:credits>
    </ecomm:creditcheck>
</ecomm:response>