SMS listing
API can be used for listing SMS.
Basic description and parameters of API calls can be found on this page.
Service
SMS API belongs to SMS service (sms).
API request
API request must contain all general parameters.
- CTRL
-
Fixed value: sms_list
- from
-
Date (and time) SMS should be listed from (including) in yyyy-mm-dd or yyyy-mm-dd hh:ii:ss format.
If parameter is not passed, SMS will be listed from the beginning.
- to
-
Date (and time) SMS should be listed to (including) in yyyy-mm-dd or yyyy-mm-dd hh:ii:ss format.
If parameter is not passed, SMS will be listed without upper limitation.
- start
-
Beginning of listing (the first SMS has index 0).
If parameter is not passed, 0 is the default value.
- count
-
Maximal number of SMS to be listed.
If parameter is not passed, all SMS will be listed (using parameters above).
API request examples
$login = 'user'; $call = microtime(true); $password = md5(md5("heslo").$call); $url = "https://api.profisms.cz/index.php?" . http_build_query(array( "CTRL" => "sms_list", "_login" => $login, "_password" => $password, "_service" => "sms", "_call" => $call, "from" => '2011-01-01', "to" => '2011-01-13', "count" => 2, "start" => 2, )); /** URL https://api.profisms.cz/index.php?CTRL=sms_list&_login=user &_password=88b61ac52efaf4ca17ede9d1e0a30a38 &_service=sms&_call=1294886598.4164&from=2011-01-01 &to=2011-01-13&count=2&start=2 */ $json = join("", file($url));
Response to valid API request
Basic response can be found in general API description.
Data array description
Array data contains SMS unique identifiers.
Request and response examples
$login = 'user'; $call = microtime(true); $password = md5(md5("heslo").$call); $url = "https://api.profisms.cz/index.php?" . http_build_query(array( "CTRL" => "sms_list", "_login" => $login, "_password" => $password, "_service" => "sms", "_call" => $call, "from" => '2011-01-01', "to" => '2011-01-13', "count" => 2, "start" => 2, ));
{ "error": { "code":0, "message":"OK" }, "data": [ "2689612", "2709365" ], "_key":"ab2063832062b63434a93f091e16df2b", "_time":0.229101896286 }
Response to invalid request
Description can be found in general API description.