[POST] .../v1/wholesaleoperation/get
Returns information about operation partner shipment document. Use this method after DocWholeSale/Get or DocWholeSale/Add to read item lines of one shipment-to-partner document before editing, moving, copying, pricing, discounting or posting the document. The response returns paged WholeSaleOperation records with next_offset and total, supports filters, sort_orders, search, limit and offset and requires the document_id filter with exactly one document ID. Provide document_id, id, item_id and search through filters to narrow the returned rows. The current request user must have shipment operation select permission; missing body, missing document_id, oversized filter selections, denied access, invalid filters or sort_orders, database failures or persistent lookup errors 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. Values above the configured query limit are replaced by the server query limit. |
| 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. Search is applied only when the trimmed term is longer than the server search threshold. |
| sort_orders | Array of WholeSaleOperationSortOrder | 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 |
|---|
| description |
| 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_ids",
"Operator": "In",
"Value": [
4601
]
},
{
"Field": "item.name",
"Operator": "Like",
"Value": "Coffee"
}
],
"sort_orders": [
{
"column": "order",
"direction": "ASC"
},
{
"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 WholeSaleOperation | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 8601,
"document_id": 4601,
"item": {
"id": 1001,
"name": "Arabica Coffee 1 kg",
"code": 1001
},
"quantity": 3,
"order": 10,
"price": 50000,
"price2": 52000,
"vat_value": 12,
"last_purchase_cost": 42000,
"vat_calculation_type": "Exclude",
"description": "Shipment to partner warehouse",
"last_update": 1767225600
}
],
"next_offset": 0,
"total": 1
}