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

Материал из WiKi - UserSide
(Новая страница: «en | ru»)
 
(Fix Ukrainian API localization)
 
(не показано 10 промежуточных версий 2 участников)
Строка 1: Строка 1:
[[API_additional_data_EN|en]] | [[API_additional_data|ru]]
'''en''' | [[API_additional_data_UK|uk]] | [[API additional_data|ru]]
 
Section '''[[API_EN|API]]''' ERP "UserSide"
 
Purpose: Additional fields/data management
 
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 - Customers ''(all. Up to 3.14)''
5 - Customers ''(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 customers ''(up to 3.14)''
23 - Splitters
24 - Owners
25 - INVENTORIES
26 - Cable ducts
27 - Cable routes ''(of cable lines)''
28 - Customers ''(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
Required parameters:
  section - Category of optional fields [house|node|task|switch|inventory|...numeric values from the catalogue above...]
 
==== add_field ====
Description: Add an additional field
Required 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
Required 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: Delete an additional field (only if there are no records with this additional field)
Required 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
Required 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 required)''
 
Description: Changing the value of an additional field
If the object does not have such an additional field, it will be created.
Required 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.
Required 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
  ...

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

en | uk | ru

Section API ERP "UserSide"

Purpose: Additional fields/data management

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 - Customers (all. Up to 3.14)
5 - Customers (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 customers (up to 3.14)
23 - Splitters
24 - Owners
25 - INVENTORIES
26 - Cable ducts
27 - Cable routes (of cable lines)
28 - Customers (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
Required parameters:
 section - Category of optional fields [house|node|task|switch|inventory|...numeric values from the catalogue above...]

add_field

Description: Add an additional field
Required 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 
Required 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: Delete an additional field (only if there are no records with this additional field)
Required 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
Required 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 required)

Description: Changing the value of an additional field 
If the object does not have such an additional field, it will be created.
Required 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.
Required 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
 ...