User Manual

121 | SMSEagle NXS-9700-3G | User’s Manual
50. Phonebook shift update: 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
shift_id
id of existing shift
name
name for the shift
enabled
0 = disabled, 1 = enabled
responsetype
(optional parameter) text = format response as text (default), xml = format
response as XML object
EXAMPLES:
{"method":"phonebook.shift_update",
"params":{"login":"john","pass":"doe","shift_id":"24","name":"updatedshift"
,"enabled":"1"}}
RESPONSE:
Response: {"result": "OK"}
Response (when wrong logindata): {"result": "Invalid login or password"}
Response (when wrong parameters):
{"result": "Wrong or missing >>name<< parameter"}
{"result": "Wrong or missing >>shift_id<< parameter"}
Response (when shift_id is wrong): {"result": "Shift with the given id does not
exists"}
RESPONSE (EXTENDED):
Response: {"result":{"status":"ok"}}
Response (when wrong logindata):
{"result": {"error_text":"Invalid login or password","status":"error"}}
Response (when wrong parameters):
{"result": {"error_text":"Wrong or missing >>name<<
parameter","status":"error"}}
{"result": {"error_text":"Wrong or missing >>shift_id<<
parameter","status":"error"}}
Response (when shift_id is wrong):
{"result": {"error_text":"Shift with the given id does not
exists","status":"error"}}