Get

[POST] .../v1/ordertopartneroperation/get

Returns information about operation order partner. Use this method after DocOrderToPartner/Get or DocOrderToPartner/Add to read item lines of one supplier order document before editing, moving or converting the order into a purchase workflow. The response returns paged OrderToPartnerOperation 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 supplier order 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 OrderToPartnerOperationSortOrder 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
cost
description
document_id
id
item.articul
item.code
item.id
item.name
last_update
quantity
vat_calculation_type
vat_value

Request Example

{
  "filters": [
    {
      "Field": "document_ids",
      "Operator": "In",
      "Value": [
        4501
      ]
    },
    {
      "Field": "item.name",
      "Operator": "Like",
      "Value": "Coffee"
    }
  ],
  "sort_orders": [
    {
      "column": "item.name",
      "direction": "ASC"
    },
    {
      "column": "cost",
      "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 OrderToPartnerOperation Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 8401,
      "document_id": 4501,
      "datetime": 1767225600,
      "item": {
        "id": 1001,
        "name": "Arabica Coffee 1 kg",
        "code": 1001
      },
      "quantity": 10,
      "current_quantity": 25,
      "cost": 12.5,
      "vat_value": 12,
      "vat_calculation_type": "Exclude",
      "description": "Supplier requested line",
      "last_update": 1767225600
    }
  ],
  "next_offset": 0,
  "total": 1
}