[POST] .../v1/productionoperation/get
Returns production operations. Use this method to retrieve produced item rows of one production document before editing, deleting, moving, replacing the linked tech map or posting the parent DocProduction. The response returns paged ProductionOperation records with next_offset and total, supports filters over document_id, id, item_id, tech_map_id and item.name, supports limit and offset and supports sort_orders with the documented enum column values. Production must be enabled by PRODUCTION_ALLOWED, the request must provide exactly one document through the document_id filter, filter selections are limited by the controller validation and the current request user must have production operation select permission. Missing body, disabled production, missing document selection, more than one document id, denied access, invalid filters or sort_orders, database failures or item/tech-map lookup failures are returned as HTTP 200 ErrorResult business errors.
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. 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 ProductionOperationSortOrder | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| document_id | int | Document IDs. The array must contain no more than one item. |
| id | int | Production operation IDs. |
| item.name | string | |
| item_id | int | Item IDs. |
| tech_map_id | int | Tech map IDs. |
Sortable Fields
| Field |
|---|
| document_id |
| doc_tech_map.id |
| id |
| item.articul |
| item.code |
| item.id |
| item.name |
| last_update |
| quantity |
Request Example
{
"filters": [
{
"Field": "document_id",
"Operator": "Equal",
"Value": "7401"
},
{
"Field": "item_id",
"Operator": "In",
"Value": "2001"
}
],
"sort_orders": [
{
"column": "item.name",
"direction": "ASC"
}
],
"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 ProductionOperation | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 8401,
"document_id": 7401,
"quantity": 10,
"item": {
"id": 2001,
"name": "Coffee gift set",
"code": "SET-001"
},
"doc_tech_map": {
"id": 7301,
"code": "TM-000073",
"type": "Assemblable",
"performed": true
},
"last_update": 1767312000
}
],
"next_offset": 0,
"total": 1
}