Sms inbound | SmsHosting.it
icon_qa
INTRODUZIONE API REST

Usi l'app Postman?
 

SMS INBOUND

SMS inbound

search on inbound message related to service "Forward sms".

URI

GET https://api.smshosting.it/rest/api/sms/received/search

Request

ParameterMandatoryTypeDescription
fromDate No (at least one param is mandatory fromDate or toDate) String start of date interval (receiving date)with format yyyy-MM-dd'T'HH:mm:ssZ
toDate No (at least one param is mandatory fromDate or toDate) String end of date interval (receiving date)with format yyyy-MM-dd'T'HH:mm:ssZ
offset No Integer

index of first result returned

Example:

If the search finds 100 text messages, and the field offset is set with value 50 and the field limit is set with value 10 the result contains text messages from 51 to 60.

Default : 0

limit No Integer

Number of items returned

Default : 20

Response

HTTP Status Code

CodiceDescription
200 ok
400

Invalid parameters

Possible errorMsg are:

NO_PARAMS - Missing parameters

BAD_DATE - Bad format date

401 Invalid credentials
405 HTTP method not allowed
500 Generic error

La chiamata ritorna una lista di sms ricevuti.

ProprietàDescrizione
smsList

The response return a list of sms received

Each sms have the following properties:

from - originator full GSM number

text - body of the text message

receiveDate - receiving date formatted as yyyy-MM-dd'T'HH:mm:ssZ

metadata

Metadata useful for pagination

For further details on pagination visitreserved page

 Example:

curl --user AUTH_KEY:AUTH_SECRET  https://api.smshosting.it/rest/api/sms/received/search?fromDate=2011-01-01'T'00:00:00-0200
{
   "metadata":{
      "count":2,
      "offset":0,
      "limit":20
   },
   "smsList":[
      {
         "from":"+393450000000",
         "text":"Test sms 1",
         "receiveDate":"2011-04-21T13:23:13+0200"
      },
      {
         "from":"+393480000000",
         "text":"Test sms 1",
         "receiveDate":"2011-01-18T11:42:51+0100"
      }
   ]
}