Get

[POST] .../v1/purchaseoperation/get

Returns operation receipts from partners. Use this method to retrieve line operations of one receipt-from-partner document before editing, posting or comparing purchase details. The response returns paged PurchaseOperation 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. The caller must have purchase-operation select permission; missing body, missing document_id, oversized filter selections, denied access, invalid sort_orders or persistent storage 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.
offset Int32 Optional Offset from the beginning of the result set.
search String Optional Search by Item.name, Item.articul, Item.code and Item.barcodes.
sort_orders Array of PurchaseOperationSortOrder 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
additional_expenses_amount
cost
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

{
  "document_ids": [
    5001
  ],
  "filters": [
    {
      "Field": "item.name",
      "Operator": "Like",
      "Value": "Coffee"
    }
  ],
  "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 PurchaseOperation Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 7001,
      "document_id": 5001,
      "quantity": 12.5,
      "cost": 42000,
      "price": 48000,
      "vat_value": 12,
      "order": 1,
      "description": "Arabica Coffee 1 kg"
    }
  ],
  "next_offset": 0,
  "total": 1
}