Get

[POST] .../v1/invoiceoperation/get

Returns information about operations account-invoice. Use this method after DocInvoice/Get, DocInvoice/Add or DocInvoice/AddOnBase to retrieve invoice item rows for exactly one account-invoice before editing prices, moving rows, posting or sending the invoice to EDI. The response returns a paged array of InvoiceOperation records with next_offset and total; the request supports filters document_id, id, item_id and search plus sort_orders, limit and offset. The current request user must have invoice operation select permission, the document_id filter is required and must identify one document and filter selections must contain no more than 250 items. Missing body, missing or oversized filter selections, denied permission, invalid filters or sort_orders, database failures and other business 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. 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 InvoiceOperationSortOrder 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
amount
document_id
id
item.articul
item.code
item.id
item.name
last_update
price
quantity
total
vat_calculation_type
vat_value

Request Example

{
  "document_ids": [
    5101
  ],
  "filters": [
    {
      "Field": "document_ids",
      "Operator": "In",
      "Value": [
        5101
      ]
    },
    {
      "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 InvoiceOperation Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 9101,
      "document_id": 5101,
      "item": {
        "id": 1001,
        "name": "Arabica Coffee 1 kg",
        "code": 1001
      },
      "quantity": 3,
      "price": 50000,
      "amount": 150000,
      "total": 168000,
      "vat_value": 12,
      "vat_amount": 18000,
      "vat_calculation_type": "Include",
      "last_update": 1767225600
    }
  ],
  "next_offset": 0,
  "total": 1
}