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

Материал из WiKi - UserSide
(Normalize API language switcher)
(Fix Ukrainian API localization)
 
(не показана 1 промежуточная версия этого же участника)
Строка 1: Строка 1:
[[API_inventory|ru]] | '''en'''
'''en''' | [[API_inventory_UK|uk]] | [[API inventory|ru]]


Section '''[[API_EN|API]]''' ERP "UserSide"
Section '''[[API_EN|API]]''' ERP "UserSide"


Purpose: Actions with inventory and warehouse
Purpose: Inventory and warehouse operations


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


In the accounting of inventory items a concept like "account of account" is used.  
Inventory accounting uses the concept of an "accounting account".


Accounts represent values of the form "205031234567"
Accounts represent values of the form "205031234567"
Строка 17: Строка 17:
  204 - Warehouse
  204 - Warehouse
  205 - Customer
  205 - Customer
  206 - Communications facility
  206 - Infrastructure facility
  210 - Cable line
  210 - Cable line
  211 - Communication Line ''(from 3.15 onwards 210 is used instead)''
  211 - Communication line ''(from 3.15 onward 210 is used instead)''
  212 - Task
  212 - Task
  213 - Buildings
  213 - Buildings
Строка 26: Строка 26:


4th and 5th digit - sub-account  
4th and 5th digit - sub-account  
  01 - Long subreport
  01 - Long-term accountability
  02 - Short subreport
  02 - Short-term accountability
  03 - INVENTORY
  03 - Inventory items
  08 - Rent
  08 - Rent
  09 - Accounting of the sold things
  09 - Sold items accounting
  .. ''(since 3.17dev1 you can add your own sub-accounts)''
  .. ''(since 3.17dev1 you can add your own sub-accounts)''


The last 7 digits are the object ID with leading zeros
The last 7 digits are the object ID with leading zeros


205031234567 - Customer account id 1234567 and a subaccount of the regular inventory account
205031234567 - customer account id 1234567 and subaccount of regular inventory accounting
   
   
== Subcategories ==
== Subcategories ==
Строка 41: Строка 41:
==== add_inventory ====
==== add_inventory ====


''Modified in 3.19beta1 (storage_id parameter made mandatory)''
''Modified in 3.19beta1 (storage_id parameter made required)''


''Modified in 3.18.26 (added is_check_serial_number input parameter)''
''Modified in 3.18.26 (added is_check_serial_number input parameter)''


  Description: Arrival of inventory
  Description: Receive inventory items
  Obligatory parameters:
  Required parameters:
   inventory_catalog_id - name ID of the inventory item
   inventory_catalog_id - inventory item name ID
   trader_id - supplier ID
   trader_id - supplier ID
   storage_id - ID of the warehouse to which the arrival is to be performed
   storage_id - ID of the warehouse where the inventory receipt is recorded
  Optional parameters:
  Optional parameters:
   amount - quantity ''(default: 1)''
   amount - quantity ''(default: 1)''
Строка 58: Строка 58:
   inventory_number - inventory number
   inventory_number - inventory number
   document_number - receipt document number
   document_number - receipt document number
   document_date - date of arrival document
   document_date - inventory receipt document date
   additional_data_ip - IP-address (for inventory equipment)
   additional_data_ip - IP-address (for inventory equipment)
   additional_data_mac - MAC-address (for inventory equipment)
   additional_data_mac - MAC-address (for inventory equipment)
   is_check_serial_number - check for matching of serial number with already existing inventory items
   is_check_serial_number - check the serial number against existing inventory items


==== add_inventory_assortment ====
==== add_inventory_assortment ====
'' Added in: 3.14.1''
'' Added in: 3.14.1''


  Description: Adds the name of the inventory item
  Description: Add an inventory item name
  Obligatory parameters:
  Required parameters:
   section_id - section id of the inventory catalogue section
   section_id - section id of the inventory catalogue section
   name - name
   name - name
Строка 73: Строка 73:
   unit_name - unit of measurement
   unit_name - unit of measurement
   is_require_serial_number - flag - require serial number input when inventory is received
   is_require_serial_number - flag - require serial number input when inventory is received
   is_require_mac - flag - require input of MAC-address on arrival of inventory items
   is_require_mac - flag - require MAC address input when inventory is received


==== add_inventory_section ====
==== add_inventory_section ====
''Added in: 3.14.1''
''Added in: 3.14.1''


  Description: Adds an item catalogue section
  Description: Add an inventory catalogue section
  Obligatory parameters:
  Required parameters:
   name - name
   name - name
  Optional parameters:
  Optional parameters:
Строка 89: Строка 89:
''Added in: 3.13.38''
''Added in: 3.13.38''


  Description: Adding inventory to an operation
  Description: Add inventory to an operation
  Obligatory parameters:
  Required parameters:
   operation_id - id of operation
   operation_id - id of operation
   inventory_id - inventory id ''(it must be in the source account of the operation)''
   inventory_id - inventory id ''(it must be in the source account of the operation)''
Строка 99: Строка 99:
''Added in: 3.12.81''
''Added in: 3.12.81''
  Description: Change the IP address in the parameters of the inventory
  Description: Change the IP address in the parameters of the inventory
  Obligatory parameters:
  Required parameters:
   id - ID of the inventory item
   id - ID of the inventory item
   value - IP address
   value - IP address
Строка 106: Строка 106:
''Added in: 3.12.81''
''Added in: 3.12.81''
  Description: Change the MAC address in the parameters of the inventory
  Description: Change the MAC address in the parameters of the inventory
  Obligatory parameters:
  Required parameters:
   id - ID of the inventory item
   id - ID of the inventory item
   value - MAC-address
   value - MAC-address
Строка 112: Строка 112:
==== change_comment ====
==== change_comment ====
''Added in: 3.12.81''
''Added in: 3.12.81''
  Description: Changing the note of the inventory item
  Description: Change the inventory item note
  Required parameters:
  Required parameters:
   id - ID of the inventory item
   id - ID of the inventory item
Строка 119: Строка 119:
==== change_price ====
==== change_price ====
''Added in: 3.19beta1''
''Added in: 3.19beta1''
  Description: Change price of inventory items
  Description: Change inventory item cost
  Obligatory parameters:
  Required parameters:
   id - ID of the inventory item
   id - ID of the inventory item
   value - price
   value - price
Строка 133: Строка 133:
==== delete_inventory ====
==== delete_inventory ====
''Added in: 3.13.48''
''Added in: 3.13.48''
  Description: Deletion of the Written off Inventory
  Description: Delete written-off inventory
  Obligatory parameters:
  Required parameters:
   id - id of the inventory ''(The inventory must be written off)''
   id - id of the inventory ''(The inventory must be written off)''


Строка 140: Строка 140:
''Added in: 3.14.1''
''Added in: 3.14.1''


  Description: Edit the name of the inventory item
  Description: Edit an inventory item name
  Obligatory parameters:
  Required parameters:
   id - id of the item name
   id - id of the item name
  Optional parameters:
  Optional parameters:
   name - name
   name - name
   unit_name - unit of measurement
   unit_name - unit of measurement
   is_require_serial_number - flag - require serial number input at the arrival of the inventory items
   is_require_serial_number - flag - require serial number input when inventory is received
   is_require_mac - flag - require MAC-address to be entered when the inventory item arrives
   is_require_mac - flag - require MAC address input when inventory is received


==== edit_inventory_section ====
==== edit_inventory_section ====
''Added in: 3.14.1''
''Added in: 3.14.1''


  Description: Editing a section of the product catalogue
  Description: Edit an inventory catalogue section
  Obligatory parameters:
  Required parameters:
   id - id of the catalogue section
   id - id of the catalogue section
  Optional parameters:
  Optional parameters:
Строка 161: Строка 161:


==== get_inventory ====
==== get_inventory ====
  Description: Receive information about inventory
  Description: Retrieve inventory information
  Obligatory parameters:
  Required parameters:
   id - ID of the inventory item
   id - ID of the inventory item


Строка 177: Строка 177:


  Description: Retrieve list of inventory items
  Description: Retrieve list of inventory items
  Obligatory parameters:
  Required parameters:
   location - accounting category [storage|employee|customer|node|task] ''(staff - before 3.16dev2)''
   location - accounting category [storage|employee|customer|node|task] ''(staff - before 3.16dev2)''
  Optional parameters:
  Optional parameters:
Строка 194: Строка 194:


==== get_inventory_catalog_id_by_name ====
==== get_inventory_catalog_id_by_name ====
  Description: Retrieve the ID of an item of inventory by its name
  Description: Retrieve an inventory item name ID by name
  Obligatory parameters:
  Required parameters:
   name - name
   name - name


Строка 207: Строка 207:
''Modified in: 3.13.11 (added possible value mac for data_typer parameter)''
''Modified in: 3.13.11 (added possible value mac for data_typer parameter)''


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


==== get_inventory_section_catalog ====
==== get_inventory_section_catalog ====
  Description: Get the names of the inventory catalogue
  Description: Get inventory catalogue item names


==== get_inventory_storage ====
==== get_inventory_storage ====
Строка 226: Строка 226:


''Added in: 3.12.90''
''Added in: 3.12.90''
  Description: Retrieve information on transactions
  Description: Retrieve operation information
  Optional parameters ''(but there should be at least something)'':
  Optional parameters ''(at least one is required)'':
   id - transaction ID ''(multiple values separated by commas are possible)''
   id - transaction ID ''(multiple values separated by commas are possible)''
   src_account - credit account ''(from where)''
   src_account - credit account ''(source)''
   dst_account - debit account ''(to where)''
   dst_account - debit account ''(destination)''
   date_start - start date of the period
   date_start - start date of the period
   date_finish - period end date
   date_finish - period end date
Строка 239: Строка 239:
==== split_inventory ====
==== split_inventory ====
''Added in: 3.13.35''
''Added in: 3.13.35''
  Description: Split Inventory
  Description: Split inventory
  Obligatory parameters:
  Required parameters:
   id - id of the inventory item
   id - id of the inventory item
   amount - required quantity
   amount - required quantity
''As a result of the splitting, a quantity equal to amount will remain in the item id and a new item will be created (returned in the variable new_id) with the remaining 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 ====
==== transfer_inventory ====
Строка 249: Строка 249:


''Modified in: 3.12.89 (added operator_id, comment parameters)''
''Modified in: 3.12.89 (added operator_id, comment parameters)''
  Description: Inventory transfer
  Description: Transfer inventory
  Obligatory parameters:
  Required parameters:
   inventory_id - ID of inventory
   inventory_id - ID of inventory
   dst_account - Receiving account
   dst_account - receiving account
  Optional parameters
  Optional parameters
   comment - notes
   comment - notes
   employee_id - ID of employee - author of operation
   employee_id - ID of the employee who authored the operation
   operator_id - ID of operator - author of operation ''(before version 3.16dev2)''
   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)