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

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
Строка 22: Строка 22:
  12 - Rates (manual billing only)
  12 - Rates (manual billing only)
  13 - Additional Services (manual billing only)
  13 - Additional Services (manual billing only)
  14 - Accommodation facilities
  14 - Communication installations
  15 - Crosses/ODFs
  15 - Crosses/ODFs
  16 - VLAN
  16 - VLAN
Строка 101: Строка 101:


==== change_value ====
==== change_value ====
''Modified in: 3.18.27 (cat_id parameter made obligatory)''
  Description: Changing the value of an additional field  
  Description: Changing the value of an additional field  
  If the object does not have such an additional field, it will be created.
  If the object does not have such an additional field, it will be created.
Строка 107: Строка 110:
   object_id - object id
   object_id - object id
   value - value
   value - value
   cat_id - category ''(for versions before 3.14 and only for users. See above guide)''
   cat_id - category ''(see above guide)''

Версия от 15:20, 20 декабря 2023

en | ru

Section API ERP "UserSide"

Purpose: Action with additional fields/data

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

Additional fields have categories (cat_id)

1 - Employees (up to 3.16dev2)
2 - Cable lines
4 - Users (all. Up to 3.14)
5 - Users (legal entities. Up to 3.14)
6 - Radio equipment
7 - Buildings
8 - Switches
9 - Media converters
10 - System devices
11 - Operators (up to 3.16dev2).
12 - Rates (manual billing only)
13 - Additional Services (manual billing only)
14 - Communication installations
15 - Crosses/ODFs
16 - VLAN
17 - Tasks
18 - Vehicles
19 - Advertising campaigns
20 - Custom devices
21 - Suppliers
22 - Potential users (up to 3.14)
23 - Dividers/ Splitters
24 - Owners
25 - INVENTORIES
26 - Cable ducts
27 - Cable routes (of cable lines)
28 - Users (all. From 3.14)
29 - Keys
30 - Names of inventory items (from 3.14.5)
40 - Address units (from 3.14.14)
48 - Warehouses (from 3.14.12)
999 - Employees (since 3.16dev2)

Additional fields have a field type (type)

1 - Text
2 - Number
3 - Flag
4 - Selection from list
5 - Text field
6 - Selection from list (including your own variant)
7 - Date
8 - Selection from list (several values)

Subcategories

get_list

Modified in: 3.14.22 (numeric values can be used in section parameter)

Description: Retrieve a list of fields
Obligatory parameters:
 section - Category of optional fields [house|node|task|switch|inventory|...numeric values from the catalogue above...]

add_field

Description: Adding an additional field 
Obligatory parameters:
 cat_id - category (see above directory)
 name - name
Optional parameters
 type - field type (see above guide)
 size - field size
 max_size - maximum size of the field
 is_active - flag - field is enabled
 position - field position among others
 is_require - flag - required to be filled in

edit_field

Modified in: 3.13.14 (added value_list parameter)

Description: Edit additional field 
Obligatory parameters:
 cat_id - category (see above directory)
 id - field id
Optional parameters
 See from add_field method
 value_list - possible values for the field type "Select from list" (separator - vertical line "|")

delete_field

Description: Deletion of additional field (deleted only if there are no records with this additional field)
Obligatory parameters:
 cat_id - category (see above directory)
 id - field id

get_value

Added from: 3.12.80

Description: Retrieve field values
Obligatory parameters:
 field_id - field id
Optional parameters:
 object_id - id of object (by which field value)'
 value - field value

change_value

Modified in: 3.18.27 (cat_id parameter made obligatory)

Description: Changing the value of an additional field 
If the object does not have such an additional field, it will be created.
Obligatory parameters:
 field_id - id of additional field
 object_id - object id
 value - value
 cat_id - category (see above guide)