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

Материал из WiKi - UserSide
(Use Distribution frame term in EN API docs)
(Add Ukrainian API docs and trilingual API links)
 
(не показана 1 промежуточная версия этого же участника)
Строка 1: Строка 1:
[[API_additional_data|ru]] | '''en'''
'''en''' | [[API_additional_data_UK|uk]] | [[API additional_data|ru]]


Section '''[[API_EN|API]]''' ERP "UserSide"
Section '''[[API_EN|API]]''' ERP "UserSide"
Строка 31: Строка 31:
  21 - Suppliers
  21 - Suppliers
  22 - Potential users ''(up to 3.14)''
  22 - Potential users ''(up to 3.14)''
  23 - Dividers/ Splitters
  23 - Splitters
  24 - Owners
  24 - Owners
  25 - INVENTORIES
  25 - INVENTORIES

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

en | uk | 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 - Distribution frames
16 - VLAN
17 - Tasks
18 - Vehicles
19 - Advertising campaigns
20 - Custom devices
21 - Suppliers
22 - Potential users (up to 3.14)
23 - 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

Modified in: 3.19.16 (added cat_id parameter)

Added from: 3.12.80

Description: Retrieve field values
Obligatory parameters:
 field_id - field id
Optional parameters:
 cat_id - category (see the reference above)
 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)

change_value_mass

Added in: 3.19beta1

Description: Mass change of value of an additional field for a set of objects
In case of absence of such additional field for an object - it will be created.
Obligatory parameters:
 cat_id - category (see above guide)
 field_id - id of additional field
 data[] - object id|value
 data[] - object id|value
 data[] - object id|value
 ...