[POST] .../v1/stockagregationoperation/get
Returns stock aggregation operations. Use this read-only method to inspect item rows generated for one or more stock aggregation documents. The response returns paged StockAgregationOperation records with next_offset and total, supports filters over document_id, id, item_id, item.name and search, supports limit and offset and supports sort_orders with the documented enum column values. The request supports document_id, id, item_id and search filters. The controller requires the document_id filter to identify one document, limits filter selections to 250 items, reads stock operations with document type 15 and requires the current request user to have stock aggregation operation select permission. Missing body, missing document_id, oversized filter selections, denied access, invalid sort_orders, database failures, item lookup failures and additional field loading failures are returned as HTTP 200 ErrorResult business errors.
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. Negative values are treated as 0. |
| search | String | Optional | Search by Item.name, Item.articul, Item.code and Item.barcodes. |
| sort_orders | Array of StockAgregationOperationSortOrder | 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 |
Sortable Fields
| Field |
|---|
| document_id |
| id |
| item.articul |
| item.code |
| item.id |
| item.name |
| last_update |
| order |
| price |
| price2 |
| quantity |
| vat_calculation_type |
| vat_value |
Request Example
{
"filters": [
{
"Field": "document_id",
"Operator": "Equal",
"Value": "9101"
},
{
"Field": "item_id",
"Operator": "In",
"Value": "2001"
}
],
"sort_orders": [
{
"column": "price",
"direction": "DESC"
}
],
"limit": 50,
"offset": 0
}
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 StockAgregationOperation | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 9201,
"document_id": 9101,
"item": {
"id": 2001,
"name": "Coffee gift set",
"code": "SET-001"
},
"quantity": 3,
"order": 1,
"price": 125000,
"price2": 132000,
"vat_value": 12,
"vat_calculation_type": "Exclude",
"last_update": 1767312000
}
],
"next_offset": 0,
"total": 1
}