Login/Logout API

Voicenter Login/Logout API allows you to manage your representatives’ online statuses in the shift in your internal system. A representative can easily update his/her status (Login/Logout/Lunch and etc.) by a simple web request.
login logout api scheme

General Explanation

 

URI

 

1
          
https://api.voicenter.com/UserLogin/SetStatusFromAPI
        

Acceptable Request Types


1. POST-JSON
2. GET

 

Possible Response Formats

 

1. POST-JSON

 

Client Request Parameters

 

Field name Description Type Remarks
CodePersonal identifier, provided by Voicenter.StringMandatory
UserIdThe Voicenter user identifier, provided by Voicenter.StringMandatory
ExtensionUserThe Voicenter extension SIP code, provided by Voicenter.StringMandatory
StatusThe user online work status:
"1" - Login
"2" - Logout
"3" - Lunch
"5" - Administrative
"7" - Private
"9" - Other
"11" - Training
"12" - Team meeting
"13" - Brief
"The names of these statuses can be changed in the CPanel.
IntegerMandatory

 

Client Request Example (GET)

 

1
2
          
https://api.voicenter.com/UserLogin/SetStatusFromAPI?Code=XXXXXXXXXXX&UserId=123456789
&ExtensionUser=sipsip&Status=1
        

 

Client Request Example (POST - JSON)

 

{
"Code": "XXXXXXXXXXX",
"UserId": "123456789",
"ExtensionUser": "sipsip",
"Status": 1
}

 

Voicenter Response Parameters

 

Field name Description Type
StatusResponse status:
"1" – The request was successful, No errors.
"2" – The Code or User ID value is invalid.
"3" – The Extension value is invalid.
"4" – Status not supported or the ExtensionUser value is invalid.
Integer
StatusError"0" – There was something wrong in the request format.
"1" – The request was successful.
"4" – Internal error.
"6" – Missing parameters.
Integer
StatusErroMessageResponse status description:
"OK" – The request was successful, No errors.
"Authorization Failed" - The Code value or format is invalid.
"Phone error." – The "Phone" field is mandatory.
"Status not support" – The status field value is not valid.
"Extension is already in use" – If a user tries to connect to an extension that another user is connected to it.
"No extension found" – The Extension User value is not valid.
"Error on update" – There was an error on the server side.
String

 

Voicenter Response Example

 

{
"Status": 1,
"StatusError": 1,
"StatusErroMessage": "OK"
}