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

Материал из WiKi - UserSide
(Новая страница: «en | ru Section '''API''' ERP "UserSide"»)
 
(Fix Ukrainian API localization)
 
(не показано 8 промежуточных версий 2 участников)
Строка 1: Строка 1:
[[API_inventory_EN|en]] | [[API_inventory|ru]]
'''en''' | [[API_inventory_UK|uk]] | [[API inventory|ru]]


Section '''[[API_EN|API]]''' ERP "UserSide"
Section '''[[API_EN|API]]''' ERP "UserSide"
Purpose: Inventory and warehouse operations
Additional parameters:
action - request subcategory ''(possible value: see below)''
Inventory accounting uses the concept of an "accounting account".
Accounts represent values of the form "205031234567"
First 3 digits:
101 - Suppliers
203 - Employees ''(up to 3.16dev2)''
204 - Warehouse
205 - Customer
206 - Infrastructure facility
210 - Cable line
211 - Communication line ''(from 3.15 onward 210 is used instead)''
212 - Task
213 - Buildings
215 - Employees ''(from 3.16dev2)''
900 - Written off
4th and 5th digit - sub-account
01 - Long-term accountability
02 - Short-term accountability
03 - Inventory items
08 - Rent
09 - Sold items accounting
.. ''(since 3.17dev1 you can add your own sub-accounts)''
The last 7 digits are the object ID with leading zeros
205031234567 - customer account id 1234567 and subaccount of regular inventory accounting
== Subcategories ==
==== add_inventory ====
''Modified in 3.19beta1 (storage_id parameter made required)''
''Modified in 3.18.26 (added is_check_serial_number input parameter)''
Description: Receive inventory items
Required parameters:
  inventory_catalog_id - inventory item name ID
  trader_id - supplier ID
  storage_id - ID of the warehouse where the inventory receipt is recorded
Optional parameters:
  amount - quantity ''(default: 1)''
  cost - cost ''(default: 0)''
  comment - notes
  sn - serial number
  barcode - barcode
  inventory_number - inventory number
  document_number - receipt document number
  document_date - inventory receipt document date
  additional_data_ip - IP-address (for inventory equipment)
  additional_data_mac - MAC-address (for inventory equipment)
  is_check_serial_number - check the serial number against existing inventory items
==== add_inventory_assortment ====
'' Added in: 3.14.1''
Description: Add an inventory item name
Required parameters:
  section_id - section id of the inventory catalogue section
  name - name
Optional parameters:
  unit_name - unit of measurement
  is_require_serial_number - flag - require serial number input when inventory is received
  is_require_mac - flag - require MAC address input when inventory is received
==== add_inventory_section ====
''Added in: 3.14.1''
Description: Add an inventory catalogue section
Required parameters:
  name - name
Optional parameters:
  typer - id of special attribute ''(default: 0)''
  parent_id - id of the parent section of the catalogue
  is_show_on_map - flag - whether to display objects of this section as a layer on the map
==== add_inventory_to_operation ====
''Added in: 3.13.38''
Description: Add inventory to an operation
Required parameters:
  operation_id - id of operation
  inventory_id - inventory id ''(it must be in the source account of the operation)''
Optional parameters:
  amount - quantity of inventory ''(if more than 1 unit in the inventory)''
==== change_arg_ip ====
''Added in: 3.12.81''
Description: Change the IP address in the parameters of the inventory
Required parameters:
  id - ID of the inventory item
  value - IP address
==== change_arg_mac ====
''Added in: 3.12.81''
Description: Change the MAC address in the parameters of the inventory
Required parameters:
  id - ID of the inventory item
  value - MAC-address
==== change_comment ====
''Added in: 3.12.81''
Description: Change the inventory item note
Required parameters:
  id - ID of the inventory item
  value - note
==== change_price ====
''Added in: 3.19beta1''
Description: Change inventory item cost
Required parameters:
  id - ID of the inventory item
  value - price
==== change_serial_number ====
''Added in: 3.12.52''
Description: Change the serial number of the inventory item
Required parameters:
  id - ID of the inventory item
  value - serial number
==== delete_inventory ====
''Added in: 3.13.48''
Description: Delete written-off inventory
Required parameters:
  id - id of the inventory ''(The inventory must be written off)''
==== edit_inventory_assortment ====
''Added in: 3.14.1''
Description: Edit an inventory item name
Required parameters:
  id - id of the item name
Optional parameters:
  name - name
  unit_name - unit of measurement
  is_require_serial_number - flag - require serial number input when inventory is received
  is_require_mac - flag - require MAC address input when inventory is received
==== edit_inventory_section ====
''Added in: 3.14.1''
Description: Edit an inventory catalogue section
Required parameters:
  id - id of the catalogue section
Optional parameters:
  name - name
  parent_id - id of the parent catalogue section
  is_show_on_map - flag - whether to display objects of this section as a layer on the map
==== get_inventory ====
Description: Retrieve inventory information
Required parameters:
  id - ID of the inventory item
==== get_inventory_amount ====
''Modified in: 3.16dev3 (added inventory_type_id, section_id parameters)''
''Modified in: 3.16dev2 (replaced staff with employee in the location parameter)''
''Modified in: 3.12.85 (added possible task value to location parameter)''
''Modified in: 3.12.71 (object_id parameter can be set to comma-separated values)''
''Modified in: 3.12beta27 (added location parameter)''
Description: Retrieve list of inventory items
Required parameters:
  location - accounting category [storage|employee|customer|node|task] ''(staff - before 3.16dev2)''
Optional parameters:
  object_id - id of accounting object ''(can be comma separated)''
  inventory_type_id - inventory item id ''(can be comma separated)''
  section_id - product catalogue section id ''(can be comma separated)''
==== get_inventory_catalog ====
''Modified in: 3.18beta1 (added id parameter)''
''Modified in: 3.12.74 (added section_id parameter)''
Description: Get a list of catalogue sections
Optional parameters
  id - ID of the inventory item ''(can be comma separated)''
  section_id - ID of the inventory type ''(can be comma separated)''
==== get_inventory_catalog_id_by_name ====
Description: Retrieve an inventory item name ID by name
Required parameters:
  name - name
==== get_inventory_id ====
''Modified in: 3.18beta1 (added possible ip value for data_typer parameter)''
''Modified in: 3.14.71 (added is_all_data parameter)''
''Modified in: 3.14.34 (added possible barcode value for data_typer parameter)''
''Modified in: 3.13.11 (added possible value mac for data_typer parameter)''
Description: Retrieve inventory item IDs from input data
Optional parameters:
  is_all_data - flag - return all found inventory items, not just one
Required parameters:
  data_typer - type of data we are checking ''(possible values: barcode, inventory_number, serial_number, mac, ip)''
  data_value - value
==== get_inventory_section_catalog ====
Description: Get inventory catalogue item names
==== get_inventory_storage ====
Description: Retrieve the list of warehouses
==== get_operation ====
''Modified in: 3.18beta1 (added employee_id, inventory_assortment_id parameters)''
''Modified in: 3.15.12 (added inventory_id parameter)''
''Added in: 3.12.90''
Description: Retrieve operation information
Optional parameters ''(at least one is required)'':
  id - transaction ID ''(multiple values separated by commas are possible)''
  src_account - credit account ''(source)''
  dst_account - debit account ''(destination)''
  date_start - start date of the period
  date_finish - period end date
  inventory_id - id of inventory
  employee_id - id of the employee initiating the transaction
  inventory_assortment_id - id of the inventory item name
==== split_inventory ====
''Added in: 3.13.35''
Description: Split inventory
Required parameters:
  id - id of the inventory item
  amount - required quantity
''As a result of the split, the inventory item id will keep the quantity equal to amount, and a new inventory item will be created with the remaining quantity (returned in the new_id variable).''
==== transfer_inventory ====
''Modified in: 3.16dev2 (excluded operator_id parameter, added employee_id parameter)''
''Modified in: 3.12.89 (added operator_id, comment parameters)''
Description: Transfer inventory
Required parameters:
  inventory_id - ID of inventory
  dst_account - receiving account
Optional parameters
  comment - notes
  employee_id - ID of the employee who authored the operation
  operator_id - ID of the operator who authored the operation ''(before version 3.16dev2)''

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

en | uk | ru

Section API ERP "UserSide"

Purpose: Inventory and warehouse operations

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

Inventory accounting uses the concept of an "accounting account".

Accounts represent values of the form "205031234567"

First 3 digits:

101 - Suppliers
203 - Employees (up to 3.16dev2)
204 - Warehouse
205 - Customer
206 - Infrastructure facility
210 - Cable line
211 - Communication line (from 3.15 onward 210 is used instead)
212 - Task
213 - Buildings
215 - Employees (from 3.16dev2)
900 - Written off

4th and 5th digit - sub-account

01 - Long-term accountability
02 - Short-term accountability
03 - Inventory items
08 - Rent
09 - Sold items accounting
.. (since 3.17dev1 you can add your own sub-accounts)

The last 7 digits are the object ID with leading zeros

205031234567 - customer account id 1234567 and subaccount of regular inventory accounting

Subcategories

add_inventory

Modified in 3.19beta1 (storage_id parameter made required)

Modified in 3.18.26 (added is_check_serial_number input parameter)

Description: Receive inventory items
Required parameters:
 inventory_catalog_id - inventory item name ID
 trader_id - supplier ID
 storage_id - ID of the warehouse where the inventory receipt is recorded
Optional parameters:
 amount - quantity (default: 1)
 cost - cost (default: 0)
 comment - notes
 sn - serial number
 barcode - barcode
 inventory_number - inventory number
 document_number - receipt document number
 document_date - inventory receipt document date
 additional_data_ip - IP-address (for inventory equipment)
 additional_data_mac - MAC-address (for inventory equipment)
 is_check_serial_number - check the serial number against existing inventory items

add_inventory_assortment

Added in: 3.14.1

Description: Add an inventory item name
Required parameters:
 section_id - section id of the inventory catalogue section
 name - name
Optional parameters:
 unit_name - unit of measurement
 is_require_serial_number - flag - require serial number input when inventory is received
 is_require_mac - flag - require MAC address input when inventory is received

add_inventory_section

Added in: 3.14.1

Description: Add an inventory catalogue section
Required parameters:
 name - name
Optional parameters:
 typer - id of special attribute (default: 0)
 parent_id - id of the parent section of the catalogue
 is_show_on_map - flag - whether to display objects of this section as a layer on the map

add_inventory_to_operation

Added in: 3.13.38

Description: Add inventory to an operation
Required parameters:
 operation_id - id of operation
 inventory_id - inventory id (it must be in the source account of the operation)
Optional parameters:
 amount - quantity of inventory (if more than 1 unit in the inventory)

change_arg_ip

Added in: 3.12.81

Description: Change the IP address in the parameters of the inventory
Required parameters:
 id - ID of the inventory item
 value - IP address

change_arg_mac

Added in: 3.12.81

Description: Change the MAC address in the parameters of the inventory
Required parameters:
 id - ID of the inventory item
 value - MAC-address

change_comment

Added in: 3.12.81

Description: Change the inventory item note
Required parameters:
 id - ID of the inventory item
 value - note

change_price

Added in: 3.19beta1

Description: Change inventory item cost
Required parameters:
 id - ID of the inventory item
 value - price

change_serial_number

Added in: 3.12.52

Description: Change the serial number of the inventory item
Required parameters:
 id - ID of the inventory item
 value - serial number

delete_inventory

Added in: 3.13.48

Description: Delete written-off inventory
Required parameters:
 id - id of the inventory (The inventory must be written off)

edit_inventory_assortment

Added in: 3.14.1

Description: Edit an inventory item name
Required parameters:
 id - id of the item name
Optional parameters:
 name - name
 unit_name - unit of measurement
 is_require_serial_number - flag - require serial number input when inventory is received
 is_require_mac - flag - require MAC address input when inventory is received

edit_inventory_section

Added in: 3.14.1

Description: Edit an inventory catalogue section
Required parameters:
 id - id of the catalogue section
Optional parameters:
 name - name
 parent_id - id of the parent catalogue section
 is_show_on_map - flag - whether to display objects of this section as a layer on the map

get_inventory

Description: Retrieve inventory information
Required parameters:
 id - ID of the inventory item

get_inventory_amount

Modified in: 3.16dev3 (added inventory_type_id, section_id parameters)

Modified in: 3.16dev2 (replaced staff with employee in the location parameter)

Modified in: 3.12.85 (added possible task value to location parameter)

Modified in: 3.12.71 (object_id parameter can be set to comma-separated values)

Modified in: 3.12beta27 (added location parameter)

Description: Retrieve list of inventory items
Required parameters:
 location - accounting category [storage|employee|customer|node|task] (staff - before 3.16dev2)
Optional parameters:
 object_id - id of accounting object (can be comma separated)
 inventory_type_id - inventory item id (can be comma separated)
 section_id - product catalogue section id (can be comma separated)

get_inventory_catalog

Modified in: 3.18beta1 (added id parameter)

Modified in: 3.12.74 (added section_id parameter)

Description: Get a list of catalogue sections
Optional parameters
 id - ID of the inventory item (can be comma separated)
 section_id - ID of the inventory type (can be comma separated)

get_inventory_catalog_id_by_name

Description: Retrieve an inventory item name ID by name
Required parameters:
 name - name

get_inventory_id

Modified in: 3.18beta1 (added possible ip value for data_typer parameter)

Modified in: 3.14.71 (added is_all_data parameter)

Modified in: 3.14.34 (added possible barcode value for data_typer parameter)

Modified in: 3.13.11 (added possible value mac for data_typer parameter)

Description: Retrieve inventory item IDs from input data
Optional parameters:
 is_all_data - flag - return all found inventory items, not just one
Required parameters:
 data_typer - type of data we are checking (possible values: barcode, inventory_number, serial_number, mac, ip)
 data_value - value

get_inventory_section_catalog

Description: Get inventory catalogue item names

get_inventory_storage

Description: Retrieve the list of warehouses

get_operation

Modified in: 3.18beta1 (added employee_id, inventory_assortment_id parameters)

Modified in: 3.15.12 (added inventory_id parameter)

Added in: 3.12.90

Description: Retrieve operation information
Optional parameters (at least one is required):
 id - transaction ID (multiple values separated by commas are possible)
 src_account - credit account (source)
 dst_account - debit account (destination)
 date_start - start date of the period
 date_finish - period end date
 inventory_id - id of inventory
 employee_id - id of the employee initiating the transaction
 inventory_assortment_id - id of the inventory item name

split_inventory

Added in: 3.13.35

Description: Split inventory
Required parameters:
 id - id of the inventory item
 amount - required quantity

As a result of the split, the inventory item id will keep the quantity equal to amount, and a new inventory item will be created with the remaining quantity (returned in the new_id variable).

transfer_inventory

Modified in: 3.16dev2 (excluded operator_id parameter, added employee_id parameter)

Modified in: 3.12.89 (added operator_id, comment parameters)

Description: Transfer inventory
Required parameters:
 inventory_id - ID of inventory
 dst_account - receiving account
Optional parameters
 comment - notes
 employee_id - ID of the employee who authored the operation
 operator_id - ID of the operator who authored the operation (before version 3.16dev2)