Get
[POST] .../v1/inventoryoperation/get
Returns item lines of an inventory count document. Retrieve inventory operation rows for a single inventory document, including counted quantity, registered quantity, current item quantity when allowed, item data, price, last purchase cost and update time. The request requires the inventory operation select permission; the document_id filter is required and must identify one document, while id, item_id, search and only_deviation filters 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. The quantity field contains common, booked and allowed current stock quantities and is null when the caller has no item quantity permission. Errors such as missing body, missing or invalid document_id, oversized filter selections, denied access, invalid filters, storage or lookup errors are returned as HTTP 200 ErrorResult. The request supports sort_orders.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Required | Filters by fields available for this API method. Required filter fields: document_id. |
| limit | Int32 | Optional | Maximum number of records to return. Server settings define the effective maximum. |
| 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. Item code is compared only when the trimmed term is an unsigned integer. |
| sort_orders | Array of InventoryOperationSortOrder | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Required | Description |
|---|---|---|---|
| document_id | int | Required | |
| id | int | Optional | |
| item.name | string | Optional | |
| item_id | int | Optional | |
| only_deviation | bool | Optional | Deviation display status: true - show only deviations, false - show all. |
Sortable Fields
| Field |
|---|
| actual_quantity |
| document_id |
| id |
| item.articul |
| item.code |
| item.id |
| item.name |
| last_update |
| order |
| price |
| registered_quantity |
Request Example
{
"filters": [
{
"Field": "document_id",
"Operator": "Equal",
"Value": "string"
}
],
"limit": 1,
"offset": 1,
"search": "string",
"sort_orders": [
{
"column": "id",
"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",
"field_id": 1,
"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,
"max_quantity": 1.0,
"min_quantity": 1.0,
"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,
"order": 1,
"price": 1.0,
"quantity": {
"allowed": 1.0,
"booked": 1.0,
"common": 1.0
},
"registered_quantity": 1.0
}
],
"total": 1
}