Get

[POST] .../v1/docinout/get

Returns information about cash in/out document. Use this method to retrieve stock receipt and write-off documents for inventory movement journals, reconciliation screens, posting workflows and integrations that need document header state. The request requires the cash in/out document select permission, the stock receipt/expense tariff option must be enabled and filters are id, inout_type, firm_id, stock_id, attached_user_id, auto, performed, blocked, deleted_mark and date; date GreaterOrEqual maps to the start boundary and date LessOrEqual maps to the end boundary. The response returns a paged list with document type, code, date, stock, responsible user, automatic-document flag, lock state, posting state, deletion mark, next_offset and total; visible stocks are limited by the current request user's allowed stocks. The request supports sort_orders for the documented document columns. Business errors such as a missing request body, denied access, disabled tariff option, invalid filters, database failures or persistent lookup errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
filters Array of Filter Optional Optional filters by fields available for this API method.
limit Int32 Optional Returned data limit for the request. The default and maximum values are defined by the server-side query_limit setting.
offset Int32 Optional Offset from the beginning of the result set.
search String Optional text search by document code, stock name, company name, company TIN and responsible user full name. The minimum effective search length is defined by server settings.
sort_orders Array of DocInOutColumn Optional Sort orders for the result list. Supported column values are id, type, date, code, stock.name, attached_user.name, blocked, performed, deleted_mark and last_update.

Filterable Fields

Field Type Description
attached_user_id int responsible user ID filter.
auto bool automatic-document filter.
blocked bool edit-lock-state filter.
date int
deleted_mark bool deletion-mark-state filter.
end_date int period end date filter as Unix time in seconds.
firm_id int company ID filter.
id int stock receipt/write-off document ID filter.
inout_type string document type filter: income - stock receipt, outcome - stock write-off.
performed bool posting-state filter.
start_date int period start date filter as Unix time in seconds.
stock_id int stock ID filter. The API intersects this value with the current request user's allowed stocks.

Sortable Fields

Field
attached_user.name
blocked
code
date
deleted_mark
id
last_update
performed
stock.name
type

Request Example

{
  "filters": [
    {
      "field": "inout_type",
      "operator": "Equal",
      "value": "outcome"
    },
    {
      "field": "stock_id",
      "operator": "In",
      "value": "3"
    },
    {
      "field": "performed",
      "operator": "Equal",
      "value": "false"
    },
    {
      "field": "date",
      "operator": "GreaterOrEqual",
      "value": "1714521600"
    },
    {
      "field": "date",
      "operator": "LessOrEqual",
      "value": "1714607999"
    }
  ],
  "sort_orders": [
    {
      "column": "date",
      "direction": "DESC"
    },
    {
      "column": "code",
      "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 DocInOut Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 42,
      "inout_type": "outcome",
      "date": 1714550400,
      "code": "IO-000042",
      "stock": {
        "id": 3,
        "name": "Main warehouse"
      },
      "description": "Write-off of damaged goods",
      "attached_user": {
        "id": 5,
        "full_name": "Anna Smith"
      },
      "auto": false,
      "blocked": false,
      "current_user_blocked": null,
      "performed": false,
      "deleted_mark": false,
      "last_update": 1714553600
    }
  ],
  "next_offset": 0,
  "total": 1
}