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

Материал из WiKi - UserSide
(Add Ukrainian API docs and trilingual API links)
(Fix Ukrainian API localization)
 
Строка 15: Строка 15:


  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: Строка 25:
''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: Строка 36:


  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: Строка 45:


  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
Строка 67: Строка 67:


  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: Строка 74:
   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
Строка 91: Строка 91:
==== 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: Строка 104:
''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: Строка 113:


''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: Строка 131:
''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: Строка 140:
==== 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
Строка 150: Строка 150:
''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: Строка 164:


  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: Строка 174:


  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: Строка 185:
''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: Строка 194:
''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: Строка 202:
''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: Строка 218:
==== 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

Текущая версия от 11:37, 10 мая 2026

en | uk | ru

Section API ERP "UserSide"

Purpose: Employees

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

Subcategories

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

edit

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_chat_id - telegram/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_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

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