API inventory EN: различия между версиями
Нет описания правки |
IronBot (обсуждение | вклад) (Fix Ukrainian API localization) |
||
| (не показаны 2 промежуточные версии этого же участника) | |||
| Строка 1: | Строка 1: | ||
[[ | '''en''' | [[API_inventory_UK|uk]] | [[API inventory|ru]] | ||
Section '''[[API_EN|API]]''' ERP "UserSide" | Section '''[[API_EN|API]]''' ERP "UserSide" | ||
Purpose: | Purpose: Inventory and warehouse operations | ||
Additional parameters: | Additional parameters: | ||
action - request subcategory ''(possible value: see below)'' | action - request subcategory ''(possible value: see below)'' | ||
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 - | 206 - Infrastructure facility | ||
210 - Cable line | 210 - Cable line | ||
211 - Communication | 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 | 01 - Long-term accountability | ||
02 - Short | 02 - Short-term accountability | ||
03 - | 03 - Inventory items | ||
08 - Rent | 08 - Rent | ||
09 - | 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 - | 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 | ''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: | Description: Receive inventory items | ||
Required parameters: | |||
inventory_catalog_id - name ID | inventory_catalog_id - inventory item name ID | ||
trader_id - supplier ID | trader_id - supplier ID | ||
storage_id - ID of the warehouse | 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 | 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 | 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: | Description: Add an inventory item name | ||
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 | 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: | Description: Add an inventory catalogue section | ||
Required parameters: | |||
name - name | name - name | ||
Optional parameters: | Optional parameters: | ||
| Строка 89: | Строка 89: | ||
''Added in: 3.13.38'' | ''Added in: 3.13.38'' | ||
Description: | Description: Add inventory to an operation | ||
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 | ||
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 | ||
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: | 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 | Description: Change inventory item cost | ||
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: | Description: Delete written-off inventory | ||
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 | Description: Edit an inventory item name | ||
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 | is_require_serial_number - flag - require serial number input when inventory is received | ||
is_require_mac - flag - require MAC | 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: | Description: Edit an inventory catalogue section | ||
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: | Description: Retrieve inventory information | ||
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 | ||
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 | Description: Retrieve an inventory item name ID by name | ||
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 | 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 | ||
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 | 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 | Description: Retrieve operation information | ||
Optional parameters ''( | 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 ''( | src_account - credit account ''(source)'' | ||
dst_account - debit account ''( | 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 | Description: Split inventory | ||
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 | ''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: | Description: Transfer inventory | ||
Required parameters: | |||
inventory_id - ID of inventory | inventory_id - ID of inventory | ||
dst_account - | dst_account - receiving account | ||
Optional parameters | Optional parameters | ||
comment - notes | comment - notes | ||
employee_id - ID of employee | employee_id - ID of the employee who authored the operation | ||
operator_id - ID of operator | operator_id - ID of the operator who authored the operation ''(before version 3.16dev2)'' | ||
Текущая версия от 11:37, 10 мая 2026
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)