[POST] .../v1/inventoryoperation/get
Returns operation inventory. Use this method to retrieve inventory operation rows for a single inventory document, including counted quantity, registered quantity, item data, price, last purchase cost, and update time. The request requires the inventory operation select permission; document_ids is required and may contain only one document ID, while filters and legacy ids, item_ids, search, only_deviation, limit, and offset narrow the returned rows. The response returns a paged list with next_offset and total, and the method is commonly used after DocInventory/Get or before editing rows, closing inventory, or reviewing deviations. Business errors such as missing body, missing or invalid document_ids, ids or item_ids arrays over 250 items, denied access, invalid filters, database failures, or persistent lookup errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| limit | Int32 | Optional | Maximum number of records to return. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Search by parameter values: Item/name - item name, Item/articul - item article, Item/code - item code. |
| sort_orders | Array of DocumentOperationSortOrder | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| document_id | int | |
| document_ids | int | Inventory document IDs. |
| id | int | |
| ids | int | Inventory operation IDs. |
| item.name | string | |
| item_id | int | |
| item_ids | int | Item IDs. |
| only_deviation | bool | Deviation display status: true - show only deviations, false - show all. |
Request Example
{
"filters": [
{
"Field": "document_id",
"Operator": "Equal",
"Value": "string"
}
],
"limit": 1,
"offset": 1,
"search": "string",
"sort_orders": [
{
"column": "string",
"direction": "ASC"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| next_offset | Int32 | Offset for the next data page. |
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of InventoryOperation | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"next_offset": 1,
"ok": true,
"result": [
{
"actual_quantity": 1.0,
"datetime": 1,
"document_id": 1,
"id": 1,
"item": {
"articul": "string",
"assemblable": true,
"barcode_list": "string",
"base_barcode": "string",
"brand": {
"id": 1,
"last_update": 1,
"name": "string"
},
"code": 1,
"color": {
"id": 1,
"last_update": 1,
"name": "string"
},
"comission_tin": "string",
"compound": true,
"country": {
"alfa2": "string",
"alfa3": "string",
"code": "string",
"fullname": "string",
"id": 1,
"last_update": 1,
"name": "string"
},
"deleted_mark": true,
"department": {
"id": 1,
"last_update": 1,
"name": "string"
},
"description": "string",
"disassemblable": true,
"fields": [
{
"data_type": "string",
"is_custom": true,
"key": "string",
"metadata": "string",
"name": "string",
"required": true,
"value": "string"
}
],
"fullname": "string",
"group": {
"child_count": 1,
"id": 1,
"last_update": 1,
"name": "string",
"parent_id": 1,
"path": "string"
},
"has_child": true,
"icps": "string",
"id": 1,
"image_url": "string",
"is_labeled": true,
"last_update": 1,
"min_quantity": 1,
"name": "string",
"origin": "BuyingAndSelling",
"package_code": "string",
"parent_id": 1,
"partner_id": 1,
"producer": {
"id": 1,
"last_update": 1,
"name": "string"
},
"size": {
"id": 1,
"last_update": 1,
"name": "string"
},
"type": "Item",
"unit": {
"description": "string",
"id": 1,
"last_update": 1,
"name": "string",
"type": "non_pcs"
},
"vat": {
"enabled": true,
"id": 1,
"last_update": 1,
"name": "string",
"value": 1.0
}
},
"last_purchase_cost": 1.0,
"last_update": 1,
"price": 1.0,
"registered_quantity": 1.0
}
],
"total": 1
}