HTTPS API v2 / Message service of Premium SMS

Principle of operation

Using the HTTPS API, you can also handle Premium SMS traffic by creating, for example, your own schemes of competitions, lotteries or SMS chats (eg when the functionality of the Customer Panel is not sufficient for the Subscriber). Premium SMS communication using the HTTPS API consists in receiving a query with a new message or possibly listing available Premium messages and sending a query regarding the sending of responses.

URL transmitting information about the new message Premium

In the Client Panel, you can set the URL with the appropriate parameters to which information about new Premium messages should be sent. These settings can be updated in the Customer Panel → Premium SMS → Prefixes and numbers → Edit selected password (or create a new one) → Response content → HTTPS XML API.

 

The sample URL may take the form of:

https://www.adres.pl/skrypt.php?z_numeru=#NUMEROD#&wiadomosc=#WIADOMOSC#&na_numer=#NUMERDO#&data=#DATA#&idsms=#IDSMS#&limit=#LIMIT#

Description of parameters:

Parameter An example value or format Description
#NUMEROD# 48500600700 Number 9-digit from which the message came Premium.
#WIADOMOSC# test Message content.
#NUMERDO# 71200 Premium number to which the message was sent.
#DATA# „2011-09-26 12:23:56”

Date format YYYY-MM-DD HH: ii: ss.

#IDSMS# 1234 The numeric ID of the message.
#LIMIT# 2 The number of vested for the selected message.

The correct answer to the question should be returned as plain / text and contain only "OK".

Premium Listing messages

 

If for some reason the message reception fails, or the client prefers to manually download the list of available messages within the Premium API, it is possible to send a request to the system, which returns a list of messages waiting for a response.

premium/index

 

As a result, the document will be generated JSON eg. such as the following:

{
   "items":[{
      "id":120270659,
      "to_number":"71160",
      "from_number":"48500600700",
      "date":"2013-05-10 15:29:05",
      "limit":1,
      "text":"INT.test"
   },
   {
      "id":120269997,
      "to_number":"71160",
      "from_number":"48500600500",
      "date":"2013-05-10 15:17:27",
      "limit":1,
      "text":"PAS.premium"
   }]
}

Replying Premium

premium/send

To reply to a specific message Premium use the ID received with the message.

Available parameters

Parameter Type An example value or format Description
username String login Username used to dispatch the message
password String password Password to the account
phone String np.: +48500600700 Phone number
id Integer np.: 123456789 ID Messages, which is sent to answer.
gate Integer np.: 71160

Premium gateway number.

text String content

Message content.

The parameters in bold are obligatory. Others are optional.

 

As a result, a JSON document will be generated, e.g. as follows:{
   "success":true
}

Listing statistics for the service Quiz Premium

quiz/view

TTo display statistics, enter the quiz ID.

Available parameters

Parameter Type An example value or format Description
username String login Username used to dispatch the message
password String password Password to the account
id Integer eg.: 123

ID quiz

The parameters in bold are obligatory. Others are optional.

 

As a result, a JSON document will be generated, e.g. as follows:

{
   "id":123,
   "name":"name quiz",
   "items":[{
      "id":1,
      "count":8,
   },
   {
      "id":2,
      "count":10,
   }]
}

Table quantities available answers depending on the number Premium

 

For each incoming message as part of the Premium number, there is an outgoing message pool (also via the Premium channel), using the same number to which the SMS was originally sent. The table below illustrates the number of responses available within one incoming message depending on the Premium number tariff.

Price [PLN] Example number Number of replies
0,50 70906 1
1,00 7100 2
2,00 7200 4
3,00 7300 6
4,00 7400 8
5,00 7500 10
6,00 7600 12
9,00 7900 18
19,00 91900 38
25,00 92500 38

Recommended settings

In order to support the Premium SMS service via the API, the option of API response should be selected in the Premium password settings. Additionally, for information purposes, it is worth selecting the option of forwarding the message to the URL address, in this way the Customer can be informed about the new incoming message without having to cyclically query API SerwerSMS.pl with new messages.