[POST] .../v1/item/import
Imports items. The method is intended for importing multiple item records. Use this method to import up to 250 item records in one batch when item data comes from an external source. It creates or updates import rows through ItemsImportPersistent, falls back to server settings for missing group, VAT and unit defaults and returns an ItemImportDataResponse array in result. The caller must have item add permission; missing defaults, missing or empty data, batch-size violations, denied access and persistent import errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| barcode_separator | String | Optional | Barcode separator character used between multiple barcodes in one row. |
| comparation_value | String | Optional | Matching mode: Default - not specified and all items will be added; Code - by code; Name - by name; Articul - by article number; Barcode - by barcode. Used to prevent duplicate items. The imported item is checked by the selected parameter and an item with a matching value is not added. Allowed values: Default, Code, Name, Articul, Barcode, ICPS, ICPSBarcode. |
| data | Array of ItemImportData | Required | Imported item array. |
| group_id | Int64 | Required | Default item group ID used when group_path is empty. |
| group_separator | String | Optional | Group separator character used between nested groups, for example Group/Subgroup. |
| unit_id | Int64 | Required | Default unit of measure ID used when unit_name is empty. |
| vat_value_id | Int64 | Required | Default VAT rate ID used when vat_name is empty. |
Request Example
{
"barcode_separator": "string",
"comparation_value": "Code",
"data": [
{
"articul": "string",
"barcodes": "string",
"brand_name": "string",
"code": "string",
"color_name": "string",
"department_name": "string",
"description": "string",
"fullname": "string",
"group_path": "string",
"icps": "string",
"icpsbarcode": "string",
"index": "string",
"labeled": 1,
"name": "string",
"package_code": 1,
"parent_code": 1,
"producer_name": "string",
"size_name": "string",
"unit_name": "string",
"vat_name": "string"
}
],
"group_id": 1,
"group_separator": "string",
"unit_id": 1,
"vat_value_id": 1
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of ItemImportDataResponse | Result object. |
Response Example
{
"ok": true,
"result": [
{
"index": "string",
"item_id": 1,
"success": true
}
]
}