HTTPS API v2 / Checking account balance

 

For accounts with restrictions on the number of messages sent, the customer can check how many messages are still to be sent. In this way, you can control the status of available credit to be sent and, if necessary, top-up your account.

Calling address

To retrieve the current number of available messages using remote service, call the specified URL using POST method.

account/limits

Available parameters

Parameter Type An example value or format Description
username String Login Username to the account​
password String Password Password to the account
show_type Boolean true, false or none Returns additional attribute talking about the type of account.

The parameters in bold are obligatory. Others are optional.

Return response

{
   "account":{
      "type":"prepaid"
   },
   "items":[{
      "type":"eco",
      "chars_limit":"918/6",
      "value":"no_limit"
   },
   {
      "type":"full",
      "chars_limit":"918/6",
      "value":"40"
   },
   {
      "type":"voice",
      "chars_limit":"160/1",
      "value":"not_available"
   },
   {
      "type":"mms",
      "chars_limit":"40/1",
      "value":"6"
   },
   {
      "type":"lookup",
      "chars_limit":"nd",
      "value":"20"
   },
   {
      "type":"hlr",
      "chars_limit":"nd",
      "value":"70"
   }]
}

Recommended settings

It is recommended to adjust the intensity of checking the available message limit for the shipments being made, so that, for example, you do not ask the API for your account balance every 10 seconds. if in the last period the customer did not send anything. The recommended settings are account status updates, such as 1 hour or when shipping.

For customers using the Prepaid option, it is possible to automatically inform about the ending limit (specified quantity level) and about the total limit of the selected type of message. These messages can be sent to the customer by SMS or email.