API employee EN: различия между версиями

Материал из WiKi - UserSide
(Add Ukrainian API docs and trilingual API links)
([IronBot] Sync EN localization from RU)
 
(не показаны 2 промежуточные версии этого же участника)
Строка 9: Строка 9:


== Subcategories ==
== Subcategories ==
==== add_history ====
''Added in: 3.21.72''
Description: Add an entry to an employee's action history
Required parameters:
  date_add - event date
  type_id - action type ID
Optional parameters:
  employee_id - employee ID
  object_id - related object ID
  object_name - related object name
  description - notes


==== add_notification ====
==== add_notification ====
Строка 15: Строка 29:


  Description: Create a PUSH notification for an employee
  Description: Create a PUSH notification for an employee
  Obligatory parameters:
  Required parameters:
   employee_id - employee ID
   employee_id - employee ID
   body - text
   body - text
Строка 25: Строка 39:
''Added in: 3.18beta1''
''Added in: 3.18beta1''


  Description: Adds an address object to the available addresses for an employee
  Description: Add an address object to the available addresses for an employee
  Obligatory parameters:
  Required parameters:
   employee_id - id of the employee
   employee_id - id of the employee
   address_id - id of address object ''(-1 for all addresses, -2 for objects without address)''.
   address_id - address object id ''(-1 for all addresses, -2 for objects without an address)''
   is_write - flag - write access
   is_write - flag - write access


Строка 36: Строка 50:


  Description: List of available address objects for an employee
  Description: List of available address objects for an employee
  Obligatory parameters:
  Required parameters:
   employee_id - employee id
   employee_id - employee id
   is_write - flag - write access
   is_write - flag - write access
Строка 45: Строка 59:


  Description: Remove an address object from the available addresses for an employee
  Description: Remove an address object from the available addresses for an employee
  Obligatory parameters:
  Required parameters:
   employee_id - id of the employee
   employee_id - id of the employee
   address_id - id of address object ''(-1 for all addresses, -2 for objects without address)''
   address_id - address object id ''(-1 for all addresses, -2 for objects without an address)''


==== check_pass ====
==== check_pass ====
''Added to: 3.16dev2''
''Added to: 3.16dev2''
  Description: Checks if the username and password match to log into UserSide
  Description: Check whether the login and password match for UserSide authentication
  Obligatory parameters:
  Required parameters:
   login - login
   login - login
   pass - password
   pass - password


Since version 3.16.28, the employee's activity date is updated upon successful authentication
Since version 3.16.28, the employee's activity date is updated upon successful authentication
==== division_employee_add ====
''Added in: 3.19.44''
Description: Assign an employee to a division
Required parameters:
  division_id - division ID
  employee_id - employee ID
Optional parameters:
  position_type - position type [head|deputy|worker]
  position_name - position in the division
  date_add - assignment date
==== division_employee_remove ====
''Added in: 3.19.44''
Description: Remove an employee from a division
Required parameters:
  division_id - division ID
  employee_id - employee ID
Optional parameters:
  date_remove - removal date


==== edit ====
==== edit ====
''Updated in: 3.21.79 (added messenger_service_name parameter)''


''Modified in: 3.19.40 (added ip_phone parameter)''
''Modified in: 3.19.40 (added ip_phone parameter)''
Строка 67: Строка 103:


  Description: Edit employee record
  Description: Edit employee record
  Obligatory parameters:
  Required parameters:
   id - id of the employee
   id - id of the employee
  Optional parameters:
  Optional parameters:
Строка 74: Строка 110:
   date_out - date of resignation
   date_out - date of resignation
   first_name - name
   first_name - name
   gps_id - IMEI of gps-tracker
   gps_id - GPS tracker IMEI
   ip_phone - IP phone number
   ip_phone - IP phone number
   is_blocked - flag - block/unblock the account
   is_blocked - flag - block/unblock the account
Строка 81: Строка 117:
   position - position
   position - position
   short_name - short name/surname
   short_name - short name/surname
   messenger_chat_id - telegram/messenger chat_id
  messenger_service_name - messenger service_name
   messenger_chat_id - messenger chat_id


==== get_data ====
==== get_data ====
Строка 91: Строка 128:
==== get_division ====
==== get_division ====
''Added in: 3.16dev2''
''Added in: 3.16dev2''
  Description: Retrieve information about a subdivision
  Description: Retrieve division information
  Optional parameters:
  Optional parameters:
   id - unit ID ''(can be comma separated)''
   id - division ID ''(can be comma separated)''


==== get_division_list ====
==== get_division_list ====
''Added in: 3.16dev2''
''Added in: 3.16dev2''
  Description: List of units
  Description: List of divisions


==== get_employee_id ====
==== get_employee_id ====
Строка 104: Строка 141:
''Added in: 3.16dev2''
''Added in: 3.16dev2''


  Description: Retrieve employee ID from incoming data
  Description: Retrieve employee ID from input data
  Required parameters:
  Required parameters:
   data_typer - type of data we are checking ''(possible values: additional_field_XXX, name, login, messenger_chat_id)''
   data_typer - type of data we are checking ''(possible values: additional_field_XXX, name, login, messenger_chat_id)''
Строка 113: Строка 150:


''Added in: 3.16dev2''
''Added in: 3.16dev2''
  Description: Action history ''(limit 10000 records in sample results)''
  Description: Action history ''(limit 10000 records in the sample results)''
  Obligatory parameters:
  Required parameters:
   date_from - sampling start date ''(from)''
   date_from - sampling start date ''(from)''
   date_to - sampling end date ''(to)''
   date_to - sampling end date ''(to)''
Строка 131: Строка 168:
''Added in: 3.16dev2''
''Added in: 3.16dev2''
  Description: Retrieve information from timesheets
  Description: Retrieve information from timesheets
  Obligatory parameters:
  Required parameters:
   date_from - start date of sampling
   date_from - start date of sampling
   date_to - sampling end date
   date_to - sampling end date
Строка 140: Строка 177:
==== get_work_time_data ====
==== get_work_time_data ====
''Added in: 3.17dev1''
''Added in: 3.17dev1''
  Description: Retrieve information about employees working hours
  Description: Retrieve employee working time information
  Obligatory parameters:
  Required parameters:
   date_from - start date of sampling
   date_from - start date of sampling
   date_to - date of sampling end
   date_to - date of sampling end
  Optional parameters:
  Optional parameters:
   employee_id - employee id ''(can be comma separated)''
   employee_id - employee id ''(can be comma separated)''
==== get_work_time_data_division ====
''Added in 3.21.96''
Description: Returns working time data for divisions
Required parameters:
  date_from - start date
  date_to - end date
Optional parameters:
  division_id - comma-separated division IDs


==== get_unavailable_data ====
==== get_unavailable_data ====
''Added in: 3.18beta1''
''Added in: 3.18beta1''


  Description: Retrieve information about employee's ''(holiday, sick leave)'' unavailability
  Description: Retrieve employee unavailability information ''(holiday, sick leave)''
  Obligatory parameters:
  Required parameters:
   None
   None
  Optional parameters:
  Optional parameters:
Строка 164: Строка 212:


  Description: Add/modify/delete an entry in the timesheet
  Description: Add/modify/delete an entry in the timesheet
  Obligatory parameters:
  Required parameters:
   employee_id - employee id
   employee_id - employee id
   date - date
   date - date
Строка 174: Строка 222:


  Description: Add/modify/delete employee unavailability record ''(holiday, sick leave)''
  Description: Add/modify/delete employee unavailability record ''(holiday, sick leave)''
  Obligatory parameters:
  Required parameters:
   employee_id - employee ID
   employee_id - employee ID
   date_from - period start date
   date_from - period start date
Строка 185: Строка 233:
''Added in: 3.18beta1''
''Added in: 3.18beta1''


  Description: Adds an address object to the list of addresses to which an employee can be assigned to work
  Description: Add an address object to the list of addresses where an employee can be assigned to work
  Required parameters:
  Required parameters:
   employee_id - id of employee
   employee_id - id of employee
   address_id - id of address object ''(-1 for all addresses, -2 for objects without address)''
   address_id - address object id ''(-1 for all addresses, -2 for objects without an address)''


==== task_address_access_list ====
==== task_address_access_list ====
Строка 194: Строка 242:
''Added in: 3.18beta1''
''Added in: 3.18beta1''


  Description: A list of addresses where an employee can be assigned to jobs
  Description: List of addresses where an employee can be assigned to jobs
  Obligatory parameters:
  Required parameters:
   employee_id - employee id
   employee_id - employee id


Строка 202: Строка 250:
''Added in: 3.18beta1''
''Added in: 3.18beta1''


  Description: Removes an address object from the list of addresses to which an employee can be assigned to work
  Description: Remove an address object from the list of addresses where an employee can be assigned to work
  Obligatory parameters:
  Required parameters:
   employee_id - id of employee
   employee_id - id of employee
   address_id - id of address object ''(-1 for all addresses, -2 for objects without address)''
   address_id - address object id ''(-1 for all addresses, -2 for objects without an address)''


==== work_time_finish ====
==== work_time_finish ====
''Added to: 3.16dev5''
''Added to: 3.16dev5''
  Description: Fixing the moment when the employee's working time ends
  Description: Record the end of an employee's working time
  Obligatory parameters:
  Required parameters:
   employee_id - employee id
   employee_id - employee id
   date - date and time
   date - date and time
Строка 218: Строка 266:
==== work_time_start ====
==== work_time_start ====
''Added to: 3.16dev5''
''Added to: 3.16dev5''
  Description: Fixing the moment when the employee's working time starts
  Description: Record the start of an employee's working time
  Obligatory parameters:
  Required parameters:
   employee_id - employee id
   employee_id - employee id
   date - date and time
   date - date and time
  Optional parameters:
  Optional parameters:
   comment - notes
   comment - notes
==== division_employee_add ====
''Added in: 3.19.44''
Description: Assign an employee to a division
Required parameters:
  division_id - division ID
  employee_id - employee ID
Optional parameters:
  position_type - position type [head|deputy|worker]
  position_name - position in the division
  date_add - assignment date
==== division_employee_remove ====
''Added in: 3.19.44''
Description: Remove an employee from a division
Required parameters:
  division_id - division ID
  employee_id - employee ID
Optional parameters:
  date_remove - removal date

Текущая версия от 14:43, 26 ноября 2026

en | uk | ru

Section API ERP "UserSide"

Purpose: Employees

Additional parameters:
action - request subcategory (possible value: see below)

Subcategories

add_history

Added in: 3.21.72

Description: Add an entry to an employee's action history
Required parameters:
 date_add - event date
 type_id - action type ID
Optional parameters:
 employee_id - employee ID
 object_id - related object ID
 object_name - related object name
 description - notes

add_notification

Added in: 3.18beta1

Description: Create a PUSH notification for an employee
Required parameters:
 employee_id - employee ID
 body - text
Optional parameters:
 color - HTML color of the notification window

address_access_add

Added in: 3.18beta1

Description: Add an address object to the available addresses for an employee
Required parameters:
 employee_id - id of the employee
 address_id - address object id (-1 for all addresses, -2 for objects without an address)
 is_write - flag - write access

address_access_list

Added in: 3.18beta1

Description: List of available address objects for an employee
Required parameters:
 employee_id - employee id
 is_write - flag - write access

address_access_remove

Added in: 3.18beta1

Description: Remove an address object from the available addresses for an employee
Required parameters:
 employee_id - id of the employee
 address_id - address object id (-1 for all addresses, -2 for objects without an address)

check_pass

Added to: 3.16dev2

Description: Check whether the login and password match for UserSide authentication
Required parameters:
 login - login
 pass - password

Since version 3.16.28, the employee's activity date is updated upon successful authentication

division_employee_add

Added in: 3.19.44

Description: Assign an employee to a division
Required parameters:
 division_id - division ID
 employee_id - employee ID
Optional parameters:
 position_type - position type [head|deputy|worker]
 position_name - position in the division
 date_add - assignment date

division_employee_remove

Added in: 3.19.44

Description: Remove an employee from a division
Required parameters:
 division_id - division ID
 employee_id - employee ID
Optional parameters:
 date_remove - removal date

edit

Updated in: 3.21.79 (added messenger_service_name parameter)

Modified in: 3.19.40 (added ip_phone parameter)

Modified in: 3.19.33 (added is_blocked parameter)

Added in: 3.18beta1

Description: Edit employee record
Required parameters:
 id - id of the employee
Optional parameters:
 date_birthday - date of birth
 date_in - date of employment
 date_out - date of resignation
 first_name - name
 gps_id - GPS tracker IMEI
 ip_phone - IP phone number
 is_blocked - flag - block/unblock the account
 middle_name - middle name
 last_name - surname
 position - position
 short_name - short name/surname
 messenger_service_name - messenger service_name
 messenger_chat_id - messenger chat_id

get_data

Added in: 3.16dev2

Description: Retrieve information about an employee
Optional parameters:
 id - id of the employee to sample (can be comma separated)

get_division

Added in: 3.16dev2

Description: Retrieve division information
Optional parameters:
 id - division ID (can be comma separated)

get_division_list

Added in: 3.16dev2

Description: List of divisions

get_employee_id

Modified in: 3.18.7 (added possible messenger_chat_id value to data_typer parameter)

Added in: 3.16dev2

Description: Retrieve employee ID from input data
Required parameters:
 data_typer - type of data we are checking (possible values: additional_field_XXX, name, login, messenger_chat_id)
 data_value - value

get_history

Modified in: 3.16dev6 (added object_id parameter)

Added in: 3.16dev2

Description: Action history (limit 10000 records in the sample results)
Required parameters:
 date_from - sampling start date (from)
 date_to - sampling end date (to)
Optional parameters:
 employee_id - employee id (can be comma separated)
 type_id - id of action type (can be comma separated)
 object_id - id of related object (can be comma separated)

get_history_type

Added in: 3.16dev2

Description: History action types
Optional parameters:
 id - id of action type

get_timesheet_data

Added in: 3.16dev2

Description: Retrieve information from timesheets
Required parameters:
 date_from - start date of sampling
 date_to - sampling end date
Optional parameters:
 employee_id - employee id (can be comma separated)
 division_id - division id (can be comma separated)

get_work_time_data

Added in: 3.17dev1

Description: Retrieve employee working time information
Required parameters:
 date_from - start date of sampling
 date_to - date of sampling end
Optional parameters:
 employee_id - employee id (can be comma separated)

get_work_time_data_division

Added in 3.21.96

Description: Returns working time data for divisions
Required parameters:
 date_from - start date
 date_to - end date
Optional parameters:
 division_id - comma-separated division IDs

get_unavailable_data

Added in: 3.18beta1

Description: Retrieve employee unavailability information (holiday, sick leave)
Required parameters:
 None
Optional parameters:
 employee_id - employee id
 date_from - period start date
 date_to - end date of the period

set_timesheet_data

Modified in: 3.17dev1 (changed value parameter logic)

Added in: 3.16dev2

Description: Add/modify/delete an entry in the timesheet
Required parameters:
 employee_id - employee id
 date - date
 type_id - id of record type (1 - basic time, 2 - overtime, 3 - other)
 value - number of hours (after 3.17dev1: number of hours or text letter to mark non-working period, or empty value to delete the record; before 3.17dev1: integer value, or: 994 - on duty, 995 - off duty, 996 - holiday, 997 - day off, 998 - sick leave, 999 - business trip, or 0 to delete the record)

set_unavailable_data

Added in: 3.17dev1

Description: Add/modify/delete employee unavailability record (holiday, sick leave)
Required parameters:
 employee_id - employee ID
 date_from - period start date
 date_to - period end date
Optional parameters:
 type_id - record type id (1 - holiday, 2 - sick leave, not filled - delete record)

task_address_access_add

Added in: 3.18beta1

Description: Add an address object to the list of addresses where an employee can be assigned to work
Required parameters:
 employee_id - id of employee
 address_id - address object id (-1 for all addresses, -2 for objects without an address)

task_address_access_list

Added in: 3.18beta1

Description: List of addresses where an employee can be assigned to jobs
Required parameters:
 employee_id - employee id

task_address_access_remove

Added in: 3.18beta1

Description: Remove an address object from the list of addresses where an employee can be assigned to work
Required parameters:
 employee_id - id of employee
 address_id - address object id (-1 for all addresses, -2 for objects without an address)

work_time_finish

Added to: 3.16dev5

Description: Record the end of an employee's working time
Required parameters:
 employee_id - employee id
 date - date and time
Optional parameters:
 comment - notes

work_time_start

Added to: 3.16dev5

Description: Record the start of an employee's working time
Required parameters:
 employee_id - employee id
 date - date and time
Optional parameters:
 comment - notes