This API method will allow you to export all information about employees who are currently created in the project.
This method is usually used for the following tasks:
To connect employees on the CRM/ERP side and Ringostat;
In combination with the redirect functionality using Webhook, you can check all available directions assigned to employees and use them for call redirection.
Using this API method, you can get the following employee data:
Employee IDs;
Full name;
Email addresses;
Basic and additional phone numbers linked to the employee;
List of assigned employee SIP accounts and their current status (online - true or offline - false);
Name and ID of the department(s) to which the employee is assigned.
Description of Request Parameters
API request address: https://api.ringostat.net/api/json-rpc
Method: POST Json-rpc
method: getProjectStaffListAndDirections
Auth-key: Electronic key to access your project in Ringostat.
projectId: Project ID
Filters that can be used in the request:
Filters are necessary to search for a specific employee and their data by given parameters. A filter consists of a parameter name and an entered value for searching. To add a filter, the filters key is used, which allows you to add one or more filters separated by commas.
Name of the parameter | Description |
staffId | Employee ID. Search by exact parameter match. |
fio | Full name of the employee. Search by partial parameter match or full parameter match. |
Employee email. Search by partial parameter match or full parameter match. |
If an employee is not found in the project according to the specified filter, an error "User does not exist" will be returned in response to the API request.
Parameters that can be exported: Below are all the parameters that you can get in response to the request of this API method.
Employee Data
Name of the parameter | Description |
status | The status of the sip account assigned to the employee. |
fio | Full name of the employee. |
Employee email. | |
extensionNumber | Additional employee number |
staffId | Employee ID |
Department Data (departments)
Name of the parameter | Description |
id | Department ID |
name | Name of the Department |
Call Direction assigned to the employee (directions)
Name of the parameter | Description |
main | Main contacts of the employee |
additional | Additional employee contacts |
type | Direction type:
phone – the phone number assigned to the employee as a backup destination |
direction | Call destination: sip account login, mobile number. |
Example request without using filters Method: POST URL: https://api.ringostat.net/api/json-rpc HEADERS: Auth-key:*************** BODY:
{
"id": 1,
"jsonrpc": "2.0",
"method": "getProjectStaffListAndDirections",
"params": {
"projectId": xxxxx,
"departmentsFullFormat": true,
"filter": [{}]
}
}
Where: xxxxx - Project ID; *************** - Electronic key to access your project in Ringostat.
Request:
Response:
Example request using filters
Method: POST URL: https://api.ringostat.net/api/json-rpc
HEADERS:
Auth-key:***************
BODY:
{
"id": 1,
"jsonrpc": "2.0",
"method": "getProjectStaffListAndDirections",
"params": {
"projectId": xxxxx,
"departmentsFullFormat": true,
"filter": [{
"param": "email",
"value": "YYYYY"
}, {
"param": "fio",
"value": "WWWWW"
}, {
"param": "staffId",
"value": 111111
}]
}
}
Where: xxxxx - Project ID; *************** - Electronic key to access your project in Ringostat;
YYYYY - Part or full email address of the employee;
WWWWW - Part or full name of the employee;
111111 - Employee ID from the project panel on the Ringostat side.
Request:
Response: