User Manual

115 | SMSEagle NXS-9700-3G | User’s Manual
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>
Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>name<< parameter</error_text>
<status>error</status>
</xml>
46. Phonebook shift create: JSONRPC method
HTTP POST METHOD:
https://url-of-smseagle/index.php/jsonrpc/sms
Parameter
Description
login
your user to login to SMSEagle
pass
your password to login to SMSEagle
name
name for the created shift
enabled
0 = disabled, 1 = enabled
(mon-sun)_from
shift start hour for each day of week
(mon-sun)_to
shift end hour for each day of week
responsetype
(optional parameter) text = format response as text (default), xml = format
response as XML object
EXAMPLES:
{"method":"phonebook.shift_create",
"params":{"login":"john","pass":"doe","name":"myshift","mon_from":"08:00","
mon_to":"16:00","wed_from":"09:00","wed_to":"20:00","enabled":"1"}}
RESPONSE:
Response: {"result": "OK; ID=[ID of created shift]"}
Sample response: {"result": "OK; ID=5"}
Response (when wrong logindata): {"result": "Invalid login or password"}
Response (when wrong parameters): {"result": "Wrong or missing >>name<< parameter"}
RESPONSE (EXTENDED):
Response:
{"result": {"shift_id":"[ID of created shift]","status":"ok"}}
Sample response: {"result": {"shift_id":"748","status":"ok"}}
Response (when wrong logindata):